try to find optimal GC mode