View previous topic :: View next topic |
Author |
Message |
pekster n00b
Joined: 19 Jun 2005 Posts: 20
|
Posted: Mon Aug 20, 2007 12:46 pm Post subject: udev 114 and /dev/shm size |
|
|
I just upgraded from udev 104-r13 to udev 114 and have a question about the default /dev/shm size.
It seems part of the config updates to /etc/udev/udev.conf include a new 10M limit on the tmpfs filesystem mounted at /dev/shm. I've been using this space for some script output so that I can do some processing before attaching the output in automated emails, and I might need up to 70M or so of space. My concerns are:
- Is the tmpfs_size variable in /etc/udev/udev.conf going to restrict the maximum available space on /dev/shm?
- Should I be using /dev/shm in this way, or am I better off creating a separate tmpfs partition and leave /dev/shm alone?
- I've read the tmpfs kernel documentation, but am unclear on swapability. Can I safely make this reasonably large even though some boxes only have 256M of RAM? (hypothetically say I wanted this larger than my available RAM)
Thanks for any assistance in understanding tmpfs. |
|
Back to top |
|
|
Rob1n l33t
Joined: 29 Nov 2003 Posts: 714 Location: Cambridge, UK
|
Posted: Mon Aug 20, 2007 1:08 pm Post subject: Re: udev 114 and /dev/shm size |
|
|
pekster wrote: |
Is the tmpfs_size variable in /etc/udev/udev.conf going to restrict the maximum available space on /dev/shm?
|
No, as it says in the config file:
Quote: | # The maximum size reserved for the tmpfs mounted on /dev |
The setting will only affect the /dev filesystem.
Quote: |
Should I be using /dev/shm in this way, or am I better off creating a separate tmpfs partition and leave /dev/shm alone?
|
You should be okay - it's meant to be used as shared memory by applications so yours is a similar use case.
Quote: |
I've read the tmpfs kernel documentation, but am unclear on swapability. Can I safely make this reasonably large even though some boxes only have 256M of RAM? (hypothetically say I wanted this larger than my available RAM) |
That looks to be safe enough, yes - the documentation says that swapping is done as needed. You're liable to run into major performance issues once it starts swapping though. |
|
Back to top |
|
|
gemini91 Guru
Joined: 27 Nov 2003 Posts: 317 Location: Naples, Fl
|
Posted: Mon Aug 20, 2007 2:26 pm Post subject: |
|
|
I get this error when trying to bring up Win4LinPro
You do not have enough space in '/dev/shm' for the 128 MB of QEMU virtual RAM.
To have more space available provided you have enough RAM and swap, do as root:
umount /dev/shm
mount -t tmpfs -o size=144m none /dev/shm
If I do that manually it works, but trying to change udev I get this
with /etc/udev/udev.conf tmpfs_size="144M"
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda7 38448276 18551284 17943892 51% /
udev 147456 216 147240 1% /dev
cachedir 4096 80 4016 2% /lib/splash/cache
/dev/hda5 28834716 14515004 12854988 54% /mnt/hda5
none 126492 0 126492 0% /dev/shm
/dev/hda6 28834716 9248388 18121604 34% /media/_
/dev/hda8 27868244 3279284 24306320 12% /media/_12
/dev/hda1 45130 6822 35900 16% /media/_boot
with /etc/udev/udev.conf tmpfs_size="10M"
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda7 38448276 18551460 17943716 51% /
udev 10240 216 10024 3% /dev
cachedir 4096 80 4016 2% /lib/splash/cache
/dev/hda5 28834716 14515004 12854988 54% /mnt/hda5
none 126492 0 126492 0% /dev/shm
/dev/hda8 27868244 3279284 24306320 12% /media/_12
/dev/hda6 28834716 9248388 18121604 34% /media/_
/dev/hda1 45130 6822 35900 16% /media/_boot
How can I change the size of shm automatically ? |
|
Back to top |
|
|
Rob1n l33t
Joined: 29 Nov 2003 Posts: 714 Location: Cambridge, UK
|
Posted: Mon Aug 20, 2007 2:42 pm Post subject: |
|
|
gemini91 wrote: | I get this error when trying to bring up Win4LinPro
You do not have enough space in '/dev/shm' for the 128 MB of QEMU virtual RAM.
To have more space available provided you have enough RAM and swap, do as root:
umount /dev/shm
mount -t tmpfs -o size=144m none /dev/shm
If I do that manually it works, but trying to change udev I get this
with /etc/udev/udev.conf tmpfs_size="144M"
How can I change the size of shm automatically ? |
The udev config entry has nothing whatsoever to do with /dev/shm. They're totally separate mount points. If you want to alter the parameters for the /dev/shm mount, then just add the options to /etc/fstab as with any other filesystem. |
|
Back to top |
|
|
gemini91 Guru
Joined: 27 Nov 2003 Posts: 317 Location: Naples, Fl
|
Posted: Mon Aug 20, 2007 3:10 pm Post subject: |
|
|
Thanks for the reply, I never realized that there was a size option under options in the fstab.
I guess because I never saw it used. |
|
Back to top |
|
|
|