is 1,3 gib use of ram normal?

Hi

running opensuse 11.4 kde with amarok playing and browsing internet my ram usage is 1.3 gib and system is quite slow. I’ve noticed that even browsing internet is unusually slow like for opensuse.
here is result of TOP command :


top - 12:08:05 up 31 min,  3 users,  load average: 0.52, 0.46, 0.51
Tasks: 193 total,   2 running, 191 sleeping,   0 stopped,   0 zombie
Cpu(s): 11.0%us,  6.3%sy,  0.0%ni, 69.9%id, 12.6%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   2054004k total,  2018884k used,    35120k free,    79208k buffers
Swap:  2110460k total,      100k used,  2110360k free,   592444k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                    
 1497 root      20   0  391m 293m  16m S   10 14.6   9:03.74 Xorg                        
 2193 andre     20   0 1057m 395m  39m S    9 19.7   4:21.98 firefox                     
 2022 andre     20   0  607m  95m  57m S    4  4.8   3:06.14 kwin                        
 2058 andre     20   0  797m  71m  35m S    4  3.6   0:42.22 plasma-desktop              
 2761 andre     20   0 1350m 134m  61m S    3  6.7   0:57.76 amarok                      
 2056 andre     20   0  652m  42m  26m S    2  2.1   0:31.98 knotify4                    
 2728 andre     20   0 85244  22m  12m S    2  1.1   0:27.75 npviewer.bin                
 2166 andre     20   0  400m 9292 7472 S    1  0.5   0:16.88 pulseaudio                  
   11 root      20   0     0    0    0 R    0  0.0   0:03.12 kworker/0:1                 
   30 root      20   0     0    0    0 S    0  0.0   0:00.25 kswapd0                     
 1110 messageb  20   0 28756 2136  824 S    0  0.1   0:04.86 dbus-daemon                 
 1960 andre     20   0  618m  34m  21m S    0  1.7   0:06.71 kded4                       
 2015 root      20   0 45008  784  444 S    0  0.0   0:00.28 udisks-daemon               
 7837 root      20   0  476m  34m  25m S    0  1.7   0:03.59 dolphin                     
 8479 andre     20   0  8716 1200  816 R    0  0.1   0:00.74 top                         
    1 root      20   0 12460  720  664 S    0  0.0   0:00.69 init                        
    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd                    
    3 root      20   0     0    0    0 S    0  0.0   0:00.29 ksoftirqd/0                 
    6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0                 
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0                  
    8 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1                 
   10 root      20   0     0    0    0 S    0  0.0   0:00.09 ksoftirqd/1                 
   12 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1                  
   13 root       0 -20     0    0    0 S    0  0.0   0:00.00 cpuset                      
   14 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper                     
   15 root       0 -20     0    0    0 S    0  0.0   0:00.00 netns                       
   16 root      20   0     0    0    0 S    0  0.0   0:00.00 sync_supers                 
   17 root      20   0     0    0    0 S    0  0.0   0:00.00 bdi-default                 
   18 root       0 -20     0    0    0 S    0  0.0   0:00.00 kintegrityd                 
   19 root       0 -20     0    0    0 S    0  0.0   0:00.00 kblockd                     
   20 root       0 -20     0    0    0 S    0  0.0   0:00.00 kacpid                      
   21 root       0 -20     0    0    0 S    0  0.0   0:00.00 kacpi_notify                
   22 root       0 -20     0    0    0 S    0  0.0   0:00.00 kacpi_hotplug               
   23 root       0 -20     0    0    0 S    0  0.0   0:00.00 ata_sff                     
   24 root      20   0     0    0    0 S    0  0.0   0:00.00 khubd                       
   25 root      20   0     0    0    0 S    0  0.0   0:00.02 kseriod                     
   26 root       0 -20     0    0    0 S    0  0.0   0:00.00 md                          
   27 root      20   0     0    0    0 S    0  0.0   0:03.13 kworker/1:1                 
   28 root       0 -20     0    0    0 S    0  0.0   0:00.00 kondemand                   
   29 root      20   0     0    0    0 S    0  0.0   0:00.00 khungtaskd                  
   31 root      25   5     0    0    0 S    0  0.0   0:00.00 ksmd                      

it is strange enough for opensuse because longer I use it without switching off slower it gets to open new programs, browse internet, do anything on it…

I do updates whenever are available, have usual multimedia codecs and lately have installed kdenlive, that’s all. I dont know why system is getting so slow. I dont know if these is relevant info but I have changed fan in my laptop here.
What would you suggest to speed it up?
thanks

I see Xorg is consuming quite a bit. What’s the videocard? Did you install a driver for it?

hi
video card is nvidia 8600GS yes installed drivers just after system installation…

Linux uses memory very efficiently. It keeps a lot of stuff in memory if there is sufficient memory available. It frees up that memory for other use as needed. This normally makes for a faster system.

According to your “top” output, you are using very little swap (100k). So there shouldn’t be a problem of excessive swapping.

My total memory use is similar to yours:


Mem:   1988928k total,  1790544k used,   198384k free,   235616k buffers
Swap: 10482408k total,       56k used, 10482352k free,   940600k cached

However, on a system with only half as much memory installed, I typically see very little swap in use. This is the dynamic adjustment of memory use by linux to use it most effectively.

I managed decreased ram to 0.9Gib by switching off some processes:

  • cups
  • isdn
    -postfix
  • splash

I also installed Prelink and now with same programs running like before I get 0.9 Gb ram usage.

ALL advices on how to speed up opensuse welcome :slight_smile:

Can’t see anything unusual in your RAM usage. Slow browsing could be due to any number of factors but unlikely to be memory usage, especially as you have a fair amount free (cached, which is the same thing). I wouldn’t disable CUPS unless you never print. Best advice, for speedy browsing (not knowing about your connection speed and usage patterns etc) is to get more RAM (2 Gb isn’t THAT much these days) and switch from Firefox to Chrome or Opera.

I’m not seeing an obvious problem, except perhaps for the amount of memory used by Xorg and by firefox.

Here’s part of my “top” output for comparison:


top - 10:45:39 up 3 days,  3:27,  7 users,  load average: 0.01, 0.06, 0.20
Tasks: 157 total,   1 running, 156 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.3%us,  0.3%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1988928k total,  1763756k used,   225172k free,   208960k buffers
Swap: 10482408k total,       52k used, 10482356k free,  1011840k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
 4476 root      20   0 45008  780  444 S    0  0.0   3:11.79 udisks-daemon      
 5209 root      20   0     0    0    0 S    0  0.0  14:56.43 kworker/0:2        
 6075 root      20   0  150m  29m 6400 S    0  1.5  53:38.55 Xorg               
28254 rickert   20   0  808m 155m  42m S    0  8.0   8:39.15 firefox            
31259 rickert   20   0  8720 1144  800 R    0  0.1   0:00.13 top                
    1 root      20   0 12460  788  648 S    0  0.0   0:03.97 init               
    2 root      20   0     0    0    0 S    0  0.0   0:00.02 kthreadd           
    3 root      20   0     0    0    0 S    0  0.0   0:34.85 ksoftirqd/0        
    6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0        
    7 root      RT   0     0    0    0 S    0  0.0   0:00.41 watchdog/0         
    8 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1        
   10 root      20   0     0    0    0 S    0  0.0   0:03.36 ksoftirqd/1        
   12 root      RT   0     0    0    0 S    0  0.0   0:00.36 watchdog/1         

Possible reasons for the differences:

I have desktop effects turned off in KDE. That probably reduces memory and CPU usage by Xorg and by plasma-desktop.

I only recently restarted firefox. I typically restart once per day, so as to flush unwanted cookies (done in a script).

Why would you turn that off? There is no reason normally.

Here, my TOP.

joerg@linux-snjl:~> LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so
joerg@linux-snjl:~> top

top - 20:49:39 up 11:50,  5 users,  load average: 0.00, 0.01, 0.05
Tasks: 225 total,   2 running, 210 sleeping,   0 stopped,  13 zombie
Cpu(s):  2.2%us,  1.2%sy,  0.0%ni, 96.5%id,  0.2%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4054620k total,  2676888k used,  1377732k free,    63448k buffers
Swap:  4192252k total,    20176k used,  4172076k free,  1543016k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 1430 root      20   0  162m  52m  12m S    1  1.3   5:30.49 Xorg               
10474 joerg     20   0  270m  14m  10m S    1  0.4   0:00.45 gnome-terminal     
10512 joerg     20   0  180m  38m  16m S    1  1.0   4:21.04 skype-bin          
12353 joerg     20   0  485m  55m  22m S    0  1.4   2:24.93 chromium           
    1 root      20   0 12460  748  604 S    0  0.0   0:00.61 init               
    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd           
    3 root      20   0     0    0    0 S    0  0.0   0:00.03 ksoftirqd/0        
    4 root      20   0     0    0    0 R    0  0.0   0:05.16 kworker/0:0        
    6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0        
    7 root      RT   0     0    0    0 S    0  0.0   0:00.01 watchdog/0         
    8 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1        
   10 root      20   0     0    0    0 S    0  0.0   0:00.02 ksoftirqd/1        
   11 root      20   0     0    0    0 S    0  0.0   0:01.60 kworker/0:1        
   12 root      RT   0     0    0    0 S    0  0.0   0:00.01 watchdog/1         
   13 root       0 -20     0    0    0 S    0  0.0   0:00.00 cpuset             
   14 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper            
   15 root       0 -20     0    0    0 S    0  0.0   0:00.00 netns              


Keep in mind that ram is handled differently than under Windows. As i started with Linux i always was wondering why it uses all the ram up. Some reading about how Linux uses ram is helpful.
But i am not sure how long you use it and how much you know. Maybe you know that already.

Point is, you do need a swapfile and it should be matching your memory size.
If its to little you got a lot of swap going on which can lead to delays.

What you should look for is, if a process takes a lot of cpu power away. Also, Firefox eats memory really good. A lot of taps and you loose a lot of memory.
And yes, 1.3 GB of ram use is normal. You can compare to mine which is higher.

Actually you can help the Linux VM save anonymous memory pages to the swap area by increasing swappiness, from the openSUSE default of ‘60’.
This can free up more memory for use in disk cacheing. looking again at OP’s top output :

top - 12:08:05 up 31 min,  3 users,  load average: 0.52, 0.46, 0.51
Tasks: 193 total,   2 running, 191 sleeping,   0 stopped,   0 zombie
Cpu(s): 11.0%us,  6.3%sy,  0.0%ni, 69.9%id, 12.6%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   2054004k total,  2018884k used,    35120k free,    79208k buffers
Swap:  2110460k total,      100k used,  2110360k free,   592444k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                    
 1497 root      20   0  391m 293m  16m S   10 14.6   9:03.74 Xorg                        
 2193 andre     20   0 1057m 395m  39m S    9 19.7   4:21.98 firefox                     
 2022 andre     20   0  607m  95m  57m S    4  4.8   3:06.14 kwin                        
 2058 andre     20   0  797m  71m  35m S    4  3.6   0:42.22 plasma-desktop              
 2761 andre     20   0 1350m 134m  61m S    3  6.7   0:57.76 amarok

So if that was my system what would bother me is the lack of free Kernel memory pages “only 35 MB” which accounts for sluggishness when you do anything new, new pages must be freed, which is very likely to be the very program pages used by the bloaty user land applications Xorg, firefox, kwin & amarok. According to your “top” output, you are using very little swap (100k). So there shouldn’t be a problem of excessive paging out of anonymous memory, in fact the problem is most likely that program pages are being dropped too readily & there’s little spare memory to allocate, or use for buffering.

fir:~ # sw=/proc/sys/vm/swappiness; cat $sw; echo 100 > $sw; cat $sw 
60
100
fir:~ # 

Note this goes against all the common (over-simplistic) Net advice you read, where ppl “don’t want swapping”, but actually by keeping dirty anonymous pages in RAM, one simply has application pages chucked away and re-read in from (usuaully /usr) so let the Linux VM work, and save data from unused daemons into swap space. Fraid the distro’s got this wrong and Andrew Morton is right, from the testing I’ve done on memory tight systems. When memory is not tight running with swappiness set high, does no harm, as you rarely drop code pages backed by the system disk anyway.

Note it’s actually the “RES” sizes, not “VIRT” or 'SHR" that matters when selecting targets on low memory systems, which means “plasma-desktop” is relatively clean. You can use the “<” & “>” keys until you sort on the RES field. I’m tempted to say the OP should simply set FF options to restore the session on exit, close & restart it.

In past I have had KDE4 running well on machines with < 512MB of RAM, though using a lighter weight browser (try arora, midori, even opera + opera-kde4, possibly even upgrade FF5 upgrade & think hard about plugins before installing them). It may also be worthwhile upgrading to a new kernel from the Kernel teams Kernel:STABLE: repo Index of /repositories/Kernel:/stable/standard as there’s been some nice improvements lately, which could improve responsiveness (make sure you use kernel-desktop).

To install multiple kernel versions to try an upgrade out, edit /etc/zypp/zypp.conf, add an non-commented multiversion line for packages which provide “multiversion(kernel)” :

# multiversion = provides:multiversion(kernel)
multiversion = provides:multiversion(kernel)

You may look to get a fast USB key, one “Readyboost Capable” is ideal and format it for / (including /usr) onto it, so you don’t have issues with seek times. If you do that, make sure you run a regular “rsync” onto the original partition, and keep /boot on your hard disk, along with /home, /tmp & /var, which will benefit from lost of free space and speedy writes.

You might also obtain some benefit, from disk partitioning when you install, so Linux & disk buffer chaching are not defeated by spreading your system programs over the whole of the disk (with ext4), which doesn’t cluster files togather at the beginning of the disk, like old styel windows and certain defraggers do.

A very interesting post, and not just the part that I quoted. Thanks.

There’s an interesting news item on Heisse about one source of FireFox RAM consumption in JavaScript engine - Firefox developers locate a source of bloat - The H Open Source: News and Features
Basically our hero is Gregor Wagner, who’s found a way to reduce memory fragmentation & do regular garbage collection on FF’s memory pools in May & June, so FF7 ought to be far more frugal, in memory consumption, thus reducing memory pressure on the VM and thus becoming more responsive as fewer huge chunks are allocated, but the ones that are used are used less sparsly. Should be win-win all round.

Try FF7 if you like - according to release notes & Tech report they have indeed focussed on de-bloat & performance. I’m using Mozilla’s alpha download and it works - FireFox 7 - Mozzila’s Aurora download

12 tabs open and 335MiB RES

top - 11:17:32 up 17:53, 5 users, load average: 1.29, 0.90, 0.61
Tasks: 181 total, 1 running, 179 sleeping, 1 stopped, 0 zombie
Cpu0 : 7.3%us, 8.3%sy, 0.0%ni, 84.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 7.6%us, 6.3%sy, 0.0%ni, 86.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4054532k total, 2116996k used, 1937536k free, 86128k buffers
Swap: 4016244k total, 48k used, 4016196k free, 966940k cached

18954 ladm 20 0 683m 337m 29m S 11 8.5 5:54.05 firefox

ladm@fir:~> cat /proc/sys/vm/swappiness
100