![]() |
|
#1
|
||||
|
||||
Linux Server Memory QuestionsSome of you know that I recently leased a new web server for the sites. This new server is supposed to be set up with 1 GB worth of RAM. I have 2 questions about this (questions in bold).
When I type cat /proc/meminfo, this is what I see... Code:
My first question: Is 1 GB equal to 970780 kB? When I type top -- on the memory line, I see something like this: Code:
From all my previous experiences using this command, I have never seen so much free memory. From what I have heard and read about Linux and how it uses memory, I think this is quite odd. The 768428k free bit is what concerns me... Why is there so much free memory? This is on a CentOS 4.3 Linux web server. <mod edit>The Solution.</mod edit> __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ Last edited by admin : 28-May-2006 at 12:04.
Reason: Inserted link to final solution
|
||||
|
#2
|
|||
|
|||
Re: Linux Server Memory QuestionsAs to your first question, that is really close to one GB. However Most of the machines I have with 1Gb all have > 1000000kB.
Secondly it seems really strange to have that much free memory. I don't use CentOS, I use Debian so there is a difference there and perhaps your webserver is running 0 extra processes. But that seems really unlikely. Here are a couple of my systems: My laptop (only I use this): Code:
A file server (not under heavy use at the moment since the office isn't open yet, however it is running some backups): Code:
My office webserver (not a heavily used server either): Code:
My personal mail server (there are 3 users of this machine, incredibly low usage but a lot of mail volume and a lot of file server activity): Code:
From one of my sites hosted at dreamhost.com (I would imagine extremely heavy usage): Code:
From another site hosted at advancednetworkhosts.com Code:
All of these systems are Debian except the Mail server which is Fedora and the advanced networks one is RedHat Enterprise Edition. So I will let you decide for yourself if > 700 Mb of mem free makes since but to me it sounds a little far fetched. If this continues to sound fishy to you I would recommend you try rkhunter (www.rootkit.nl) just incase you got hacked and don't know it. This could be something a rootkit would do. Nick |
|
#3
|
||||
|
||||
Re: Linux Server Memory QuestionsA Gigabyte of Memory would actually be equal to 1,048,576 Kbytes I believe (1024x1024). So no, the 970 shown is not quite a gigabyte.
I don't think it is terribly uncommon for the total memory to show less than what is there. On my system with 512Mbytes (524,288 Kb) it shows as 514552 available. I think there is just a bit of overhead with BIOS, etc that takes some of the available memory. Also, it is quite possible that your video card is using shared memory which would account for the decrease. I agree with nniehoff about the memory free. In my experience, Linux does not leave free memory lying around. I have a fairly lowly taxed system that currenlty has 9004 Kb of 644576 available. Linux memory management seems to leave memory occupied until it needs it. This is not centOS either. Perhaps centOS is using a different memory management algorithm? I will look into this and see if I can find out anything. I wouldn't worry too much about this unless it is causing you problems. I am more curious about the centOS memory manager. Does anyone have any experience with centOS? __________________
The best damn Sports Blog period. |
|
#4
|
||||
|
||||
Re: Linux Server Memory QuestionsThank you for your feedback guys. I appreciate it.
My previous server was a CentOS 4.3 too. And it also had VERY little free memory "lying around" On the VPS before that, with 4GB RAM (I think), the server also reported nearly all the memory was in "use". I always knew that this is how Linux managed it's memory, grabbing (nearly) everything it can detect -- so seeing over 700MB of free memory on this new server was quite a shock to me. My web host is convinced this is normal __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
||||
|
||||
Re: Linux Server Memory QuestionsIn looking a bit closer at the memory of both what you and Nick posted and comparing it with mine I noticed that your file caching is significantly smaller than anything Nick posted as well as my systems.
On most of my systems file caching takes about 50% of available memory. There are two explanations that I can think of:
This has been pretty interesting to look into actually. Keep us posted on what you find out J. Cheers! __________________
The best damn Sports Blog period. |
|
#6
|
||||
|
||||
Re: Linux Server Memory QuestionsI will update this thread as soon as I figure it out myself. I will try asking for help on other web hosting forums as well, just to get more opinions and comments.
Right now, I know the server is handicapped. It's running as though it has only 256Kb of physical memory. I know this because swap memory is being used and it grows over the course of the day while the (over) 700MB free memory is left untouched. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#7
|
||||
|
||||
Re: Linux Server Memory QuestionsQuote:
ahhh... I didn't realize that! Yes this would be a big concern to me as well. I will let you know if I can find anything else... __________________
The best damn Sports Blog period. |
|
#8
|
||||
|
||||
Re: Linux Server Memory QuestionsI had some time and did some detective work. Now, I would like to say I understand very little of what I found in a concrete way. Conceptually I think I understand the problem enough to offer some insight though. After my searches, I think I may not understand it very well though.
Perhaps though, someone reading this will find the information useful and share some solutions rather than some filtered information.It seemed to me, you were running against a glass ceiling of sorts when it comes to your memory. I thought for some reason your CentOS does not believe that there could possibly be more memory. (remember that bit above about me not knowing what the heck I'm talking about) Now, that was the reason for my search terms. To that end, I found a couple of links that might help. Not exactly what I thought I might find, but they seem related to your problem. CentOS Forum So for some odd reason I ended up in the docs for 4.3 and got as far as the next link before realizing I was in danger of drowning from info overload for an OS I don't even have. CentOS 4.3 docs One of the respondants in the first link points to a weath of information that can only be described as a religous experience. I think I made it down a quarter of the page and blacked out. Here is that link. Swappiness Debate Anyhow, my assesment, recompile the kernal and keep your fingers crossed. It seems to be a common theme in my findings. I'd be curious to hear if you have made progress JdS. HTH, Mark todays moral - assume you know nothing especially when you think you know the answer __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Selling Server | darkneal128 | Managed / Dedicated Servers | 4 | 28-Mar-2006 18:01 |
| Making a home linux server | crystalattice | Computer Software Forum - Linux | 6 | 16-Jan-2006 16:08 |
| Memory de-allocation during debugging | gaoanyu | C Programming Language | 12 | 19-Dec-2005 05:50 |
| Pointer Usage in C++: Beginner to Advanced | varunhome | C++ Forum | 0 | 19-Aug-2005 10:25 |
| [Tutorial] Pointers in C (Part I) | Stack Overflow | C Programming Language | 1 | 08-Apr-2005 19:35 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The