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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
after booting linux and KDE,
`vmstat -s`
gives me the following info:
Code:
246672 total memory
239920 used memory
199976 active memory
25236 inactive memory
6752 free memory
Now, 6752 as "free" memory is quite little. Question is, does that really reflect reality (as in the amount of memory that I really have available for my applications".
Otherwise I have something that eats a serious amount of resources.. :O
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.