public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: microcai <microcai@fedoraproject.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: [Gentoo-User] emerge --sync likely to kill SSD?
Date: Sat, 21 Jun 2014 12:54:30 +0800	[thread overview]
Message-ID: <CAMgqO2w4Ai_rosS1Tg-95W+943g0Pi4GSrBRFuLCED5_hnOPDA@mail.gmail.com> (raw)
In-Reply-To: <un8e7b-pne.ln1@hurikhan77.spdns.de>

2014-06-21 1:48 GMT+08:00 Kai Krakow <hurikhan77@gmail.com>:
> microcai <microcai@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.
>
> --


many thanks to all of you!

no I've put my portage tree on an F2FS partation now.


  reply	other threads:[~2014-06-21  4:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19  2:36 [gentoo-user] [Gentoo-User] emerge --sync likely to kill SSD? microcai
2014-06-19  8:40 ` Amankwah
2014-06-19 11:44   ` Neil Bothwick
2014-06-19 11:56     ` Rich Freeman
2014-06-19 12:16       ` Kerin Millar
2014-06-19 22:03 ` Full Analyst
2014-06-20 17:48 ` [gentoo-user] " Kai Krakow
2014-06-21  4:54   ` microcai [this message]
2014-06-21 14:27   ` Peter Humphrey
2014-06-21 14:54     ` Rich Freeman
2014-06-21 19:19       ` [gentoo-user] " Kai Krakow
2014-06-21 19:24     ` Kai Krakow
2014-06-22  1:40       ` Rich Freeman
2014-06-22 11:44         ` [gentoo-user] " Kai Krakow
2014-06-22 13:44           ` Rich Freeman
2014-06-24 18:34             ` [gentoo-user] " Kai Krakow
2014-06-24 20:01               ` Rich Freeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMgqO2w4Ai_rosS1Tg-95W+943g0Pi4GSrBRFuLCED5_hnOPDA@mail.gmail.com \
    --to=microcai@fedoraproject.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox