Raspberry Pi Optimization

Some optimization made to my new Raspberry Pi!

In /boot/cmdline.txt added:

rootflags=commit=120,data=writeback elevator=deadline

Which set at boot time filesystems optimization (I’m using ext4) for journaling (writeback mode, and journal commit set to 120s (5s by default). Also changed the FS scheduler to deadline which is supposed to be less i/o intensive than cfq or noop.

In /etc/fstab options for the rootfs:

noatime,errors=remount-ro,barrier=0,data=writeback,commit=120
  • noatime, to do not set the acces time on files, so less i/o ;
  • barrier=0, to deactivate barriers (better performance, less security for FS corruption) ;
  • data=writeback and commit=120, to keep in relation with the booting options.

In /boot/config.txt:

gpu_mem=16

Which set the minimal possible value of memory allocation of the GPU (cause I’m in headless mode, with no X server) to 16MB.