Red HatThis forum is for the discussion of Red Hat Linux.
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.
My 384M PC seems to be missing about 25 meg of RAM. I did an "init 1" to get into single user mode and, as you can see from the process listing at the bottom of this post, the sum of memory used by running processes isn't anywhere near what the command "free" shows for the amount used:
The running processes use less than 2M, yet the above shows 27M used (without the cache), so it seems like there is about 25M of memory missing. My first thought was that it's used by the OS, but according to /var/log/dmesg the OS memory is:
So it looks to me like the OS memory (about 11M) has already been deducted from the total shown by the "free" command (although there's a 2M discrepancy between the two numbers that I can't explain).
The reason for all of this is that I'm trying to run a program which used to work fine in Redhat V5.2 but since upgrading to V9 it won't run without excessive paging that kills the performance. The program is 364M and it was a tight fit on V5.2 but it ran with no paging at all (after initial startup). It wouldn't surprise me to find that I need to make a smaller V9 OS kernel, but how do I show how much space the kernel is taking (assuming it's more than what dmesg shows)? If it's not the OS then where's the other 25M of RAM?
--------------------------------------------------------------------------------------
Entire process list while in single user mode:
Ok, apparently nobody wanted to look at this because the tables were munged by LQ's display, so now I've put them in fixed font and they're much more readable. Which by the way, is there an easier way of doing this? To make the tables readable I had to replace spaces with underlines and change the font to "fixed" since that's not one of the choices under the font button.
Here's the whole post again with more readable tables:
My 384M PC seems to be missing about 25 meg of RAM. I did an "init 1" to get into single user mode and, as you can see from the process listing at the bottom of this post, the sum of memory used by running processes isn't anywhere near what the command "free" shows for the amount used:
The running processes use less than 2M, yet the above shows 27M used (without the cache), so it seems like there is about 25M of memory missing. My first thought was that it's used by the OS, but according to /var/log/dmesg the OS memory is:
So it looks to me like the OS memory (about 11M) has already been deducted from the total shown by the "free" command (although there's a 2M discrepancy between the two numbers that I can't explain).
The reason for all of this is that I'm trying to run a program which used to work fine in Redhat V5.2 but since upgrading to V9 it won't run without excessive paging that kills the performance. The program is 364M and it was a tight fit on V5.2 but it ran with no paging at all (after initial startup). It wouldn't surprise me to find that I need to make a smaller V9 OS kernel, but how do I show how much space the kernel is taking (assuming it's more than what dmesg shows)? If it's not the OS then where's the other 25M of RAM?
--------------------------------------------------------------------------------------
Entire process list while in single user mode:
I think you have those 25 Mb of RAM missing because the system is reserving those for the resident prgorams, remember Linux works with a protected memory scheme. This is the ouput of 'free' on my system:
The code tags work better then what I was doing for displaying tables, thanks for the tip.
As to the 25M of memory, is there somewhere a person can look to see the amount of reserved spaced designated in a config file? I'm assuming by resident programs you're talking about the kernel. I'm also assuming that the amount of reserved space can be adjusted by changing parameters or rebuilding a new kernel. Correct me if any of these assumptions are wrong.
There's really 36M involved here because the total shown by "free" has already deducted 11M for the OS from the 384M total and then there's the other 25M that is shown as used even though there is nothing apparent that is using it (reserved space). So I guess my question really is, why the heck does the OS need all this space and how do I make it use less?
The only thing I can come up with regarding these blocks of Memory is to ask you what services do you have running (I mean if you have any services running at all) to find out you my run the command:
Code:
# service --status-all
This will output how many (and which) services you have running, some of them may have reserved space, hence showing you that there's an extra 25M reserved by currently executing programs (and drivers for that matter; although the program may not be of that size currently, as reported by say top or ps)
It's the hallmark of a truly dysfunctional OS when memory magically disappears & later re-appears. This is the type of thing I would expect from an ms-windows OS but not from Linux. But that is what happened after I re-booted the machine. The good news is that the memory freed up and I am now able to run the program, the bad news is that there is no explanation for what happened which means that it will probably happen again. At this point, I will re-direct my efforts toward searching for kernel patches that deal with memory leaks and hope for the best. Thanks to all who replied.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.