So I have a batch process which I need to run a lot (so every second counts!), to process about 40 million records. I wrote a threaded C# application to do this, and every thing worked great. Initially I was running the system on an Intel Core 2 Duo E4600 and it would complete the processing in roughly 70 seconds.
We then built a new system using an Intel Core 2 Quad Q6600 and under testing, this time went down to about 45 seconds - roughly what i expected from a threaded application running on more cores.
This was all fine and dandy, untill we tried to merge the two systems. We took the hard-drive (containing months of data) from the Core 2 Duo, wiped the C partition (all the data was stored on a separate partition), inserted it into the Quad system and reinstalled windows. Upon rerunning the application, running time had gone up to 150 seconds!
The only major differences are that the quad system was initially just for testing so we chucked in an old graphics card and IDE hard-drive. These were then replaced with a better graphics card, the SATA hard-drive and the memory from the Duo System. Since the process doesn't use the graphics card at all, and only reads and writes from the hard-drive before and after its run (all done in memory) - i would have thought they'd have almost no impact.
To summarise:
Intel Core 2 Duo E4600 + SATA drive + Radeon X1950 Pro + 2 gig ram = 70 seconds
Intel Core 2 Quad Q6600 + IDE hard-drive + old graphics card + 1gig ram= 45 seconds.
Intel Core 2 Quad Q6600 + SATA drive + Radeon X1950 Pro + 2 gig ram = 150 seconds
So... does anyone have any idea why a re-installation of windows and better components would make my system run 3 times slower?
Posts
- Did you previously run the image(s) through ngen?
- Did you go from a 32-bit to a 64-bit OS?
- Are you running a debug/checked build of the app, or are you running a release build?
CPU usage never drops below 99% whilst its running.
As far as I can tell, all 4 cores are working correctly - i just don't know if the application is using them all. From what I've read about it, theres no way to guarantee that window will utilize all 4 cores for the threads. The previous results indicated that it was, but the only reason I can think of for the slow-down, is that its only using 1 now.
Thanks for the help guys, this is driving me crazy!
Now I just need to try that suggestion of using Win32 SetThreadAffinityMask and I'll see how much of a difference it makes with all 4. Although, I still can't see how a 1/4 reduction in processing power would cause that sort of time difference.