add code for performance test, making the best strategy of placing the threads