I have a large python program doing some heavy numerical crunching using pyCUDA and numpy.
It's usually very fast, but seemingly randomly every now and then it will slow down by 3-4x with no apparent cause.
Watching CPU usage with htop shows that whenever it slows down, the CPU bar turns red, which as far as I understand, means 'kernel threads'.
But what does that really mean? How can I figure out what's causing that? It happens sometimes while the GPU is doing stuff, sometimes while the CPU is doing stuff. The program (which runs for several hours) slows down for an hour, recovers by itself and is fast for an hour, and then the problem relapses.
Any ideas? Further information you need?