Where did my memory go?
One of our new servers is sucking up a ton
of the memory. Nearly all of the 2GB RAM.
Of course, ps aux and everything says 0%.
Is there something I can do to see what apps
are taking up all of the memory? The "free"
memory (viewing with top) remains about the
same, so I do not think it is a memory leak.
That is how linux is. It will use most available memory for file cache buffers
Exactly. As long as there is free memory, it will continue to cache what it has read from the disks. I almost never have any free memory as inidicate in the free column in the output from free(1).
On the other hand, it doesn't hurt. If a program needs more memory, the kernel just discards an old cache page and maps it the the program's process, and while it has the information cached, it doesn't need to re-read it from the disk it was first fetched from, so it makes disk access a lot faster.
To find out how much RAM is available to your programs, take the value in the "cached" and "buffers" columns and subtract their sum from the "used" column.
This server has a problem that is "stalls" from
time to time. Everything seems to come to a
halt for a couple seconds. Saving to Samba,
checking imap/pop3 email, or just entering a
command on the console. I was thinking that
the memory was too low and it was thrashing
the swap file. Maybe that is not the case.
Does anyone have 150GB (or even larger) ext3
partitions? I have been told by some people w/
200GB+ that they had no problems. But that is
the only difference between this box and many
of the others that we run (with no problems).
I would probably write a script that monitors your system with vmstat and have it send you an email with the stats if they reach certian values. I would keep a close look at the iostat portion if you think it is doing heavy read/writes when it stalls.
So far, I have been instructed to try upgrading
Samba to the latest and adding "noatime" to the
partition in fstab. I do not know what the means
(still need to do some more research on that).
noatime disables atime. Basicly your telling your system not to update the inode access time each time it is accessed. It will increase disk performance slightly.
I was just thinking, check your cronjobs. Make sure you dont have some job running that takes up most of your resources.
What will I notice different if I use noatime?
File date/time stamps do not work? Or does
it work on a lower level than I am thinking?
Timestamps will still function the same way. The inode itself kinda has a timestap which you really dont need. When you go to access a file, the system will update the timestamp on the inode it is accessing.
http://www.linuxforums.org/viewtopic.php?t=1362 <- that is a good dicussion on fat32 and ext2 filesystems if you don't know what an inode is.