[GTALUG] Build critique request and the story behind it. [some disk hints]

D. Hugh Redelmeier hugh at mimosa.com
Sun Nov 19 23:17:54 EST 2017


| From: Russell via talk <talk at gtalug.org>

| On November 19, 2017 12:36:09 PM EST, "D. Hugh Redelmeier via talk" <talk at gtalug.org> wrote:

| >I'm setting up CentOS 7 on a little computer that came with a 32G SSD. 
| >
| >That's fine for the OS + 10G swap (I added a 2T HDD for /var and
| >/home).  
| 
| Interesting, how did you decide on 10G, this doesn't look like the 
| standardly recommended1.5 - 2xRAM.

The recommendations are apparently all obsolete.

I do think that it is good to have at least as much swap as RAM so you
could have a chance at hibernation.  But then again, I don't know if
you actually need more to preserve already-swapped stuff.  And
generally I don't hibernate boxes.  So it is sort of based on my
superstition.

My box currently has 2G of RAM but has had 10G at times.

| >Your SSD is 512G so it would be a waste to use it just for the OS.
| 
| I was thinking of partitioning /boot using existing Grub2 inode limits, 
| then use 512-byte inodes on the rest of the filesystem. Not exactly sure 
| why except for a vague idea that, having headroom in SElinux policy 
| metadata headers, if used on a dedicated IPV6 LAN, might work out ok. 
| I've never actually tried to tune a Linux filesystem, thought I might 
| have at it now, see how it goes.

What are grub2 inode limits?

Apparently grub 0.97 limited inodes to 128 bytes.

A lot of tuning is aimed at HDD rather than SSD.  SSDs tend to do a
lot behind the back of the computer.  The try to pretend to have HDD
geometries but the actual logical structure of the disk is way
different to the physical structure.

For SSDs:

- try to leave a certain amount of empty/unused space.  This reduces
  the amount of shuffling that the drive does (autonomously and
  invisibly).  How much free space?  I don't know.  But behaviour is
  surely non-linear (hockey-stick curve) so you want to stay left of
  the bend.  I'd guess 5% is fine.  You could take your hint from how
  much "over-provisioning" is done on commercial-grade SSDs vs
  consumer grade ones.

  The best way to leave space for this purpose is to leave a portion of
  the drive outside any partition.  But the second best way is
  sometimes more useful: avoid filling all the filesystems.

  Here's a random blurb on over-provisioning
	<http://www.samsung.com/semiconductor/minisite/ssd/downloads/document/Samsung_SSD_845DC_04_Over-provisioning.pdf>
  It has a few precise numbers from tests but it does not disclose
  the tests.  So it is half-scientific.

- use fstrim(8) once in a while to inform the disk of the blocks in
  deleted files.  How often?  It depends on how much you have deleted.
  I typically do it once a month or once a week, but I have no support
  for those frequencies.

  Perhaps LVM prevents fstrim from working.  Certainly that used to be
  the case.


More information about the talk mailing list