OpenBSD: /tmp in memory


My laptop is equipped with a reasonable amount of memory (8 Gb), never used in its entirety. Surplus memory can be used, for example, for memory file systems, and /tmp in particular. Simply edit /etc/fstab and comment the /tmp line if exists. After that add a new line like:

#/tmp 512Mb Memory File System
swap /tmp mfs rw,noatime,nodev,nosuid,-s=1024000 0 0

The size is expressed in sectors. Normally a sector is 512 bytes.

The change will be effective on next reboot or unmounting/mounting /tmp (be careful if there is daemons or applications using it).

About jjjesss

I'm a guy interested in technology, bsd fan and concerned about the world around.
This entry was posted in BSD, OpenBSD. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s