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.

Removing VGs or LVs from LVM

While are many excellent tutorials about creating and using LVM on Linux, not may show you how you can remove disks from LVM Volume Groups (VG) and reclaim storage or how to remove a Logical Volume (LV) from your LVM set-up. Here is what I did: Use -t to TEST ANY LVM action first! We are going to release 1 TB from LVM. The Volume group was extended with 1 TB storage to serve as a cheap NFS/CIFS file server when setting up our data center. It is now deprecated and replaced by a NAS so it's no longer needed. 1) check LVM; note the four 256 GB LUNs [root@server ~]# pvscan -v Wiping cache of LVM-capable devices Wiping internal VG cache Walking through all physical volumes PV /dev/sdb1 VG vgdata lvm2 [50.00 GB / 0 free] PV /dev/sdc1 VG vgdata lvm2 [256.00 GB / 0 free] PV /dev/sdd1 VG vgdata lvm2 [256.00 GB / 0 free] PV /dev/sde1 VG vgdata lvm2 [256.00 GB / 0 free] PV /dev/sdf1 VG vgdata lvm2 [256.00 GB / 0 free] PV /dev/sdg ...

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 .