|
From: Eyal L. <ey...@ey...> - 2003-03-18 12:52:27
|
I spent the last week trying to speed up valgrind for my heavily multithreaded system. My approach was very simplistic, just reducing the nanosleeps. I found that dropping all the hardcoded times of the form 'nn * 1000 * 1000' to '1 * 1000 * 1000' reduced the real time by a factor of 2.5 (from over 17h to under 7h). Reducing the time further has no effect, until at some point the process shifts from idle wait to busy wait (98% idle -> 0% idle) but the real time stays the same. Reducing it further will then cause the process to take far more time that originally. I still do not understand how the job runs with a 98% idle time, and must assume that better mt implementation has the potential for much more improvement. Without vg the system uses the CPU 100% and I expected vg to be even more CPU heavy. I tested this on a 1200 Athlon and 2800 P4 (both UP). BTW, in order to test very short times I had to change the thread scheduling time (awaken_at) from millisecs to microsecs. As it turned out this was not necessary. Finally, it seeems that doing the time reduction only in vg_libpthread.c is enough, the other few cases do not affect this issue much. -- Eyal Lebedinsky (ey...@ey...) <http://samba.org/eyal/> |