User Tools

Site Tools


ramdisk

How-to setup a ramdisk mounted to /tmp

In general it makes sense to reduce the number of write transactions on a SD card, because they are limited. Especially when raspistill and MJPG streamer are used in combination, it is highly recommendable to use the ramdisk for the picture output of raspistill.

Change the following config parameter in the file /etc/default/tmpfs:
(Root rights are necessary to modify the file, so use “sudo” in front of the editor command.)

# mount /tmp as a tmpfs.  Defaults to no; set to yes to enable (/tmp
# will be part of the root filesystem if disabled).  /tmp may also be
# configured to be a separate mount in /etc/fstab.
RAMTMP=yes

Reboot the Raspberry PI afterwards:

sudo reboot

Now the ramdisk should be mounted to /tmp. This can be checked with this command:

df

The result should contain this line (the numbers can/will be different):

tmpfs              76740       0     76740    0% /tmp
ramdisk.txt · Last modified: 12.10.2013 18:56 by derk