1

I have an 4-core Ivy Bridge system running Win7 x64. I run a single-thread process that makes heavy use of integer MUL and DIV and allocates a lot of memory (some GBs of 16 GB total). What's more, this process runs with a processor affinity set (because that makes it run faster).

When the process is running, the whole system is sometimes lagging for seconds (literally 5-10 secs sometimes) and I don't understand why.

  • There is still 10GB RAM available, far more than is needed.
  • There are still 3 unused cores, PROCEXP shows clearly they are not used.
  • My number crunching process doesn't use any other resources I know of: no disk, no network, no events or the like.

I just cannot understand why my user experience is influenced so badly. That happens even if I set the process class to IDLE. What's more, how can I investigate what is slowing down Windows? Usually, I would look for high CPU load or many handles or page faults, but all that is low. My guess is that my process blocks some Windows resource, but I don't know which.

Update: as was explained in https://stackoverflow.com/a/4472603/1045800, i tried "Random Pausing", but to no avail: the stack trace always starts somewhere in my code, just crunching away, no resource access with KiApcInterrupt. I don't see any access to a Windows resource that could be the reason for a delay.

Update: The process is a console app, but it very rarely makes any output.

Community
  • 1
  • 1
cxxl
  • 4,939
  • 3
  • 31
  • 52
  • Curious. Does your process have a GUI at all? I'd also suggest that you try turning off the processor affinity and see if that makes any difference. Could be you're competing with some critical process that, for reasons of its own, is also running only on that one core. – Harry Johnston Mar 01 '14 at 11:18
  • Please explain the downvote. – cxxl Mar 04 '14 at 17:17
  • Have you tried splitting your app on more than one thread? – Jamil Hneini Mar 28 '14 at 10:37
  • That is not possible, since said process needs all that memory and cannot be parallelized. – cxxl Mar 28 '14 at 14:19
  • Does it allocate the memory in large chunks a few times, or in small amount frequently? (The heap is protected by spin locks, if your allocation profile makes the heap manager pick an unfortunate code path, I believe this could affect system overall performance) – RolKau Apr 30 '15 at 18:59
  • It allocates the memory only once and then works on it. – cxxl Apr 30 '15 at 20:16

0 Answers0