Archive for: ‘November 16, 2011’

limiting the size of shared memory on Linux

November 16, 2011 Posted by admin

/dev/shm is nothing but implementation of traditional shared memory concept. It is an efficient means of passing data between programs. One program will create a memory portion, which other processes (if permitted) can access. This will result into speeding up things on Linux.

where can I use /dev/shm?

/dev/shm can help improve the performance of application software or overall Linux system performance. On servers that invoke the OOM-KILLER because the application is not playing nice we can limit /dev/shm

For example, if you have 4GB RAM and want to limit /dev/shm to 256M

# mount -o remount,size=256M /dev/shm