Pages

Friday 6 April 2012

Prepare for SSD installation

I have bought an Intel 520 SSD, and I would like to install it professionally. So some notes to consider:
  • EBS (Erase Block Size) - align partitioning to EBS - I was not able to know what is the EBS, so accoding to the ARCH wiki, I will align my first partition to 1MB (latest fdisk automatically aligns all partitions to 2048 sectors, or 1024 KiB, which should work for all EBS sizes)
  • Filesystem: ext4 with noatime (reads wont modify anything)
  • ext4 with discard option - for TRIM support
  • I will let filesystem to do journalling
  • Check TRIM is working
  • seq 1 1000 > testfile
    sync
    hdparm --fibmap testfile
    testfile:
     filesystem blocksize 4096, begins at LBA 2048; assuming 512 byte sectors.
     byte_offset  begin_LBA    end_LBA    sectors
               0   29868576   29868583          8
    hdparm --read-sector 29868576 /dev/sda
    /dev/sda:
    reading sector 29868576: succeeded
    0a31 0a32 0a33 0a34 0a35 0a36 0a37 0a38
    0a39 3031 310a 0a31 3231 310a 0a33 3431
    ...
    
    rm testfile
    sync
    /dev/sda:
    reading sector 29868576: succeeded
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    ...
    
  • Kernel 2.6.33+ has TRIM
  • Over-Provisioning - I will go for 20% OP (I will have one partition, which consumes 80% of the drive)
  • Change I/O Scheduler to noop or deadline for the ssd device
  • echo noop > /sys/block/sdX/queue/scheduler
 Sources:

No comments:

Post a Comment