Jump to content

High CPU usage, program windows getting darker


frankzyz
 Share

Recommended Posts

Hi,

Thanks to the experts here, I have almost tamed my mdv2009 by their help.

Now, I have a question about the performance.

My PC is an old one, int 1.4G P4, Rambus RAM 512M, display card is with NVidia gforece4 MMX440 driver - recorgnized in mdv is gforece 3 - 4 (3D enabled),80G IDE hard disk.

In the mdv kde4 environment, I always keep about one firefox window(with 5 to 8 tabs open), one downloader(such as amule or so, with about 30K up speed and 10K down speed as usual),one file manager, and other 3 or 5 applications(normal).

Almost all the times, the PC getting slower and slower after some hours. Checking the system monitor, CPU usage may reach 100% or at least 70%.

Then, it is hard to navigate from window to window, it is hard to input words, the currsor seems like in a mouse runs in sticky muddy land. And the window on top may turns gray or darker and darker automatically. After seconds, the window will wake up.

I want to know, how to optmise the system, and how to keep the optimization configuration.

 

Keep words: High CPU usage rate, running windows get darker and darker automatically, optimization

Frank

Link to comment
Share on other sites

The RAM is enough... and the CPU is enough too.

What's not enough is the GPU. I used to have an MX440 for quite some time, and it's a dog- actually it's quite slower than an ancient Gforce 2 Ti 200 that I was using before. You just get what you pay for in that case...

If you want to use that card, just disable 3D effects, else bad performance is to be expected.

Edited by scarecrow
Link to comment
Share on other sites

I want to know, how to optmise the system, and how to keep the optimization configuration.

 

It would be easier for us to give you the right answer (whether it's cpu, swap or whatelse) if we have some more information, can you run the command line command 'top' in a konsole terminal window and copy&paste here the output from it when this happens again?

Link to comment
Share on other sites

It would be easier for us to give you the right answer (whether it's cpu, swap or whatelse) if we have some more information, can you run the command line command 'top' in a konsole terminal window and copy&paste here the output from it when this happens again?
top - 01:43:19 up 43 min,  1 user,  load average: 1.82, 2.23, 2.24
Tasks: 171 total,   3 running, 165 sleeping,   0 stopped,   3 zombie
Cpu(s): 79.5%us, 14.6%sy,  0.0%ni,  0.0%id,  0.0%wa,  1.0%hi,  5.0%si,  0.0%st
Mem:    514920k total,   501904k used,    13016k free,     9820k buffers
Swap:  3068332k total,   331236k used,  2737096k free,   150364k cached

 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
4694 frank     20   0  336m  88m  26m R 51.5 17.5  16:27.66 firefox
4358 root      20   0  199m  88m 5396 S 16.2 17.5   6:41.56 X
4769 frank     20   0  138m  39m  12m S 11.9  7.9   4:18.58 opera
4658 frank     20   0 99.2m  12m 8184 S  5.3  2.5   2:28.86 compiz
5560 frank     20   0 86472  21m  15m S  4.0  4.3   0:03.72 konsole
4805 frank     20   0  114m  18m  13m S  3.6  3.7   1:26.59 amule
4670 frank     20   0  117m  26m  19m S  2.6  5.3   1:10.63 plasma
4795 frank     20   0 64200  11m  10m S  1.0  2.4   0:02.22 klipper
4692 frank     20   0  104m  30m  22m S  0.7  6.0   0:38.28 dolphin
5609 frank     20   0  2236 1092  832 R  0.7  0.2   0:00.38 top
5613 frank     20   0  2172  796  500 R  0.7  0.2   0:00.02 man
 406 root      15  -5     0    0    0 S  0.3  0.0   0:00.25 kjournald
3162 squid     20   0 13216 2468 1736 S  0.3  0.5   0:11.85 squid
3376 root      20   0 40428 7064 3332 S  0.3  1.4   0:06.76 python
4678 frank     20   0 52636 7660 7256 S  0.3  1.5   0:00.57 kaccess
4803 frank     20   0 45624 6268 5704 S  0.3  1.2   0:00.75 oooqs2
5160 frank     20   0  142m  10m 9.9m S  0.3  2.2   0:01.75 soffice.bin
   1 root      20   0  1708  532  512 S  0.0  0.1   0:00.75 init
   2 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd
   3 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0
   4 root      15  -5     0    0    0 S  0.0  0.0   0:00.08 ksoftirqd/0
   5 root      15  -5     0    0    0 S  0.0  0.0   0:00.15 events/0
   6 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
  47 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kintegrityd/0
  48 root      15  -5     0    0    0 S  0.0  0.0   0:00.56 kblockd/0
  50 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
  51 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify
 124 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
 161 root      15  -5     0    0    0 S  0.0  0.0   0:02.35 kswapd0
 202 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0
 349 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kpsmoused
 370 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd
 371 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khubd
[frank@localhost tmp]$

Link to comment
Share on other sites

top - 01:43:19 up 43 min,  1 user,  load average: 1.82, 2.23, 2.24
Tasks: 171 total,   3 running, 165 sleeping,   0 stopped,   3 zombie
Cpu(s): 79.5%us, 14.6%sy,  0.0%ni,  0.0%id,  0.0%wa,  1.0%hi,  5.0%si,  0.0%st
Mem:    514920k total,   501904k used,    13016k free,     9820k buffers
Swap:  3068332k total,   331236k used,  2737096k free,   150364k cached

 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
4694 frank     20   0  336m  88m  26m R 51.5 17.5  16:27.66 firefox
4358 root      20   0  199m  88m 5396 S 16.2 17.5   6:41.56 X
4769 frank     20   0  138m  39m  12m S 11.9  7.9   4:18.58 opera
4658 frank     20   0 99.2m  12m 8184 S  5.3  2.5   2:28.86 compiz
5560 frank     20   0 86472  21m  15m S  4.0  4.3   0:03.72 konsole
4805 frank     20   0  114m  18m  13m S  3.6  3.7   1:26.59 amule
4670 frank     20   0  117m  26m  19m S  2.6  5.3   1:10.63 plasma
4795 frank     20   0 64200  11m  10m S  1.0  2.4   0:02.22 klipper
4692 frank     20   0  104m  30m  22m S  0.7  6.0   0:38.28 dolphin
5609 frank     20   0  2236 1092  832 R  0.7  0.2   0:00.38 top
5613 frank     20   0  2172  796  500 R  0.7  0.2   0:00.02 man
 406 root      15  -5     0    0    0 S  0.3  0.0   0:00.25 kjournald
3162 squid     20   0 13216 2468 1736 S  0.3  0.5   0:11.85 squid
3376 root      20   0 40428 7064 3332 S  0.3  1.4   0:06.76 python
4678 frank     20   0 52636 7660 7256 S  0.3  1.5   0:00.57 kaccess
4803 frank     20   0 45624 6268 5704 S  0.3  1.2   0:00.75 oooqs2
5160 frank     20   0  142m  10m 9.9m S  0.3  2.2   0:01.75 soffice.bin
   1 root      20   0  1708  532  512 S  0.0  0.1   0:00.75 init
   2 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd
   3 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0
   4 root      15  -5     0    0    0 S  0.0  0.0   0:00.08 ksoftirqd/0
   5 root      15  -5     0    0    0 S  0.0  0.0   0:00.15 events/0
   6 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
  47 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kintegrityd/0
  48 root      15  -5     0    0    0 S  0.0  0.0   0:00.56 kblockd/0
  50 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
  51 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify
 124 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
 161 root      15  -5     0    0    0 S  0.0  0.0   0:02.35 kswapd0
 202 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0
 349 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kpsmoused
 370 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd
 371 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khubd
[frank@localhost tmp]$

 

Your PC doesn't have enough RAM to cope with all the programs you are trying to use at the same time (as you can see more than 300MB of swap is in use), upgrading the RAM to 1GB would certainly help, if that's not an option try using LXDE as suggested previously, as that uses less memory than KDE and Gnome, or use only Opera for browsing as that uses less memory and cpu than Firefox (why are you running both Opera and Firefox at the same time anyway?)

Changing the kernel swappiness parameter could help a bit too but it can't remediate the fact that you are trying to run to many programs in too little memory.

Try:

echo 20 > /proc/sys/vm/swappiness

 

to make this change permanent add the following line to /etc/sysctl.conf

 

vm.swappiness=20

 

You can try even lower vaules like maybe 10, default is 60.

Edited by tux99
Link to comment
Share on other sites

Tweaking the ram and the graphic card [be changing the card physically or trying another drivers] could be the way.

 

I recently have a issue with a graphic card that slow the entire desktop [s3 Graphics UniChrome IGP over an Phenom X3 with 4 Gb of ram] and due a poor driver implementation it run like a celeron @ 300 Mhz bro!!!

Good look

Link to comment
Share on other sites

512 meg of ram is not enough for your requirements. Keep a check on the swap partition and I think you'll find it filling up.

I thought that was the case. Try closing some of your tabs, not using fancy effects and increase your ram. KDE needs about 250megs just to be there.

Link to comment
Share on other sites

Your PC doesn't have enough RAM to cope with all the programs you are trying to use at the same time (as you can see more than 300MB of swap is in use), upgrading the RAM to 1GB would certainly help, if that's not an option try using LXDE as suggested previously, as that uses less memory than KDE and Gnome, or use only Opera for browsing as that uses less memory and cpu than Firefox (why are you running both Opera and Firefox at the same time anyway?)

Changing the kernel swappiness parameter could help a bit too but it can't remediate the fact that you are trying to run to many programs in too little memory.

Try:

echo 20 > /proc/sys/vm/swappiness

 

to make this change permanent add the following line to /etc/sysctl.conf

 

vm.swappiness=20

 

You can try even lower vaules like maybe 10, default is 60.

Thank you!

 

Cpu(s): 79.5%us, 14.6%sy, 0.0%ni, 0.0%id, 0.0%wa, 1.0%hi, 5.0%si, 0.0%st

Mem: 514920k total, 501904k used, 13016k free, 9820k buffers

Swap: 3068332k total, 331236k used, 2737096k free, 150364k cached

 

looking at this above, I found the swap is used but less than the total. While the phisical mem is almost exhausted.

The realistic thing is, this is my old computer baught in 2001, the ram is rambus type that means I can't buy that type mem in the market - no producer producing that.

 

Since the CPU usage is 79.5%, and the CPU is a 1.4G P4 which is good enough to play the programs I opened, so I think the reason may be the GPU - the graphic card and the 3D effect drag down the system.

 

I was just trying to mimic the working situation that many programs opened, so I open both opera and firefox.

 

I like the 3D effect, so, I will try keep it and change the desktop to lxde. And try echo 20 > /proc/sys/vm/swappiness

 

Thank you again.

Link to comment
Share on other sites

looking at this above, I found the swap is used but less than the total. While the phisical mem is almost exhausted.

 

it doesn't matter how much percentage of your total swap is used, it's the ratio of RAM to used swap which is too high, i.e. you have almost as much swap in use as RAM! For desktop use this will generally mean a lot of paging which slows down the system.

 

The realistic thing is, this is my old computer baught in 2001, the ram is rambus type that means I can't buy that type mem in the market - no producer producing that.

 

If I were you I would have a look around on ebay, you would be surprised how cheap second hand RAM can be.

I have upgraded a lot of old PCs (even Pentium 3's) for friends with parts off ebay for very little money and all these PCs are still in use and perfectly adequate with the extra RAM. You just need to make sure you know what exact type of RAM you need, otherwise you might spend repeatedly money on RAM that won't work on your motherboard.

 

Since the CPU usage is 79.5%, and the CPU is a 1.4G P4 which is good enough to play the programs I opened, so I think the reason may be the GPU - the graphic card and the 3D effect drag down the system.

 

The 79.5% cpu usage means little, as it's a snapshot of a moment, you need to observe it over time, but I agree with you a 1.4G P4 is good enough for most uses. Also remember with lots of swap in use the cpu will spend time doing the swapping so by increasing the RAM or reducing the swap usage, cpu usage will decrease too.

Replacing the GPU with a Nvidia FX5200 or similar second hand cheap off ebay can make a difference too, but you are right, try first to change to LXDE and change the swappiness parameter and if that still doesn't help then I would go looking for the RAM on ebay (extra RAM will make a bigger difference than a faster GPU).

Edited by tux99
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...