Re: Is /dev/shm needed?

Robert Love
2001-12-16T22:30:26Z

On Sun, 2001-12-16 at 17:02, RaúlNúñez de Arenas Coronado wrote:

> I don't know if /dev/shm (mounted with shmfs or the newer tmpfs)
> is needed for proper SYSV IPC operation with newer (2.4.16 and newer)
> kernel. Anyone can help?

It is not needed. /dev/shm mounted with tmpfs is only needed for POSIX
shared memory, which is still fairly rare. SysV IPC will work fine.

> Moreover: I want to move my /tmp from disk to tmpfs for speed (I
> make a lot of compiling, so I think it would help). Is this a good
> idea? If so, what size can be appropriate for a small system that is
> not permanently running?

Some say it helps, others don't. Solaris has a similar feature, and it
seems to work for them. However, Linux is light and our page-cache
works well. Not so sure it is ideal.

In other words, if you have memory to spare and the data ought to be
cached, Linux probably will cache it anyhow. On the other hand, if you
have lots of memory to spare, give it a try. Mount /tmp or all of /var
in tmpfs.

It is dynamic, so you don't need to specify a size. If you want to give
a maximum size (probably a good idea), give one. Depends on what your
tmp usages are and how much free memory you have.

Robert Love