 <p>You should take it as more of a symptom than part of the actual problem when you are stuck in system all the time. </p> <p>Memory fragmentation and paging out is the usual suspect, but it could be a myriad of things.</p> <p>In my experience performance problems are seldom something obvious like you are calling something specifically. Optimizing like commonly suggested is usually useless at a really low level. It catches things that amount to bugs that are correct but usually unintended like allocating something and deleting it over and over but for things like this you often need to have a deep understanding of everything happening to figure out exactly where the issue is (but like I said, surprisingly often it's memory management related if you are stuck in system calls a lot).</p>