Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running Ubuntu 11.10 desktop on a couple of 8G RAM Wintel boxes. Both have been created automatically by the default installer with a 1.6GB tmpfs /run partition, where I suspect this amount of RAM could be more usefully used elsewhere in the system. I suspect that the installer takes 20% as the default, which is probably OK for boxes with lots less RAM, but seems overkill for an 8GB system. My question is - can I change its size, if so, how, and what are the risks in doing so?

The /run partition does not appear in the /etc/fstab file so it must be set up elsewhere.

share|improve this question
add comment

2 Answers

The size of a tmpfs partition is its maximum size. Only the part that's actually used takes up virtual memory (RAM or swap). Making the maximum size smaller will not save any memory.

It's unlikely that /run will take up more than a few megabytes. On the other hand, there's zero advantage to reducing the maximum size.

The non-disk filesystems used by the system (/dev, /proc, /sys, /run and a few others) are created by boot scripts in /etc/init and /etc/init.d. Don't edit those files unless you know exactly what you're doing.

share|improve this answer
    
Thanks very much for the feedback - you've given exactly the info I needed. I'm already using my own tmpfs partition to hold temp data for a java application I've written, and the /run partition just seemed very large in comparison. However the key thing is that the size is the maximum, rather than as actually allocated memory. Thanks again. –  Stevod Apr 15 '12 at 17:14
add comment

It is automatically pushed into swap when the kernel expects that RAM can be used more effectively otherwise. Check Wikipedia for more elaboration on this subject. Linux is highly optimized to use RAM as effectively as possible. Memory unused is money wasted.

Here is the official kernel documentation.

share|improve this answer
    
Thanks for the response - had already seen both the wikipedia and kernel docs, it just wasn't clear what the run partition was for, and that it was a maximum rather than actually allocated memory. –  Stevod Apr 15 '12 at 17:16
add comment

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.