C#-APP - Application being throttled

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wastedwombat
    New Member
    • Mar 2008
    • 2

    C#-APP - Application being throttled

    I'm wrote a C# application to run a batch process on around 50 million records. Initially this was taking around about 60 seconds to run. Since I'm running a multi-core machine (Intel Quad 6600 - 4 cores), I alterered the code to use 4 threads, which had the desired effect of speeding up my code to around about 40 seconds running time, with all 4 cores running at 100%..

    Now, my problem is this. During a routine upgrade, I replaced the hard-drive, and reinstalled a fresh version of windows xp (with all windows updates). Upon rebuilding the application, the run time had gone up to nearly 180 seconds, and the cores were all running at a max of 75%.

    I'm using Visual Studio 2005 on a Windows XP machine.

    I've tested all the hardware, and its all running fine, which leads me to believe theres a problem with the .net framework somewhere.

    Is there some flag or option I'm missing when building the application, thats causing this CPU throttling? Is there someway I can force the application to use 100% of processor power as it was previously?
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    There is an option to build an application for 32 bit or 64 bit

    However handling of various cores is handled by the hardware.

    Are you connecting and disconneting with the database for every query that runs? You may want to use on conection, might lower the processing time

    Comment

    • wastedwombat
      New Member
      • Mar 2008
      • 2

      #3
      Thats whats confusing me about the whole thing, I'm loading all the data into memory, and processing it from there - no database connections, no reading from the hard-drive, the section being timed only uses data in memory.

      Other programs have no trouble getting all 4 cores at 100%,so I presumed it was something in .net that was limiting it.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Well, it's probably kept in Virtual Memory, which = harddrive (swap file)
        If your new harddrive is a slower speed, or even if it's the "same" speed (venders like to 'cheat') you could be experiancing slow down through that.
        Any number of OS setting could effect it to, how it interacts with the quad core, or the system buses to the HD, how it handles virtual memory, what priority to give to the application.

        Comment

        Working...