All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory Auzanneau <greg@reolight.net>
To: linux-kernel@vger.kernel.org
Subject: Loop devices not supported concurrent access ?
Date: Sun, 09 Jan 2011 02:10:21 +0100	[thread overview]
Message-ID: <4D290AFD.40809@reolight.net> (raw)

Hello All,

During some tests, I've remark an interesting issue with loop devices.
loop devices queues concurrent access by multi-threaded software.

This issue can easily be highlighted by this tool : 
http://box.houkouonchi.jp/seeker_baryluk.c
This tool permit to test how many iop/s your system can handle (don't 
forget to use deadline scheduler).

First of all, we will define a loop device on a raw device (raw device 
permit to avoid filesystem interaction) :
losetup /dev/loop1 /dev/sda5

Now we will test the number our raw device and our loop device can 
handle with only one thread :
./seeker_baryluk /dev/sda5 1 => Results: 196 seeks/second, 5.081 ms 
random access time
./seeker_baryluk /dev/loop1 1 => Results: 194 seeks/second, 5.131 ms 
random access time

Results : raw device and loop device have approximately the same 
performance with one thread.

Here is the problem : we will now test with 32 threads :
./seeker_baryluk /dev/sda5 32 => Results: 631 seeks/second, 1.585 ms 
random access time
./seeker_baryluk /dev/loop1 32 => Results: 194 seeks/second, 5.148 ms 
random access time

As you can see, loop device deals request one by one even with parrallel 
request.
This involve that we lost a lot of performance performed by NCQ/TCQ 
and/or disk balancing.

The same thing also appears in Xen when mapping a disk with a "file".

Is this problem solvable ?



/Thank you all for the good work with linux, keep up with it ! :)

Greg

/

                 reply	other threads:[~2011-01-09  1:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4D290AFD.40809@reolight.net \
    --to=greg@reolight.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.