in reply to Re^2: Threads Doubt
in thread Threads Doubt
For large files like this, the read heads will still be "jumping around" anyway, because unless you just de-fragged your disk, the file is likely to be physically spread out.
Yes I know. But, if you are trying to read from 5 files concurrently, your read heads are going to be jumping around far more than if you are only reading from one file. (All else being equal.)
And depending upon your OS and filing system, 5 concurrent readers means far less system cache devoted to each file, which will further decrease throughtput. Then there are factors such as on disk caching and myriad other hardware and software related factors.
But as a cojent, if simplified, explanation of why multithreading can have a negative affect on the throughput of the OPs application, I think my post stands on it's own.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Threads Doubt
by Illuminatus (Curate) on Oct 17, 2008 at 18:17 UTC | |
by BrowserUk (Patriarch) on Oct 17, 2008 at 18:27 UTC |