Gentoo Archives: gentoo-user

From: Kai Krakow <hurikhan77@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: [Gentoo-User] emerge --sync likely to kill SSD?
Date: Fri, 20 Jun 2014 17:56:45
Message-Id: un8e7b-pne.ln1@hurikhan77.spdns.de
In Reply to: [gentoo-user] [Gentoo-User] emerge --sync likely to kill SSD? by microcai
1 microcai <microcai@×××××××××××××.org> schrieb:
2
3 > rsync is doing bunch of 4k ramdon IO when updateing portage tree,
4 > that will kill SSDs with much higher Write Amplification Factror.
5 >
6 >
7 > I have a 2year old SSDs that have reported Write Amplification Factor
8 > of 26. I think the only reason is that I put portage tree on this SSD
9 > to speed it up.
10
11 Use a file system that turns random writes into sequential writes, like the
12 pretty newcomer f2fs. You could try using it for your rootfs but currently I
13 suggest just creating a separate partition for it and either mount it as
14 /usr/portage or symlink that dir into this directory (that way you could use
15 it for other purposes, too, that generate random short writes, like log
16 files).
17
18 Then, I'd recommend changing your scheduler to deadline, bump up the io
19 queue depth to a much higher value (echo -n 2048 >
20 /sys/block/sdX/queue/nr_requests) and then change the dirty io flusher to
21 not run as early as it usually would (change vm.dirty_writeback_centisecs to
22 1500 and vm.dirty_expire_centisecs to 3000). That way the vfs layer has a
23 chance to better coalesce multi-block writes into one batch write, and f2fs
24 will take care of doing it in sequential order.
25
26 I'd also suggest not to use the discard mount options and instead create a
27 cronjob that runs fstrim on the SSD devices. But YMMV.
28
29 As a safety measure, only ever partition and use only 70-80% of your SSD so
30 it can reliably do its wear-leveling. It will improve lifetime and keep the
31 performance up even with filled filesystems.
32
33 --
34 Replies to list only preferred.

Replies

Subject Author
Re: [gentoo-user] Re: [Gentoo-User] emerge --sync likely to kill SSD? microcai <microcai@×××××××××××××.org>
Re: [gentoo-user] Re: [Gentoo-User] emerge --sync likely to kill SSD? Peter Humphrey <peter@××××××××××××.uk>