Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I change the size of the available shared memory on Linux?

root@thor:/home/omry# df -h | grep shm
none                  3.9G  3.9G  1.6M 100% /dev/shm

evidently 4GB is not enough for what I am doing (I need to load a lot of data into shared memory - my machine got 8GB of RAM).

share|improve this question

2 Answers 2

up vote 1 down vote accepted

It's a function of the amount of installed RAM by default. It's typically 50% of your physical RAM. Changing sizes will probably require creating a new ramdisk or remounting the existing filesystem with different parameters.

See: http://centoshacker.com/kabir/tuning/tuning-tmpfs-filesystemdevshm-for-centos.html

share|improve this answer
    
I`m using ubuntu 11.04, and it does not appear to have the tmpfs line in fstab. so there is probably a different way to change that on ubuntu. –  Omry Jul 17 '11 at 15:33
    
Thanks, adding to fstab worked –  Omry Jul 17 '11 at 15:49
    
centoshacker.com looks dead/having problems - I get an http response but the content length is zero. –  user78916 Aug 2 '13 at 8:36

Modify one of the tmpfs-specific mount options on /dev/shm in /etc/fstab. See the Mount options for tmpfs section of the mount(8) man page for details.

share|improve this answer
    
see my comment to ewwhite –  Omry Jul 17 '11 at 15:33
    
Entering it into /etc/fstab should override the default mount for /dev/shm. –  Ignacio Vazquez-Abrams Jul 17 '11 at 15:35
    
Thanks, it worked. I have to accept the other question as an answer as it was the first one. –  Omry Jul 17 '11 at 15:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.