Skip to main content

/proc/meminfo explained

I recently had a question about Linux that created more questions the longer I thought about it. The question was: "Given the app doesn't care, would you recommend 32 bit or 64 bit Oracle Linux for a server?"
Driver compatibility plays a part, as does the amount of RAM the app needs. If you need more than 4 GB of RAM, you'll have to use a 64bit kernel... or do you...?

I'm still not absolutely sure about it as information is a bit ambiguous. While some say you cannot allocate more than 3.7 GB of RAM to any one process on a 32 bit machine, using PAE,
others say to just check free -m or vmstat. Red Hat lists /proc/meminfo as a good source of information and explains what you see there. All said and done, I still don't know for sure.

I have a VM with 4 cores and 8 GB of RAM, and it says:

[root@server ~]# uname -a
Linux server 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux
[root@server ~]# cat /proc/meminfo
MemTotal: 8054844 kB
MemFree: 6638196 kB
Buffers: 248500 kB
Cached: 363020 kB
SwapCached: 0 kB
Active: 1037180 kB
Inactive: 167692 kB
HighTotal: 7208896 kB
HighFree: 6241920 kB
LowTotal: 845948 kB
LowFree: 396276 kB
SwapTotal: 2097144 kB
SwapFree: 2097144 kB
Dirty: 796 kB
Writeback: 0 kB
Mapped: 676496 kB
Slab: 188576 kB
CommitLimit: 6124564 kB
Committed_AS: 1886648 kB
PageTables: 6192 kB
VmallocTotal: 106488 kB
VmallocUsed: 3784 kB
VmallocChunk: 102324 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 2048 kB

So it sees 8 GB, has 6 GB free, the application uses 245 MB and about 1 GB of RAM is marked as active. Another VM has similar numbers.
Using the 'free' command I get:

[cpeper@l0292 ~]$ free -m
total used free shared buffers cached
Mem: 7866 1382 6483 0 242 354
-/+ buffers/cache: 785 7081
Swap: 2047 0 2047

So 7.8 GB free (difference due to 1024 bytes per KB vs 1000 bytes per KB and some kernel and buffer usage either subtracted or not). 1.3 GB used and the application uses 785 MB.

I simply can't find one server that really approaches the RAM limit... yet... Guess I'll try to use the Java VM test. Incidentally, Red Hat and Oracle Linux version 5 and higher support PAE.

Comments

Popular posts from this blog

Preventing PuTTY timeouts

Just found a great tip to prevent timeouts of PuTTY sessions. I'm fine with timeouts by the host, but in our case the firewall kills sessions after 30 minutes of inactivity... When using PuTTY to ssh to your Linux/Unix servers, be sure to use the feature to send NULL packets to prevent a timeout. I've set it to once every 900 seconds, i.e. 15 minutes... See screenshot on the right.

Tuning the nscd name cache daemon

I've been playing a bit with the nscd now and want to share some tips related to tuning the nscd.conf file. To see how the DNS cache is doing, use nscd -g. nscd configuration: 0 server debug level 26m 57s server runtime 5 current number of threads 32 maximum number of threads 0 number of times clients had to wait yes paranoia mode enabled 3600 restart internal passwd cache: no cache is enabled [other zero output removed] group cache: no cache is enabled [other zero output removed] hosts cache: yes cache is enabled yes cache is persistent yes cache is shared 211 suggested size 216064 total data pool size 1144 used data pool size 3600 seconds time to live for positive entries 20 seconds time to live for negative entries 66254 cache hi...

Dell Linux - OMSA Hardware Monitoring

Just getting started using Dell's OpenManage Server Administrator (OMSA) on our Oracle Linux platform. There are some confusing instructions going around so it's not immediately clear what to do, hence my blogging here. :) There is a site on Dell - Hardware Monitoring , as well as a wiki with instruction on how to setup their OMSA tooling using yum or up2date. [update]My first update for their instructions: be sure your server has Internet access, as most servers will use a proxy or so. use export http_proxy=http://yourproxy.example.com:port to configure it just for the session, and setup up2date to use an HTTP proxy by editing the settings in /etc/sysconfig/rhn/up2date .