1 |
2014-06-21 1:48 GMT+08:00 Kai Krakow <hurikhan77@×××××.com>: |
2 |
> microcai <microcai@×××××××××××××.org> schrieb: |
3 |
> |
4 |
>> rsync is doing bunch of 4k ramdon IO when updateing portage tree, |
5 |
>> that will kill SSDs with much higher Write Amplification Factror. |
6 |
>> |
7 |
>> |
8 |
>> I have a 2year old SSDs that have reported Write Amplification Factor |
9 |
>> of 26. I think the only reason is that I put portage tree on this SSD |
10 |
>> to speed it up. |
11 |
> |
12 |
> Use a file system that turns random writes into sequential writes, like the |
13 |
> pretty newcomer f2fs. You could try using it for your rootfs but currently I |
14 |
> suggest just creating a separate partition for it and either mount it as |
15 |
> /usr/portage or symlink that dir into this directory (that way you could use |
16 |
> it for other purposes, too, that generate random short writes, like log |
17 |
> files). |
18 |
> |
19 |
> Then, I'd recommend changing your scheduler to deadline, bump up the io |
20 |
> queue depth to a much higher value (echo -n 2048 > |
21 |
> /sys/block/sdX/queue/nr_requests) and then change the dirty io flusher to |
22 |
> not run as early as it usually would (change vm.dirty_writeback_centisecs to |
23 |
> 1500 and vm.dirty_expire_centisecs to 3000). That way the vfs layer has a |
24 |
> chance to better coalesce multi-block writes into one batch write, and f2fs |
25 |
> will take care of doing it in sequential order. |
26 |
> |
27 |
> I'd also suggest not to use the discard mount options and instead create a |
28 |
> cronjob that runs fstrim on the SSD devices. But YMMV. |
29 |
> |
30 |
> As a safety measure, only ever partition and use only 70-80% of your SSD so |
31 |
> it can reliably do its wear-leveling. It will improve lifetime and keep the |
32 |
> performance up even with filled filesystems. |
33 |
> |
34 |
> -- |
35 |
|
36 |
|
37 |
many thanks to all of you! |
38 |
|
39 |
no I've put my portage tree on an F2FS partation now. |