Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
vmstat -s gives you a realistic picture of memory usage, but doesn't tell you what is eating that memory. Chances are that a very large part of that used memory is buffer. Linux will use free memory as a buffer for hard drive acces.
This way, when you try and read or write to the hard drive, you don't have to wait quite as much. Linux will free the memory if it becomes needed for an application. If you want a more realistic view of your usage, try looking at top. This section will give you a more realistic view of the situation.
Like any good virtul-memory operating system, Linux prefers for nearly-100% of the physical RAM to be doing something, all the time, even if it's only something that "might possibly" turn out to be useful. Something is, after all, better than nothing.
In the case of "buffers," for example ... when you read a file or load a program, Linux might read a whole lot of that file (or maybe all of it) into a buffer in virtual-memory. When the immediate use for that memory-buffer is done, Linux releases the buffer but does not immediately get rid of it. There's a fairly good chance that you'll be needing that file or that program again soon, and if that turns out to be the case, then by being "lazy" Linux has proved to be very efficient.
When, and indeed if, actual memory-pressure does develop, then Linux has a multi-tiered approach in dealing with it. It'll reduce the buffer-space, consuming that memory first, before moving on to more draconian measures like "serious swapping."
If you're concerned about whether memory is a problem, what you want to look for is processes being subjected to involuntary waits, due to swapping, for a significant amount or percentage of time. In other words, "is the situation actually slowing anybody down?" Mind you, a certain amount of swapping is normal... sometimes Linux "pre-loads" stuff into the swap-area.