public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Ulrich Lukas <stellplatz-nr.13a@datenparkplatz.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Poor desktop responsiveness with background I/O-operations
Date: Sun, 20 Sep 2009 21:38:41 +0200	[thread overview]
Message-ID: <1253475521.9224.43.camel@marge.simson.net> (raw)
In-Reply-To: <4AB5ECD0.7010903@datenparkplatz.de>

[-- Attachment #1: Type: text/plain, Size: 2748 bytes --]

On Sun, 2009-09-20 at 10:50 +0200, Ulrich Lukas wrote:
> Arjan van de Ven wrote:
> > can you try the following two things?
> > 
> > echo 4096 > /sys/block/sda/queue/nr_requests
> > for i in `pidof kjournald` ; do ionice -c1 -p $i ; done
> 
> I tried this just now, but it doesn't change things much. I can do a
> more testing later today.

Try ionice -c3 for your dd.

> > I assume you're using CFQ.
> 
> Yes, it's CFQ. (see .config of my previous posting)
> 
> Filesystem is EXT4.

Mine is ext3.

I can easily reproduce pain.  The attached cheezy test script, when run
back to back with no args (stock IO), regularly produces beauties:

 Performance counter stats for 'sh -c konsole -e exit':

     257.670601  task-clock-msecs         #      0.004 CPUs
           1036  context-switches         #      0.004 M/sec
             30  CPU-migrations           #      0.000 M/sec
           6317  page-faults              #      0.025 M/sec
      471734719  cycles                   #   1830.767 M/sec
      393365060  instructions             #      0.834 IPC
        7849464  cache-references         #     30.463 M/sec
        1038976  cache-misses             #      4.032 M/sec

   65.766937233  seconds time elapsed

Yup, a full minute to get a binary loaded and fired up.  Seems it and
others get evicted by the VM.  Getting whatever back into ram is painful
to listen to (poor disk/me.. seek latency eating MUCH time).

Calling script back to back with args 1 (realtime foreground) 3 (idle
background) does best:

 Performance counter stats for 'sh -c konsole -e exit':

     169.915036  task-clock-msecs         #      0.077 CPUs
            439  context-switches         #      0.003 M/sec
              9  CPU-migrations           #      0.000 M/sec
           6314  page-faults              #      0.037 M/sec
      363128252  cycles                   #   2137.117 M/sec
      367410945  instructions             #      1.012 IPC
        5822302  cache-references         #     34.266 M/sec
         437189  cache-misses             #      2.573 M/sec

    2.213079979  seconds time elapsed

Args 2 (best effort foreground) and 3 (idle background);

 Performance counter stats for 'sh -c konsole -e exit':

     176.689856  task-clock-msecs         #      0.015 CPUs
            357  context-switches         #      0.002 M/sec
             15  CPU-migrations           #      0.000 M/sec
           6314  page-faults              #      0.036 M/sec
      374861947  cycles                   #   2121.582 M/sec
      368929476  instructions             #      0.984 IPC
        5806286  cache-references         #     32.861 M/sec
         496651  cache-misses             #      2.811 M/sec

   12.036165968  seconds time elapsed

	-Mike

[-- Attachment #2: testo.sh --]
[-- Type: application/x-shellscript, Size: 1702 bytes --]

  parent reply	other threads:[~2009-09-20 19:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-20  3:08 Poor desktop responsiveness with background I/O-operations Ulrich Lukas
2009-09-20  4:11 ` Thomas Fjellstrom
2009-09-20  6:07 ` Arjan van de Ven
2009-09-20  8:50   ` Ulrich Lukas
2009-09-20 17:17     ` Nikos Chantziaras
2009-09-20 19:38     ` Mike Galbraith [this message]
2009-09-21  0:22       ` Justin P. Mattock
2009-09-21  4:23         ` Mike Galbraith
2009-09-21  7:48           ` Ulrich Lukas
2009-09-21  8:06             ` Mike Galbraith
2009-09-21 19:47               ` James Cloos
2009-09-21 22:47                 ` Nikos Chantziaras
2009-09-21 23:34                   ` James Cloos
2009-09-22  7:06                 ` Mike Galbraith
2009-09-22  9:20                   ` Mike Galbraith
2009-09-22 11:22                     ` Henrique de Moraes Holschuh
2009-09-22 11:32                       ` Mike Galbraith
2009-09-22 16:58                   ` James Cloos
2009-09-20 17:04   ` Ulrich Lukas
2009-09-20 20:22 ` Jiri Kosina
2009-09-20 22:04   ` Jan Kara
2009-09-21  7:25     ` Mike Galbraith
2009-09-21  7:33       ` Arjan van de Ven
2009-09-21  7:41         ` Mike Galbraith
2009-09-21  7:47           ` Mike Galbraith
2009-09-21  2:59   ` Ulrich Lukas
     [not found] <dmlhK-6ws-5@gated-at.bofh.it>
     [not found] ` <dmnMy-8tg-7@gated-at.bofh.it>
2009-09-20 18:51   ` Sanjoy Mahajan

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=1253475521.9224.43.camel@marge.simson.net \
    --to=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stellplatz-nr.13a@datenparkplatz.de \
    /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