Ram use

Smoot Carl-Mitchell smoot at tic.com
Sun Jun 21 03:06:42 UTC 2009


On Sat, 2009-06-20 at 16:13 -0600, Karl Larsen wrote:
> I was curious to determine if Kubuntu uses more RAM than Gnome. 
> Since I have both on my laptop in version 8.10 I decided to try to 
> measure this. I used top to get the data and I saved the part needed to 
> gedit which you can get on both kubuntu and gnome. I took data at 10 
> minutes after boot-up. Here is the data:

You need to be careful about how you interpret these kind of results,
especially on a demand paged virtual memory system like Linux.  The more
critical measure for responsiveness (which I think is the critical
measure for a desktop system)is likely the paging rate and especially
the pageout rate.  Paging is very expensive when compared to memory
access time. vmstat is a crude, but useful tool to measure this sort of
metric.  If you run:

vmstat 5

watch the si and so columns, especially the so column which is the page
out rate to swap.  That is a measure of pages being written to the swap
device(s).  iostat which is part of the sysstat package can also be
useful.

A more useful test would be to run vmstat 5 or iostat and then operate
the desktop in a typical fashion and see what the paging rate looks like
over time.  If you have sufficient memory the page out rate should be
very low.  A high paging rate indicates memory starvation and the system
will start to thrash.  In vmstat you will see processes blocked waiting
for I/O.

With all this said, I do think running Gnome or KDE with 1GB of memory
is a tad tight with a typical desktop mix of applications.  But memory
is very cheap these days and adding memory can be a lot simpler and more
cost effective than trying to optimally tune up the virtual memory
system.

I run a Linux server with 1GB of RAM.  It is interesting to watch the
memory utilization over time.  The graphs are here:

http://www.c-m.us.com/~smoot/RRD

What you see is the buffer and cache utilization go up significantly
when the system does a lot of I/O.  The spikes in the graphs corresponds
to when I run an rsync cron job to do nearline backups.  The "free"
memory pool stabilizes at a low percentage over time.  
-- 
Smoot Carl-Mitchell
Computer Systems and
Network Consultant
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list