SSD Persistent Disk sysctl Tuning

158 views
Skip to first unread message

Peter

unread,
Feb 26, 2015, 12:06:35 PM2/26/15
to gce-dis...@googlegroups.com
Hello
Is there any suggestion for sysctl.conf configuration for SSD persistent disks?

mia...@google.com

unread,
Feb 27, 2015, 10:06:50 AM2/27/15
to gce-dis...@googlegroups.com
Have a look at this : http://www.overclock.net/a/how-to-maintain-and-properly-setup-an-ssd-in-linux-with-some-general-extra-speed-tweaks   
- it offers a few tweaks here and there. I have not tried any of them and I suggest you to try these on a test-only system and check for any potential issues before going in production -   

The one I found interesting is :   

$ sudo nano /etc/sysctl.conf
and add
vm.swappiness=0 vm.vfs_cache_pressure=90

Hope this helps!

Anthony Voellm

unread,
Feb 27, 2015, 10:41:07 AM2/27/15
to mia...@google.com, gce-dis...@googlegroups.com
Once of the big performance improvements for SSD come from how you format the drive and use of "TRIM".

Here is what I recommend...

$ sudo mke2fs -F -E lazy_itable_init=0,lazy_journal_init=0,discard -O ^has_journal -t ext4 -b 4096 …

Turning off the journal (^has_journal) can reduce reliability if there are sudden failures.  However depending on your use it makes a lot of sense.

The big win is turning on TRIM support (aka discard in the command).

  Tony

--
© 2014 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/fbf88ebd-a60b-4372-84e4-a632faa8b889%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Andrew Kadatch

unread,
Feb 27, 2015, 1:15:02 PM2/27/15
to Anthony Voellm, mia...@google.com, gce-dis...@googlegroups.com
Yup, enabling TRIM/DISCARD helps and is strongly encouraged.

I wouldn't recommend turning off the journal unless the disk is used as a scratch area and the
application is equipped with tools to detect corrupt file system and reformat the disk on reboot/restart.
If VM doing a lot of IO and fails and file system is not journaled, the likelihood of significant data
loss and/or file system corruption is very high. Up to 40-60% in some scenarios. NB: the numbers
I gave are 5 years old so probably the situation is better now.


Thank you,

Andrew

Reply all
Reply to author
Forward
0 new messages