FLUG Talk on SSD for Linux and KODI

By Jeff Liebermann



Why buy an SSD?

1.    Speed, reliability, low power, shock proof, small, prices dropping.

2.    Samsung 850 EVO. 120GB=$64, 250GB=$85, 500GB=$164, 1TB=$340, 2TB=$710.

3.    Types: 2.5, M.2, mSATA

4.    Differences from USB flash drive. High end SD cards (SDXC) have wear leveling.


PC Requirements

1.    SATA 2 or 3

2.    TRIM in BIOS and OS (or in software as in older OS/X)

3.    Modern OS with TRIM support.

4.    2.5 SATA slot or socket.

5.    AHCI in BIOS (not IDE emulation)


How it works

1.    Read approx 540 Mbytes/sec sequential or 100K I/O ops with 4 Kbyte blocks.

2.    Write is about 50 to 100% of read speed depending on technology.

3.    Block erase method. SSD cannot overwrite data. Must erase first. (Read 256KB, erase, modify, write back).

4.    Wear Leveling. Writes can shorten SSD lifetime. Wear Leveling distributes writes.

5.    TRIM (garbage collection). Reduces Write Amplification.


6.    DRAM buffer for write buffering only.

7.    Alternate and spare blocks.

8.    60 msec operation after power loss to flush about 6MB out of write buffer. Battery?





1.    SATA I, II, II (1.5, 3.0, 6.0 Gbits/sec)

2.    AHCI (Adaptive Host Controller Interface) Queue= 32 commands

3.    MVMe (Non-Volatile Memory express) Queue=65K commands using 2 lanes of PCie 2nd generation.

4.    SATA Express (using PCIe) = 10Gbits/sec which works well with SATA III at 6Gbits/sec.

5.    DDR4/2400 = 8.8GBytes/sec sequential.

6.    CPU

        Dual /quad core 16x PCIe lanes

        I7-5690x 40x PCIe lanes

7.    Video and SSD compete for PCIe lanes.


Linux optimization


1.    Format and align to 4KByte boundaries. Format for EXT4, not BTRFS.


3.    Firmware update

4.    Overprovisioning. Leave some unallocated and unpartitioned space for alternate blocks. Recommended is 7% and not to exceed 10GBytes max.

5.    noatime in /etc/fstab. Eliminate writing last access time.

6.    Enable TRIM in /etc/rc.local or in cron or just run manually with sudo fstrim v

7.    discard ????

8.    Eliminate swap ??? Depends on if swap is needed.

9.    replacement scheduler program ???

10.           If dual boot with Windoze, also need to tweak Windoze.



KODI (formerly XBMC)




Linux install and config




Bad drive test (Windows)