[haiku-development] Reproducing system pauses.

  • From: "Bruno Albuquerque" <bga@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 23 Jul 2009 13:55:25

I have mentioned more than once that I noticed system pauses (between 1 
and 5 seconds) where during some IO intensive operations the system 
would simply stop. Most of the time I can still move the mouse but 
sometimes even the mouse stops. Syslog does not show anything of 
interest and so far the only way I could reliably reproduce it was by 
doing a svn up in the Haiku tree. It would always stop 3 or 4 times at 
least for some seconds.

I decided to try to investigate it and, although I did not go very deep 
yet, I already have some pointers:

1 - It does not happen with read operations. Only with write 
2 - It seems to be related to memory allocations (the applications seem 
to stop because they request memory and, somehow, can not get it).
3 - It happens even with virtual memory disabled but it shows more 
easily with it disabled (probably related to swaping memory out).

I then procedded to find a way to be able to reproduce it in a very 
noticeable way. This is how you can do it:

1 - Open ActivityMonitor. Be sure that you have views with CPU usage 
and with memory usage.
2 - For a more dramatic effect, go to ActivityMonitor settings and 
change update interval to 23 msecs (this is the fastets setting 
3 - Open a terminal and run "dd if=/dev/zero of=zero.img bs=1024k count
=4096". Note this command will try to create a 4 Gb file on your HD, so 
be sure to have enough space or tweak the parameters.
4 - While the file is being created, watch ActivityMonitor. you will 
notice that, from time to time, the graphic will stop being updated.

Can some of you guys try this and let me know if you also see the 
problem? I jsut want to rule out the problem is not on my specific 

Also, I ran the above with virtual memory disabled, bur it should be 
even more noticeable with it enabled.

AFAIK, ActivityMonitor does not try to access the disk when rendering 
the memory and cpu graphics (if it does, something is worng with it), 
so the pause can not be attributed to it not being able to read 
something from disk because of heavy IO.

Any thoughts?


Other related posts: