From: Helge H. <hel...@ai...> - 2004-12-26 14:37:44
|
On Fri, Dec 24, 2004 at 09:23:02AM -0800, Hugo Vanwoerkom wrote: > Hi Team! > > Yesterday I was watching the one video I watch on > xine, The Pianist, on the secondary PCI MX-440 > monitor. And I noticed that xine was not complaining > the system was too slow! > > Googling I found this: > http://groups.google.com.au/groups?hl=en&lr=&selm=34eU2-fv-17%40gated-at.bofh.it > (on the still sane google!) > > Sure enough: modifying wmcpuload to log its results, > which calculates the total CPU load, I get: > > 2.6.9 2.4.29 > 09:28:04 CPU=85% 09:20:15 CPU=48%...........-37% > 09:28:05 CPU=84% 09:20:16 CPU=48% ...........-36% > 09:28:06 CPU=84% 09:20:17 CPU=47%...........-37% [...] > > An average of 30% less CPU load on 2.4.29! > This is all the same: Debian Sarge, nothing running > but xine, except for the kernel differences! > It is hard to get a valid comparison of cpu usage for a 2.4.x kernel and a 2.6.x kernel. The 2.6.x kernel use a 1000 HZ clock, while the 2.4.x kernel use a 100 HZ clock. This means the 2.6.x kernel gives a much more accurate result, 2.4.x has 10x rounding errors when reporting time. That can have dramatic consequences when timing a task that have a quickly repeating pattern of "hard work" and "waiting". A video player is definitely such a case, it works hard rendering a frame (or a few), then it waits a little so the video won't play too fast. 2.6.X have a slightly higher overehad due to the faster timer, but this overhead is small anyway. Take a look at the kernel list archives for more detailed explanations of the timing issues. 2.4.X probably seem to use less cpu due to rounding errors. The true overehead of the faster timer have been measured by running cpu hogs, and wasn't all that much. It certainly didn't steal 30% or so of the cpu. Helge Hafting |