SSD optimizations: Difference between revisions
Brian Wilson (talk | contribs) mNo edit summary |
Brian Wilson (talk | contribs) |
||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Partition alignment: use gdisk | |||
http://siduction.org/index.php?module=news&func=display&sid=78&lang=en | |||
== CentOS == | |||
Installing CentOS 6.x on a new server... | |||
https://sites.google.com/site/lightrush/random-1/howtoconfigureext4toenabletrimforssdsonubuntu | |||
* Add 'discard' option to mounts | |||
* Move /var from the SSD to a HD | |||
http://wiki.debian.org/SSDoptimization | |||
== Linux == | |||
See http://tombuntu.com/index.php/2008/09/04/four-tweaks-for-using-linux-with-solid-state-drives/ | See http://tombuntu.com/index.php/2008/09/04/four-tweaks-for-using-linux-with-solid-state-drives/ | ||
/boot, /home, /swap on | put /tmp in RAM: | ||
/ on RevoDrive /dev/md0 (/dev/ | |||
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 | |||
/boot, /home, /swap on Velociraptor /dev/sdd | |||
/ on RevoDrive /dev/md0 (/dev/sda, /dev/sdb) | |||
I don't know that this is optimal but it's what I used | |||
2 | mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sdb | ||
mke2fs -b 409 -E stride 16 /dev/md0 | |||
put noatime option in /etc/fstab | |||
manage write caching via /etc/hdparm.conf | |||
# | # SSD RevoDrive | ||
/dev/sda { | /dev/sda { | ||
write_cache = | write_cache = off | ||
} | } | ||
/dev/sdb { | /dev/sdb { | ||
write_cache = | write_cache = off | ||
} | } | ||
# | # Raptor drive | ||
/dev/sdc { | /dev/sdc { | ||
write_cache = | write_cache = on | ||
} | } | ||
# Caviar drive | |||
/dev/sdd { | /dev/sdd { | ||
write_cache = | write_cache = on | ||
} | } | ||
===Test results=== | |||
====On Raven==== | |||
The new Black drive is faster than the Velociraptor. | |||
The SSD is FAST and the Green is slow. No surprises there. Tested with hdparm -t command. | The SSD is FAST and the Green is slow. No surprises there. Tested with hdparm -t command. | ||
# RevoDrive | # RevoDrive | ||
Timing buffered disk reads: 1028 MB in 3.01 seconds = 341.87 MB/sec | Timing buffered disk reads: 1028 MB in 3.01 seconds = 341.87 MB/sec | ||
bonnie++ | |||
Version 1.96 ------Sequential Output------ --Sequential Input- --Random- | |||
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- | |||
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP | |||
raven 16G 1958 99 498533 42 193488 24 4443 98 501475 27 6290 125 | |||
Latency 6425us 378ms 52859us 2402us 9032us 4884us | |||
Version 1.96 ------Sequential Create------ --------Random Create-------- | |||
raven -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- | |||
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP | |||
16 7355 95 +++++ +++ +++++ +++ 7916 94 +++++ +++ 24012 89 | |||
Latency 490us 113us 74us 265us 32us 763us | |||
1.96,1.96,raven,1,1289707876,16G,,1958,99,498533,42,193488,24,4443,98,501475,27,6290,125,16,,,,,7355,95,+++++,+++,+++++,+++,7916,94,+++++,+++,24012,89,6425us,378ms,52859us,2402us,9032us,4884us,490us,113us,74us,265us,32us,763us | |||
# Velociraptor | # Velociraptor | ||
Timing buffered disk reads: 358 MB in 3.01 seconds = 118.84 MB/sec | Timing buffered disk reads: 358 MB in 3.01 seconds = 118.84 MB/sec | ||
bonnie++ -d /home/bwilson/foo | |||
Version 1.96 ------Sequential Output------ --Sequential Input- --Random- | |||
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- | |||
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP | |||
raven 16G 1412 97 90887 7 44795 5 3581 97 111852 5 299.7 6 | |||
Latency 8841us 688ms 1184ms 17654us 349ms 142ms | |||
Version 1.96 ------Sequential Create------ --------Random Create-------- | |||
raven -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- | |||
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP | |||
16 334 1 +++++ +++ 472 1 332 1 +++++ +++ 473 1 | |||
Latency 109ms 130us 124ms 354ms 35us 242ms | |||
1.96,1.96,raven,1,1289708289,16G,,1412,97,90887,7,44795,5,3581,97,111852,5,299.7,6,16,,,,,334,1,+++++,+++,472,1,332,1,+++++,+++,473,1,8841us,688ms,1184ms,17654us,349ms,142ms,109ms,130us,124ms,354ms,35us,242ms | |||
# Caviar Green | # Caviar Green | ||
Timing buffered disk reads: 198 MB in 3.00 seconds = 65.97 MB/sec | Timing buffered disk reads: 198 MB in 3.00 seconds = 65.97 MB/sec | ||
# Caviar Black | # Caviar Black | ||
Timing buffered disk reads: 442 MB in 3.01 seconds = 146.99 MB/sec | |||
====On Bellman==== | |||
OCZ drive: | |||
/dev/sda: | /dev/sda: | ||
Timing buffered disk reads: | Timing buffered disk reads: 762 MB in 3.01 seconds = 253.45 MB/sec | ||
WD Caviar Green drive: | |||
/dev/sdb: | |||
Timing buffered disk reads: 334 MB in 3.01 seconds = 111.11 MB/sec | |||
WDC Black NVME (512 GB) 2019-04-26 | |||
hdparm -Tt --direct /dev/nvme0n1p1 | |||
/dev/nvme0n1p1: | |||
Timing O_DIRECT cached reads: 1736 MB in 2.00 seconds = 868.14 MB/sec | |||
Timing O_DIRECT disk reads: 2698 MB in 3.00 seconds = 898.94 MB/sec | |||
Samsung 850 (or something like that) 2019-04-26 | |||
hdparm -Tt --direct /dev/sda1 | |||
/dev/sda1: | |||
Timing O_DIRECT cached reads: 298 MB in 2.00 seconds = 148.69 MB/sec | |||
Timing O_DIRECT disk reads: 258 MB in 3.00 seconds = 85.91 MB/sec | |||
== Windows == | |||
http://www.overclock.net/t/1156654/seans-windows-7-install-guide-optimization-for-ssds-hdds | |||
These are suggestions for a developer machine, YMMV | |||
Run services.msc as admin and turn off superfetch | |||
Remove the hibernation file: powercfg -h off | |||
Turn off indexing (it's a drive property) | |||
Reduce size of page file | |||
== Laysan tests == | |||
2017-08-05 | |||
NVME WDC | |||
bonnie++ -d /volumes/ssd_machines/test -n 1 | |||
SSD Samsung 840 | |||
bonnie++ -d /volumes/evo/test -n 1 | |||
WDC Caviar Black | |||
bonnie++ -d /home/bwilson/test -n 1 | |||
hdparm -tT --direct /dev/nvme0n1 | |||
/dev/nvme0n1: | |||
Timing O_DIRECT cached reads: 1096 MB in 2.00 seconds = 547.22 MB/sec | |||
Timing O_DIRECT disk reads: 3384 MB in 3.00 seconds = 1127.63 MB/sec | |||
hdparm -tT --direct /dev/sdb | |||
/dev/sdb: | |||
Timing O_DIRECT cached reads: 784 MB in 2.00 seconds = 391.66 MB/sec | |||
Timing O_DIRECT disk reads: 136 MB in 3.12 seconds = 43.61 MB/sec |
Latest revision as of 06:04, 26 April 2019
Partition alignment: use gdisk
http://siduction.org/index.php?module=news&func=display&sid=78&lang=en
CentOS
Installing CentOS 6.x on a new server...
https://sites.google.com/site/lightrush/random-1/howtoconfigureext4toenabletrimforssdsonubuntu
- Add 'discard' option to mounts
- Move /var from the SSD to a HD
http://wiki.debian.org/SSDoptimization
Linux
See http://tombuntu.com/index.php/2008/09/04/four-tweaks-for-using-linux-with-solid-state-drives/
put /tmp in RAM:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
/boot, /home, /swap on Velociraptor /dev/sdd
/ on RevoDrive /dev/md0 (/dev/sda, /dev/sdb)
I don't know that this is optimal but it's what I used
mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sdb mke2fs -b 409 -E stride 16 /dev/md0
put noatime option in /etc/fstab
manage write caching via /etc/hdparm.conf
# SSD RevoDrive /dev/sda { write_cache = off } /dev/sdb { write_cache = off }
# Raptor drive /dev/sdc { write_cache = on } # Caviar drive /dev/sdd { write_cache = on }
Test results
On Raven
The new Black drive is faster than the Velociraptor. The SSD is FAST and the Green is slow. No surprises there. Tested with hdparm -t command.
# RevoDrive Timing buffered disk reads: 1028 MB in 3.01 seconds = 341.87 MB/sec
bonnie++ Version 1.96 ------Sequential Output------ --Sequential Input- --Random- Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP raven 16G 1958 99 498533 42 193488 24 4443 98 501475 27 6290 125 Latency 6425us 378ms 52859us 2402us 9032us 4884us Version 1.96 ------Sequential Create------ --------Random Create-------- raven -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 7355 95 +++++ +++ +++++ +++ 7916 94 +++++ +++ 24012 89 Latency 490us 113us 74us 265us 32us 763us
1.96,1.96,raven,1,1289707876,16G,,1958,99,498533,42,193488,24,4443,98,501475,27,6290,125,16,,,,,7355,95,+++++,+++,+++++,+++,7916,94,+++++,+++,24012,89,6425us,378ms,52859us,2402us,9032us,4884us,490us,113us,74us,265us,32us,763us
# Velociraptor Timing buffered disk reads: 358 MB in 3.01 seconds = 118.84 MB/sec bonnie++ -d /home/bwilson/foo Version 1.96 ------Sequential Output------ --Sequential Input- --Random- Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP raven 16G 1412 97 90887 7 44795 5 3581 97 111852 5 299.7 6 Latency 8841us 688ms 1184ms 17654us 349ms 142ms Version 1.96 ------Sequential Create------ --------Random Create-------- raven -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 334 1 +++++ +++ 472 1 332 1 +++++ +++ 473 1 Latency 109ms 130us 124ms 354ms 35us 242ms 1.96,1.96,raven,1,1289708289,16G,,1412,97,90887,7,44795,5,3581,97,111852,5,299.7,6,16,,,,,334,1,+++++,+++,472,1,332,1,+++++,+++,473,1,8841us,688ms,1184ms,17654us,349ms,142ms,109ms,130us,124ms,354ms,35us,242ms
# Caviar Green Timing buffered disk reads: 198 MB in 3.00 seconds = 65.97 MB/sec
# Caviar Black Timing buffered disk reads: 442 MB in 3.01 seconds = 146.99 MB/sec
On Bellman
OCZ drive:
/dev/sda: Timing buffered disk reads: 762 MB in 3.01 seconds = 253.45 MB/sec
WD Caviar Green drive:
/dev/sdb: Timing buffered disk reads: 334 MB in 3.01 seconds = 111.11 MB/sec
WDC Black NVME (512 GB) 2019-04-26
hdparm -Tt --direct /dev/nvme0n1p1 /dev/nvme0n1p1: Timing O_DIRECT cached reads: 1736 MB in 2.00 seconds = 868.14 MB/sec Timing O_DIRECT disk reads: 2698 MB in 3.00 seconds = 898.94 MB/sec
Samsung 850 (or something like that) 2019-04-26
hdparm -Tt --direct /dev/sda1 /dev/sda1: Timing O_DIRECT cached reads: 298 MB in 2.00 seconds = 148.69 MB/sec Timing O_DIRECT disk reads: 258 MB in 3.00 seconds = 85.91 MB/sec
Windows
http://www.overclock.net/t/1156654/seans-windows-7-install-guide-optimization-for-ssds-hdds
These are suggestions for a developer machine, YMMV
Run services.msc as admin and turn off superfetch
Remove the hibernation file: powercfg -h off
Turn off indexing (it's a drive property)
Reduce size of page file
Laysan tests
2017-08-05
NVME WDC
bonnie++ -d /volumes/ssd_machines/test -n 1
SSD Samsung 840
bonnie++ -d /volumes/evo/test -n 1
WDC Caviar Black
bonnie++ -d /home/bwilson/test -n 1
hdparm -tT --direct /dev/nvme0n1
/dev/nvme0n1:
Timing O_DIRECT cached reads: 1096 MB in 2.00 seconds = 547.22 MB/sec Timing O_DIRECT disk reads: 3384 MB in 3.00 seconds = 1127.63 MB/sec
hdparm -tT --direct /dev/sdb
/dev/sdb:
Timing O_DIRECT cached reads: 784 MB in 2.00 seconds = 391.66 MB/sec Timing O_DIRECT disk reads: 136 MB in 3.12 seconds = 43.61 MB/sec