public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Loop devices not supported concurrent access ?
@ 2011-01-09  1:10 Gregory Auzanneau
  0 siblings, 0 replies; only message in thread
From: Gregory Auzanneau @ 2011-01-09  1:10 UTC (permalink / raw)
  To: linux-kernel

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

/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-09  1:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-09  1:10 Loop devices not supported concurrent access ? Gregory Auzanneau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox