[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: system resource measurement



Mark Grieveson wrote:
> Hello.  Is there a command line utility for system resource
> measurement?

Try 'ps -el' or a custom query with ps.  The "SZ" field is the number
of pages of memory used by the process.  Pages are 4096 bytes.  Or you
might try 'free' both before and after starting a process and after
exiting the process and subtracting the difference.

Because pages may be shared it is not completely simple to get an
accurate measurement of the amount of pages used incrementally any
particular program.

> I have an old Pentium III (450 MHz, 384 MB ram) and normally I use
> gnome, but I've been experimenting with other desktop environments
> and/or window managers.  I'm not convinced that I'm any better off
> though (my computer still sometimes freezes, especially when using
> mplayer, even when using a supposedly low resources window manager).

Use 'vmstat' and look at the si/so (swapin/swapout) fields.  You may
be swapping.

A healthy system IMHO will have a reasonable amount of free space for
filesystem buffer cache.  There are various ways to show this.  The
'htop' command will show a curses based picture of it.  Another
alternative is 'cat /proc/meminfo' for the raw data.

I think 'htop' makes this visible in the easiest to use way.  If you
have X running then 'xosview' is an X based program also very useful
for this.

Don't be misled and look at free memory as an indicator.  Linux will
optimize free memory as low as possible by putting it to work as
filesystem buffer cache.  That is a good thing.  Free memory is memory
that is not working for you.  Look at used memory as how much memory
applications on your system are using in total.  You want enough left
over to supply a reasonable filesystem buffer cache.  If filesystem
buffer cache suffers then performance suffers because all disk I/O
will be out of cache and will have to wait for the disk synchronously.

> The one that seems the best is ion2, but I also like my
> fluxbox setup, and xfce is okay.

You might also want to look at FVWM.  FVWM was developed on and for
low memory laptops.  It is probably considered old-school today but I
still use fvwm daily on my fully decked out desktop.

Bob



Reply to: