mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thanos McAtos" <mcatos@ics.forth.gr>
To: "Chris Snook" <csnook@redhat.com>
Cc: "Thanos Makatos" <mcatos@ics.forth.gr>, linux-kernel@vger.kernel.org
Subject: Re: Inexplicable I/O latency using worker threads
Date: Sat, 13 Dec 2008 14:44:24 +0200 (EET)	[thread overview]
Message-ID: <10971.87.202.3.215.1229172264.squirrel@webmail.ics.forth.gr> (raw)
In-Reply-To: <4942A38C.7050907@redhat.com>

> Thanos Makatos wrote:
>> Hello all.
>>
>> I am facing a weird problem with a virtual block driver I made
>> concerning excessive I/O latency.
>>
>> My block driver intercepts requests and redirects them to a real block
>> device,
>> but not just be setting the bio->bi_bdev field, I create new bios.
>>
>> Anyway, my problem is that for load balancing reasons I need per-CPU
>> worker threads
>> where I enqueue requests and let them do all the work. If I use 2
>> threads in a round
>> robin manner (request 1 served by CPU 0, 2 by CPU1, 3 by CPU0 and so
>> on), performance
>> is inexplicably low.
>>
>> If I choose only one CPU to act as a worker the problem is gone. The
>> difference of measured
>> I/O latency is more than 30 times.
>>
>> What could be happening?
>>
>> I'm using a vanilla 2.6.18.8.
>>
>> Thanx in advance.
>
> a) I/O scheduling
What does I/O scheduling has to do with from where the I/O request
originates?
> b) lock contention
I doubt there is lock contention, my simple test uses 1 outstanding I/O.
>
> Do you really need to load balance I/O to a single bdev across multiple
> CPUs?
Yes, because I have to do very CPU-intensive operations (compression etc.).
> Disk I/O generally isn't very CPU-intensive.
>
> -- Chris
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



      reply	other threads:[~2008-12-13 13:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-12  9:39 Thanos Makatos
2008-12-12 17:46 ` Chris Snook
2008-12-13 12:44   ` Thanos McAtos [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=10971.87.202.3.215.1229172264.squirrel@webmail.ics.forth.gr \
    --to=mcatos@ics.forth.gr \
    --cc=csnook@redhat.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®