Size: 1379
Comment: Add section on filesystem alignment
|
Size: 1566
Comment: Link to Ts'o's article on FS alignment
|
Deletions are marked like this. | Additions are marked like this. |
Line 21: | Line 21: |
More information: * [[http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/| Aligning filesystems to an SSD's erase block size]] (Theodore Ts'o) |
Solid-state disks have low-level block fragmentation problems (see Anandtech article), and these problems will persist even after formatting. Most disk's block mapping table can be reset by issuing an ATA secure erase command.
Reducing writes
Remounting temporary files as tmpfs
To /etc/fstab:
none /tmp tmpfs defaults,noatime,mode=1777,size=1024M 0 0 none /var/tmp tmpfs defaults,noatime,mode=1777,size=512M 0 0
Creating aligned filesystems
This assume that the underlying partitions (including layers, such as LVM) have been created on properly-aligned sector boundaries.
These assume a 128 KiB erase block size.
More information:
Aligning filesystems to an SSD's erase block size (Theodore Ts'o)
ext4
mkfs -t ext4 -E stripe-width=32 /dev/sda1
Source: Aligning filesystems to an SSD's erase block size
This can also be down at mount time:
mount -t ext4 -o stripe=32 /dev/sda1
XFS
mkfs -t xfs -d su=128k -d sw=1 /dev/sda1
This can also be done at mount time, though the options/units are different:
mount -t xfs -o sunit=256,swidth=256 /dev/sda1