Various things you may wish to configure to optimize use of flash storage, such as CompactFlash card, MMC/SD card, or Solid State Drive (SSD), include:
- allow the flash controller to reclaim sectors with the TRIM command
- changing frequency of flushing writes
- disabling, by circumvention, synchronous writes for some applications
- changing which IO scheduler is used
- reducing amount of data written to the flash storage.
Contents
Inform flash controller it can reclaim sectors
This is done by specifying the discard option in fstab. Recognizing this option is dependent on the file system. Ext4 and BTrFS recognize and use this option.
Finding recently changed files
Finding out which files have been written to recently:
sudo find / -xdev -printf '%T+ %P\n' | sort -n | tail -99
syslog
Edit /etc/rsyslog.conf and comment out any log files that are not required.
/var/run and /var/lock
sudoedit /etc/default/rcS
..then edit these lines:
RAMRUN=yes RAMLOCK=yes
..so that /var/run and /var/lock are mounted in RAM.
