optimaze thread count