How do I change tmpfs default size?

Anders Häggström hagge.ubuntu at
Sun May 27 18:12:52 BST 2007

Hello, I don't know exactly where to post this question so I try here.
If I'm wrong, please correct me.

I'm installing an Ubuntu Feisty server which will run entierly in
ram/swap (tmpfs), started by a usb-drive which will detach itself
during the boot process.

The default size of every tmpfs-mountpoint is 50% of availible
ram+swap, as far as I understand. I want to change that default
setting but don't know how.

there is a file /etc/default/tmpfs where I can change the size of
/dev/shm and a text that tells me that if SHM_SIZE is not set it will
defaults to TMPFS_SIZE. But if I add TMPFS_SIZE=32M it will not work.

I've read something about a hardcoded default in mm/shmem.c

The only way I can figure it out as a workaround is to use -osize=32M
on every mount if I don't want to rebuild my kernel (and I don't).

If the value of TMPFS_SIZE is hardcoded I would sugest puting a
variable in /etc/default/tmpfs

// Anders

More information about the upstart-devel mailing list