Wednesday, October 5, 2011

why my cpu usage is always more than 25% in ubuntu (updated)

initially, whenever i used to check resource usages, i used to find cpu usage always going above above 25% even when the computer was idle. this was quite absurd as it was 4-8% in my earlier os. even in system details i saw my cpu frequency as 600 mhz which was incorrect as my cpu should be 1.7 ghz.

i didn't understand, why the system was behaving like this. i didn't see any performance loss but i thought maybe in ubuntu (linux) it's possible to do things even at 600 mhz!

well, there's nothing wrong with ubuntu!

just right click your panel (the top taskbar for people from windows world) and select 'add to panel'. select 'cpu frequency scaling monitor'.


when you've added it, you'll see your cpu frequency in panel. when you click on it, you'll see which scheme (scheme here refers to mode in which os will control power supplied to cpu for different purposes such as power saving or performance). by default, the scheme selected (when you install ubuntu for first time) is ondemand. ondemand, is a scheme in which os will only powerup cpu to maximum frequency when you load cpu.

it's a good scheme, as it saves power and never lets you down in performance. good job developers! so, the problem is now solved. so, when my laptop was showing 35% cpu during idle time, it was actually 600*35/1400 = 15% cpu usage ;) which is still normal as some applications were open at that time and they were quite responsive.

even now, with vlc playing, terminal, this chromium browser with 13 tabs open, shotwell photo manager, transmission bit torrent client, the cpu usage is still 35% on 600 mhz. see, how good it is ;)



so, it's true. ubuntu (linux) is cool!

update: looks like the 35% calculation i did was actually the percentage of clocking of cpu. i.e. (600/1700)*100 ~= 35%. for cpu usage, use system monitor. still it wasn't much high otherwise it would have clocked it to much higher frequency like 800 or so.


No comments:

Post a Comment