From: Sean H. <sea...@in...> - 2006-04-27 19:18:21
|
>> I still have questions about the number of workers to spawn. It seems >> IOMeter recommend one worker per CPU for disk target, but zero worker for >> network target. Unlike Ming Zhang said, I found the number of workers does >> have impact on the performance benchmark results. > >yes, it does, and in a very complex way. i do not know why original >author of iometer said that one disk worker per cpu, but it is wrong in >my understanding. Iometer was originally written to use asynchronous I/O with no data caching. If you start more workers (i.e. threads) than you have CPUs or cores, you lose performance because of thread context switching. You can increase the performance of a single thread by increasing its queue depth, changing its access pattern, limiting its disk access range, etc. If the implementation for Linux or some other OS performs I/O synchronously, or otherwise results in blocking the worker thread, then adding more workers could definitely improve performance. The penalty here is the lost "opportunistic performance" because of context switching, versus what an asynchronous implementation could have provided. >u can write a small program that spawn N threads and all sequential read >from one file, what will be the result, if they start from same offset, >and that data is cached, then all following read are finished in cache >thus damn fast. so u will get N * sequential read results. will that be >true? if they read a small request size but starting from different As you mentioned, this is true if the threads stay in lock step with each other, or your cache is large enough. The pattern at the disk is not guaranteed to be sequential. The original intent of Iometer was to test the I/O subsystem, not memory cache. For Windows, no disk caching was used. I do not know if you can disable the disk caching on Linux, but if you can't, then the performance between Windows and Linux cannot be compared. It's been too long since I've looked at the networking code in Iometer to know how many threads you should use. I do remember that when you create a network worker thread on your test system, it automatically created a responder worker on the target. This is why you do not need to specifically create worker threads on the target for network testing. However, you may need to create multiple workers on the test system to see the maximum performance. - Sean |