auto configure thread_num using get_cpu_num()