Skip to content

Instantly share code, notes, and snippets.

@samrocketman
Last active March 6, 2018 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samrocketman/7f2a85c390f29ace433d6fc788dcb660 to your computer and use it in GitHub Desktop.
Save samrocketman/7f2a85c390f29ace433d6fc788dcb660 to your computer and use it in GitHub Desktop.
drive testing

reliability testing

I bought 4 SSD drives. I'm going to open 8 terminals (2 for each drive) to infinitely write to the drives over and over again.

2 terminals writing at the same time:

  • 1 for writing zeros to the drive
  • 1 for writing random 1's and 0's to the drive

I'm going to let the drives write for anywhere from three to five days 24 hours a day. If the drives are bad then they should fail within that window.

Analyzing reliability (as root user)

Install SMART tools package in ubuntu.

apt-get install smartmontools

List the drives:

fdisk -l

The above lists my 4 drives as /dev/sda, /dev/sdb, /dev/sdc, and /dev/sdd.

Analyze the SMART data of the drives.

smartctl -a /dev/sda

SMART data will tell me about a drive failure.

testing speeds

zero writing example

while true;do dd if=/dev/zero of=/dev/sda bs=1000M oflag=dsync status=progress;done

random write example

while true;do dd if=/dev/urandom of=/dev/sda bs=1000M oflag=dsync status=progress;done
  • sda zero: 46137344000 bytes (46 GB, 43 GiB) copied, 637.615 s, 72.4 MB/s
    random: 6106906442 bytes (6.1 GB, 5.7 GiB) copied, 544.936 s, 11.2 MB/s
  • sdb zero: 128035676160 bytes (128 GB, 119 GiB) copied, 496.908 s, 258 MB/s
    random: 23655873855 bytes (24 GB, 22 GiB) copied, 567.166 s, 41.7 MB/s
  • sdc zero: 128035676160 bytes (128 GB, 119 GiB) copied, 495.048 s, 259 MB/s
    random: 24092081458 bytes (24 GB, 22 GiB) copied, 596.461 s, 40.4 MB/s
  • sdd zero: 45088768000 bytes (45 GB, 42 GiB) copied, 705.389 s, 63.9 MB/s
    random: 6073352011 bytes (6.1 GB, 5.7 GiB) copied, 607.209 s, 10.0 MB/s

sda is 1/4 speed

=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG MZ7PC128HAFU-000H1
Serial Number:    S0U2NSAD114738
LU WWN Device Id: 5 002538 043584d30
Firmware Version: CXM05H1Q
User Capacity:    128,035,676,160 bytes [128 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 T13/2015-D revision 2
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Dec  2 01:00:33 2017 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

sdb

=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG MZ7PC128HAFU-000H1
Serial Number:    S0U2NSAD303973
LU WWN Device Id: 5 002538 043584d30
Firmware Version: CXM05H1Q
User Capacity:    128,035,676,160 bytes [128 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 T13/2015-D revision 2
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Dec  2 01:02:31 2017 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

sdc

=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG MZ7PC128HAFU-000L5
Serial Number:    S11VNSAD301864
Firmware Version: CXM07L1Q
User Capacity:    128,035,676,160 bytes [128 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ATA8-ACS T13/1699-D revision 4c
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Dec  2 01:02:57 2017 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

sdd is 1/4 speed

=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG MZ7PC128HAFU-000H1
Serial Number:    S0U2NSAC603416
LU WWN Device Id: 5 002538 043584d30
Firmware Version: CXM05H1Q
User Capacity:    128,035,676,160 bytes [128 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 T13/2015-D revision 2
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Dec  2 01:01:48 2017 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
@pop0ff
Copy link

pop0ff commented Mar 6, 2018

Are speed results provided after testing session was completed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment