[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: no memory
MAllen@flashmail.com (Matt Anderson) writes:
> I'm not really sure why my computer is reporting this. I am
> running Red Hat 6. I have 128 mb of physical ram, and a 260 mb swap
> file. When I'm using Gnome it feels quite sluggish and reports 98%
> memory being used. It clears up a little when I switch over to
> KDE, but only lowers to about 92%. I only have the services
> running that are enabled by default. Also this is reported at boot
> up, not after I've been running the system for a while. What could
> possibly be hogging up my system?
Unix systems, including Linux, like to run with almost all of their
RAM in use -- apart from a few megabytes in reserve. In a normally
functioning system, a large chunk will be taken up by disk cache and
disk buffer. Linux figures if you're not doing anything else with it,
it will just go to waste.
When you type "free", the number that really indicates how much RAM
you have available is "free + buffers/cache," in my case 108848:
total used free shared buffers cached
Mem: 126784 91232 35552 13376 43352 29944
-/+ buffers/cache: 17936 108848
Swap: 262248 32 262216
If that number honestly is low, then yes, something is taking up a
lot of RAM in your system. Try "top" first to see if there's a
process chewing up your CPU (that's the first place to look if you're
having performance problems).
If top doesn't identify anything, take a look at what your largest
processes are. Do a "ps auwx --sort=rss" which will put the most
RAM-hungry processes at the bottom. On my system:
USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND
[...]
jamie 528 0.1 1.0 6856 1352 p0 S 21:55 0:00 -bash
root 295 0.0 1.1 2448 1432 ? S Jan 19 4:53 xntpd
root 330 0.0 1.2 8160 1528 ? S Jan 19 0:00 sendmail:
root 526 0.1 1.3 10224 1760 ? S 21:55 0:00 /usr/local/sbin/sshd
--
Jamie McCarthy
jamie@mccarthy.org
http://jamie.mccarthy.org/