FLUG Talk on SSD for Linux and KODI

By Jeff Liebermann

2015-10-24

 

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.

https://en.wikipedia.org/wiki/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?

http://www.aerodefensetech.com/component/content/article/adt/features/feature-articles/21172

 

Interfaces

http://www.pcworld.com/article/2921412/ssds-have-a-problem-theyre-getting-too-fast-too-soon.html

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

https://sites.google.com/site/easylinuxtipsproject/ssd

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

2.    AHCI BIOS

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)

        http://kodi.tv

        http://www.tvaddons.ag

 

Linux install and config

        http://kodi.wiki/view/Installing_XBMC_for_Linux

        http://www.tvaddons.ag/install-addons-kodi/

 

Bad drive test (Windows)

http://802.11junk.com/jeffl/Failing%20Disk%20Drive/