Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439276 - Install handbook needs to mention SSD-specific things
Summary: Install handbook needs to mention SSD-specific things
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Installation Handbook (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Docs Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-22 15:54 UTC by Alexander Berntsen (RETIRED)
Modified: 2013-12-17 09:36 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Berntsen (RETIRED) gentoo-dev 2012-10-22 15:54:54 UTC
The install handbook doesn't say anything about SSDs. This is unfortunate, as they are now very common, and users should do certain things differently for SSDs compared to HDDs. These "things" vary from the extremely important activating of TRIM features if using ext4 (mkfs.ext4 -E discard /dev/sdXY), to the less important but useful reducing swappiness (vm.swappiness=1 and vm.vfs_cache_pressure=50 to /etc/sysctl.conf) and I/O scheduler selection in the kernel.
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2012-10-31 18:23:55 UTC
Can you elaborate on the things we need to focus on? I don't have SDDs and have read contradictory posts about how Linux should be "tweaked" towards it.
Comment 2 Alexander Berntsen (RETIRED) gentoo-dev 2012-11-01 14:04:54 UTC
TRIM with ext4:
Enabling TRIM is very important. Paramount, in fact. The only filesystems I know that support it are btrfs and ext4. ext4 is very common, and does not enable TRIM per default.
https://wiki.archlinux.org/index.php/Solid_State_Drives#Enable_TRIM_With_mkfs.ext4_or_tune2fs_.28Discouraged.29

Mount flags:
Using noatime or relatime reduces write, and discard makes TRIM work.
https://wiki.archlinux.org/index.php/Solid_State_Drives#Mount_Flags

I/O scheduler:
CFQ might not be optimal. In fact it almost definitely isn't.
https://wiki.archlinux.org/index.php/Solid_State_Drives#I.2FO_Scheduler
http://en.opensuse.org/SDB:SSD_performance#boot.local

Increase time for dirty writeback etc:
Less writing is good.
I use the following,
vm.swappiness=1
vm.vfs_cache_pressure=50
vm.dirty_writeback_centisecs=1500
vm.dirty_expire_centisecs = 500
vm.dirty_ratio=25
vm.dirty_background_ratio=10
other examples: http://en.opensuse.org/SDB:SSD_performance#boot.local

Reduce swappiness:
Less eager swapping means fewer writes.
https://wiki.archlinux.org/index.php/Solid_State_Drives#Swap_Space_on_SSDs

Compile in tmpfs:
Writing to RAM doesn't hurt either.
http://en.gentoo-wiki.com/wiki/Portage_TMPDIR_on_tmpfs
NOTE that the article is maybe a bit outdated in some areas.
Comment 3 nm (RETIRED) gentoo-dev 2012-11-03 07:46:03 UTC
we should do something about this, indeed. i've written a few tips and tricks here and there, as i moved to using almost nothing but SSDs a few years ago, and i'm planning on building a new machine that will have only SSDs, using ext4.

i thus have a vested interest, especially since i also need to find out what's needed to do a modern install on SSDs with newer filesystems, GPT partitioned, booting from UEFI motherboards, and all that jazz.

if i can find the time, i can start a draft or somethin'.
Comment 4 Alexander Berntsen (RETIRED) gentoo-dev 2012-11-03 13:53:50 UTC
(In reply to comment #3)
> booting from UEFI motherboards

http://blog.realcomputerguy.com/2012/05/efi-stub-booting-without-bootloader.html
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2013-12-17 09:36:51 UTC
I added in the discard mount option for SSD users.

The CFQ issue is no longer prevalent, CFQ detects if an SSD is used and modifies its behavior.

vm.* sysctls I rather not touch in the handbook; these are performance optimizing settings which require some knowledge that users at this point in the handbook can not have. Also, it is not that mandatory during installation (can be handled post-install).

Compilation in tmpfs is only possible for systems with ample memory, not something we require for Gentoo (and thus not to document in the handbook).