microcai <micro...@fedoraproject.org> schrieb:

> rsync is doing bunch of  4k ramdon IO when updateing portage tree,
> that will kill SSDs with much higher Write Amplification Factror.
> 
> 
> I have a 2year old SSDs that have reported Write Amplification Factor
> of 26. I think the only reason is that I put portage tree on this SSD
> to speed it up.

Use a file system that turns random writes into sequential writes, like the 
pretty newcomer f2fs. You could try using it for your rootfs but currently I 
suggest just creating a separate partition for it and either mount it as 
/usr/portage or symlink that dir into this directory (that way you could use 
it for other purposes, too, that generate random short writes, like log 
files).

Then, I'd recommend changing your scheduler to deadline, bump up the io 
queue depth to a much higher value (echo -n 2048 > 
/sys/block/sdX/queue/nr_requests) and then change the dirty io flusher to 
not run as early as it usually would (change vm.dirty_writeback_centisecs to 
1500 and vm.dirty_expire_centisecs to 3000). That way the vfs layer has a 
chance to better coalesce multi-block writes into one batch write, and f2fs 
will take care of doing it in sequential order.

I'd also suggest not to use the discard mount options and instead create a 
cronjob that runs fstrim on the SSD devices. But YMMV.

As a safety measure, only ever partition and use only 70-80% of your SSD so 
it can reliably do its wear-leveling. It will improve lifetime and keep the 
performance up even with filled filesystems.

-- 
Replies to list only preferred.


Reply via email to