Friday, December 26, 2008

Reinstall Ubuntu...

My Ubuntu having big trouble! CPU usage too high... totally don't know what happen. The system monitor showing the CPU usages very high... 50%~100%. After rebooting few time, eventhough my system is apparently idle (only running the system monitor) the CPU usage still very high. The Compiz effect is lagging (switching the 3D desktop). Strange thing is all the processes showing in system monitor is very low. Totally can't find any process that cause this problem.

Okay... let me recall what had I done...

1. Install MPlayer and its codec.
2. Installed Compiz fusion Icon.
3. Installed Apache2, MySQL and php.
4. Live update via Update Manager.
5. Installed VirtualBox and modify the /etc/init.d/mountdevsubfs.sh

Everything seen fine for me. I don't think these applications or services were too heavy for my quad core processor. Could it be the updates crashed with something? Really no idea.

It's time to find the answer from the www. Surprisingly there are some report of this bugs (Try google with the keyword "ubuntu cpu usage"). After reading few article, I learnt something new... Zombie Process! OMG... my system got zombie!!!

What is the zombie process? Go read the wikipedia... http://en.wikipedia.org/wiki/Zombie_process

How to see the zombie? The simple way is use the top command in the terminal.


Notice the second line, "Tasks: 165 total, .... ... ... ... 1 zombie". To find that zombie process, just run the system monitor, click on the Processes tab and look for "Zombie" in the status column. The other way is the command "ps aux" in the terminal.

Anyway, I still don't know how to solve the high load problem. So I decided to reinstall my Ubuntu. Then monitor the CPU usage each time I install an application or update.


OK, just after the installation, without any updating, seen fine, although the CPU4 showing 46.7% but I think its normal.

Then I tried to install Compiz and I moved the "Add/Remove Application" window around while installing.


OMG, see that graph of the CPU History? A downloading process plus moving window task only... I really don't understand why so heavy load? hmm... Never mind, just continue the updating... after everything done (all the updates including NVidia driver and Compiz), I restart the Ubuntu. And here is the result:-


Seen OK. All Compiz effect very smooth. Well... I guess this CPU high load problem need some time to figure out. Ubuntu (linux) is still like an alien to me. ):=|

EDIT: I just found a program that will cause the 100% CPU usage problem! The openOffice!!! Just after I published this article, I closed the openOffice and immediately I switched to another desktop and closed the GIMP. And bingo, guess what, 100% CPU usage:-


System monitor shows that 4 CPU 100%, top shows that 99.6%us, soffice.bin: 392%. But strange thing is the Compiz still running smoothly!? Anyway, this problem I still can solve it, just kill the soffice.bin process. Then CPU back to normal again.


Conclusion, need more time to understand this alien.

1 comment: