linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kai Krakow <hurikhan77+btrfs@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs scrub ioprio
Date: Sun, 19 Jan 2014 14:49:04 +0100	[thread overview]
Message-ID: <gn1tqa-i9d.ln1@hurikhan77.spdns.de> (raw)
In-Reply-To: pan.2013.11.26.00.50.14.749597@googlemail.com

Holger Hoffstaette <holger.hoffstaette@googlemail.com> schrieb:

> On Sun, 24 Nov 2013 22:45:59 -0500, Jim Salter wrote:
> 
>> TL;DR scrub's ioprio argument isn't really helpful - a scrub murders
>> system performance til it's done.
>> 
>> My system:
>> 
>> 3.11 kernel (from Ubuntu Saucy)
> 
> I don't run Ubuntu, but *maybe* they use the deadline IO scheduler by
> default, which does not handle IO priorities (by design). So maybe make
> sure your devices don't say "deadline" in /sys/block/sdX/queue/scheduler,
> and if they do, set them to cfq.

OTOH I've switched from CFQ to Deadline in Gentoo and IO responsiveness has 
greatly improved since then (spinning rust). The system boots faster, is 
able to start programs faster during IO stress, but swapping seems to stress 
the system a lot more. But since I got 16 GB RAM this is not a big problem. 
Throughput is not as good as with CFQ - but this is a desktop system: 
latency counts more than throughput, and that improved a lot.

I've tried BFQ before switching to Deadline but BFQ just does not cut it. 
During high IO loads it simply does not feel interactive although it was 
designed to guarantee exactly that. The fact that it also made my kernel 
unstable (with bfq related backtraces in the kernel log) I've switched away 
from it.

But I have to admit that I'm using the following setting to reduce processes 
blocking on high IO loads, tho you should have enough RAM to use it:

$ cat /etc/local.d/nr_requests.start 
#!/bin/sh

for nr_requests in /sys/block/sd[abc]/queue/nr_requests; do
        echo -n 4096 >$nr_requests
done

My btrfs pool spans sd[abc].

I'm using a weekly scrubbing job and a daily rsync backup job and see no 
drawbacks from using deadline scheduler, rather it improved a lot.

@OP:

I suggest looking at the surrounding parameters also for trouble shooting: 
Maybe the SATA driver just doesn't cut it? Maybe a BIOS setting is wrong 
(AHCI mode?)... Does your system run low on RAM (with deadline this can 
become a heavy bottleneck)? Also, 3.12 kernel improved btrfs performance, 
you may want to try that first.

Did you check which IO scheduler is in use?

BTW: Yes, Ubuntu has switched from CFQ to Deadline by default for servers 
and desktops - with the same finding I had when trying. CFQ is more or less 
optimized for the general usecase and tries to behave like the old 
anticipatory scheduler, but it is designed with "fair" bandwidth 
distribution in mind which hurts interactivity a lot. But desktop systems 
feel fast by reducing latency, not by improving or fair-sharing bandwidth. 
Most servers need low latency for good service response times, throughput is 
not important. So deadline is not a bad choice for most use-cases (I know, 
"most use-cases" is subjective but I think for the edge-cases which benefit 
from CFQ the user already knows how to switch to the right scheduler). We've 
switched all our virtualized servers from CFQ to noop and they are running a 
lot better now with much decreased IO latency and lower IO wait. I think 
"fair bandwidth distribution" is just no longer that important with devices 
being able to deliver 100+ MB/s of bandwidth and low latency becomes more 
and more important...

But: YMMV... ;-)

Regards,
Kai


      reply	other threads:[~2014-01-19 14:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25  3:45 btrfs scrub ioprio Jim Salter
2013-11-25 12:25 ` Austin S Hemmelgarn
2013-11-25 12:55   ` Jim Salter
2013-11-25 13:05     ` Austin S Hemmelgarn
2013-11-26  0:50 ` Holger Hoffstaette
2014-01-19 13:49   ` Kai Krakow [this message]

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=gn1tqa-i9d.ln1@hurikhan77.spdns.de \
    --to=hurikhan77+btrfs@gmail.com \
    --cc=linux-btrfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).