Pages

Showing posts with label SSD. Show all posts
Showing posts with label SSD. Show all posts

Saturday, 21 June 2014

SSD - Bytes written

I Have an Intel 520 SSD. I can use smartmontools to ask how much bytes have been written to it:
sudo ./smartctl -q noserial -i -l devstat,0 -l devstat /dev/sda
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.2.0-32-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Intel 520 Series SSDs
Device Model:     INTEL SSDSC2CW240A3
Firmware Version: 400i
User Capacity:    240,057,409,536 bytes [240 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA 3.0, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Sat Jun 21 08:42:06 2014 BST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Device Statistics (GP Log 0x04) supported pages
Page Description
  0  List of supported log pages
  1  General Statistics
  4  General Errors Statistics
  6  Transport Statistics
  7  Solid State Device Statistics

Device Statistics (GP Log 0x04)
Page Offset Size         Value  Description
  1  =====  =                =  == General Statistics (rev 2) ==
  1  0x008  4             1129  Lifetime Power-On Resets
  1  0x010  4             8660  Power-on Hours
  1  0x018  6       5401949881  Logical Sectors Written
  1  0x028  6       5794864033  Logical Sectors Read
  4  =====  =                =  == General Errors Statistics (rev 1) ==
  4  0x008  4                0  Number of Reported Uncorrectable Errors
  4  0x010  4             9232  Resets Between Cmd Acceptance and Completion
  6  =====  =                =  == Transport Statistics (rev 1) ==
  6  0x008  4             9232  Number of Hardware Resets
  6  0x010  4             4085  Number of ASR Events
  6  0x018  4                0  Number of Interface CRC Errors
  7  =====  =                =  == Solid State Device Statistics (rev 1) ==
  7  0x008  1              255  Percentage Used Endurance Indicator

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: