All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: RE: RE: poor domU VBD performance.
@ 2005-03-30 11:16 Ian Pratt
  2005-03-30 17:01 ` peter bier
  2005-03-31  7:05 ` RE: " Jens Axboe
  0 siblings, 2 replies; 41+ messages in thread
From: Ian Pratt @ 2005-03-30 11:16 UTC (permalink / raw)
  To: Jens Axboe, Kurt Garloff
  Cc: Vincent Hanquez, Xen development list, Christian Limpach

> I'll check the xen block driver to see if there's anything 
> else that sticks out.
>
> Jens Axboe

Jens, I'd really appreciate this.

The blkfront/blkback drivers have rather evolved over time, and I don't
think any of the core team fully understand the block-layer differences
between 2.4 and 2.6. 

There's also some junk left in there from when the backend was in Xen
itself back in the days of 1.2, though Vincent has prepared a patch to
clean this up and also make 'refreshing' of vbd's work (for size
changes), and also allow the blkfront driver to import whole disks
rather than paritions. We had this functionality on 2.4, but lost it in
the move to 2.6.

My bet is that it's the 2.6 backend that is where the true perofrmance
bug lies. Using a 2.6 domU blkfront talking to a 2.4 dom0 blkback seems
to give good performance under a wide variety of circumstances. Using a
2.6 dom0 is far more pernickety. I agree with Andrew that I suspect it's
the work queue changes are biting us when we don't have many outstanding
requests.

Thanks,
Ian

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: Re: poor domU VBD performance.
@ 2005-04-12 10:51 Ian Pratt
  0 siblings, 0 replies; 41+ messages in thread
From: Ian Pratt @ 2005-04-12 10:51 UTC (permalink / raw)
  To: peter bier, xen-devel

 
#
> I am sorry to return to this issue after quite a long interruption. 
> As I mentioned in a post before, I came accross this problem 
> when I was testing file-system performance. After the 
> problems with raw sequential I/O seemed to have been fixed in 
> the testing release, I turned back to my original problem. 
> I did a simple test that dispite its simplicity seems to put 
> the IO subsystem under considerable stress. I took the /usr 
> tree of my system and copied five it times into different 
> directories on a slice of disk 1. This tree con- sistst of 
> 36000 files with about 750 MB of data. Then I started to copy 
> each of these copies recursively onto disk 2 ( each to its 
> own location on that disk, of course ). I ran these copying 
> in parallel and the processes took about 6 to 7 minutes in 
> DOM0, while they needed between 14.6 and 15.9 minutes in DOMU. 
> 
> Essentially, this means that using this heavy io load on the 
> system I get back to my 40% ratio between io performance on 
> DOMU compared and io perfor- mance on DOM0 that I initially 
> reported. This may just be coincidence, but probably it is 
> worth mention. 

It's possible that the dom0 doing prefetch as well as the domU is
messing up random IO performance. Do the iostat numbers suggest dom0 is
reading more data overall when doing it on behalf of a domU?

We'll need a simpler way of reproducing this if any headway is to be
made debugging it.

It might be worth writing a program to do psuedo-random IO reads to a
partition, both in DIRECT and normal mode, then run it in dom0 and domU.

[Chris: you have such a program already, right? Can you post it, thanks]

Ian

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: Re: poor domU VBD performance.
@ 2005-04-04 19:36 Ian Pratt
  2005-04-04 22:35 ` Nicholas Lee
  0 siblings, 1 reply; 41+ messages in thread
From: Ian Pratt @ 2005-04-04 19:36 UTC (permalink / raw)
  To: Cédric Schieli; +Cc: peter bier, xen-devel

 > > SATA works fine for me on 2.0-testing.
> > I get 50MB/s reading from a raw partition in both cases using: 
> >  time dd if=/dev/sda6 of=/dev/null bs=1024k count=1024
> 
> I've tried with a raw partition (the same that holds the LVM 
> volume) and got same results : 51 MB/s on Dom0 and 37 MB/s on DomU
> 
> I don't know if it is of importance, but I need to add
> ignorebiostables=1 in my boot parameters in order to make the 
> SATA work (kernel hang on drive detection without it). The 
> SATA controller is a VIA one.

It doesn't sound like Xen is too happy on your system, but its not clear how this would explain the performance difference between dom0 and domU.

When the IOAPIC patches are checked in it will be interesting to see whether this fixes it. Try the unstable tree in a week or so.

Best,
Ian

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: Re: poor domU VBD performance.
@ 2005-04-03 16:38 Ian Pratt
  2005-04-04 19:13 ` Cédric Schieli
  0 siblings, 1 reply; 41+ messages in thread
From: Ian Pratt @ 2005-04-03 16:38 UTC (permalink / raw)
  To: Cédric Schieli, peter bier; +Cc: xen-devel

> I can confim the problem only occur on SATA.
> I've added an old IDE UDMA66 drive, created LVM volume from 
> it and ran same dd tests :
> Dom0 : 12 MB/s
> DomU : 12 MB/s

SATA works fine for me on 2.0-testing.
I get 50MB/s reading from a raw partition in both cases using: 
 time dd if=/dev/sda6 of=/dev/null bs=1024k count=1024

Can you try a raw partition rather than LVM?

Thanks,
Ian

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: poor domU VBD performance.
@ 2005-04-01 23:22 Ian Pratt
  2005-04-02 10:36 ` Cédric Schieli
  0 siblings, 1 reply; 41+ messages in thread
From: Ian Pratt @ 2005-04-01 23:22 UTC (permalink / raw)
  To: Cédric Schieli, Andrew Theurer
  Cc: Xen development list, Kurt Garloff, Philip R Auld,
	Vincent Hanquez, Jens Axboe, Christian Limpach

 
There have been some changes to the frontend driver too: you might want to try using the 2.0-testing kernel in domU too.

Also, a really nasty CPU performance bug got fixed earlier this evening, so you should make sure you have the latest tree.

Ian

> > I just ran again, and for some reason it looks fine now...  
> I have no 
> > idea what I did to get the lower numbers initially, perhaps an 
> > inadvertant IO scheduler change.  Service commit times are 
> .28ms and I 
> > can drive ~58MB/sec with just 16k requests on xen0.  I'll 
> do some more 
> > tests to get a more consistent picture.
> > 
> 
> I still experience bad performance in domU with latest 
> xen-testing dom0.
> 
> Here's my setup :
> 
> Xen : 2.0.5
> Dom0 : 2.6.11-xen-testing (20050401 ~22h CEST) running Debian 
> Sarge DomU : 2.6.10-xen-2.0.5 (8G LVM backed VBDs exported as 
> hda1) running Gentoo Processor : AthlonXP 1800+ Chipset : VIA 
> KT600 Drive : Seagate ST380013AS 80G SATA
> 
> And my results :
> 
> Dom0 : 51 MB/s
> DomU : 36 MB/s
> 
> I've tried with request sizes from 128k to 1024k reading 
> entire volume and obtained always same results.
> Changing the scheduler on Dom0 and/or DomU doesn't change anything.
> 
> I can give you more info if nedded.
> 
> --
> Cédric Schieli
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: Re: poor domU VBD performance.
@ 2005-04-01 17:46 Ian Pratt
  0 siblings, 0 replies; 41+ messages in thread
From: Ian Pratt @ 2005-04-01 17:46 UTC (permalink / raw)
  To: peter bier, xen-devel

 
> Now I have switched back to the filesystem operations. I do 
> this by copying a "/usr" subtree from a slackware-10.0 
> installation containg about 750 MB in 2200 directories and 
> 37000 files. Copying these  files with target directory on 
> the same device as the source directory, I get between 90 and 
> 93% of the per- formance in Dom0, when I work with DomU. When 
> copying form a directory on one device into a directory of 
> another device, performance in DomU leaks more behind that of 
> Dom0. It's only 50 to 60 percent of the Dom0 performance. The 
> performance is  less than it is when using only one disk. I 
> found out that the sum of the business of the two disks as 
> reported by iostat on Dom0 is always slightly above 100%.  
> Does this reflect that the reading and the writing both  go 
> through the VDB driver ? Both devices are never 100 % busy.

That latest 2.0-testing tree has some further blk queue plugging
enhancements along with a fix for another nasty performance bug. It
would be interesting to know whether that improves things.

It's possible that the blkring currently just isn't big enough if you're
trying to drive multiple devices with independent requests. 

Ian

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: Re: poor domU VBD performance.
@ 2005-03-29 14:19 Ian Pratt
  0 siblings, 0 replies; 41+ messages in thread
From: Ian Pratt @ 2005-03-29 14:19 UTC (permalink / raw)
  To: Ian Pratt, peter bier, xen-devel


> Would you mind repeating these experiments with a 2.4 dom0 
> and a 2.6domU
> ?

Also, please could you try exporting the device to the dom0 as a scsi
device e.g. sda1 rather than ide device hde1 or hda1. [Yes, I know this
shouldn't make any difference, but I have a suspicion it will.]

Thanks,
Ian

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: Re: poor domU VBD performance.
@ 2005-03-29 13:38 Ian Pratt
  2005-03-29 14:28 ` B.G. Bruce
  0 siblings, 1 reply; 41+ messages in thread
From: Ian Pratt @ 2005-03-29 13:38 UTC (permalink / raw)
  To: peter bier, xen-devel

> "dd if=/dev/hde1 of=/dev/null bs=1024k count=1024"
> 
> in domU. 
> 
> hdparm told that the default setup was 256k readahead.

Do you mean KB or sectors?

> I have tested the performance with the following readahead settings:
> 
> readahead    |     duration 
> 128 sectors  |     160 sec
> 256 sectors  |      76 sec
> 512 sectors  |      18.5 sec
> 1024 sectors |      19.5 sec
> 1200 sectors |     457 sec
> dom0 takes 18.0 secs no matter of the readahead setting in Dom0 is.

Would you mind repeating these experiments with a 2.4 dom0 and a 2.6domU
?

The performance cliff below 512 and above 1024 sectors is spectacular.
This is all rather confusing, but at least we know it can be made to
work fast. Changing the domU readahead is unlikely to be the right fix.
We just need to figure out how to keep it on the sweet spot...
Thanks,
Ian
 

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: Re: poor domU VBD performance.
@ 2005-03-29  8:13 Ian Pratt
  2005-03-29 18:39 ` Andrew Theurer
  0 siblings, 1 reply; 41+ messages in thread
From: Ian Pratt @ 2005-03-29  8:13 UTC (permalink / raw)
  To: Andrew Theurer, Peter Bier, xen-devel

> It looks like there might be a problem were we are not 
> getting a timely 
> response back from dom0 VBD driver that the io request is 
> complete, which 
> limits the number of outstanding requests to a level which 
> cannot keep the 
> disk utilized well.  If you drive enough IO outstanding 
> requests (which can 
> be done with either o-direct with large request or a much 
> larger readahead 
> setting with buffered IO), it's not an issue. 

Andrew, please could you try this with a 2.4 dom0, 2.6 domU.
Thanks,
Ian

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: poor domU VBD performance.
@ 2005-03-28 20:14 Ian Pratt
  2005-03-28 21:48 ` Andrew Theurer
  2005-03-29 13:34 ` Kurt Garloff
  0 siblings, 2 replies; 41+ messages in thread
From: Ian Pratt @ 2005-03-28 20:14 UTC (permalink / raw)
  To: Andrew Theurer, Peter Bier, xen-devel

> > > > I found out that dom0 does file-system IO and raw IO ( using
> > > > dd as a tool to test
> > > > throughput from the disk ) is about exactly the same as when
> > > > using a standard
> > > > linux kernel without XEN. But the raw IO from DomU to an
> > > > unused disk ( a second
> > > > disk in the system ) is limited to fourty percent of the
> > > > speed I get within Dom0.
> 
> Is the second disk exactly the same as the first one?  I'll 
> try an IO test 
> here on the same disk array with dom0 and domU and see what I get.

I've reproduced the problem and its a real issue. 

It only affects reads, and is almost certainly down to how the blkback
driver passes requests down to the actual device.

Does anyone on the list actually understand the changes made to linux
block IO between 2.4 and 2.6?

In the 2.6 blkfront there is no run_task_queue() to flush requests to
the lower layer, and we use submit_bio() instead of 2.4's
generic_make_request(). It looks like this is happening syncronously
rather than queueing multiple requests. What should we be doing to cause
things to be batched?

Thanks,
Ian

 

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2005-04-12 10:51 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-30 11:16 RE: RE: poor domU VBD performance Ian Pratt
2005-03-30 17:01 ` peter bier
2005-03-30 18:05   ` Andrew Theurer
2005-03-31  7:05 ` RE: " Jens Axboe
2005-03-31  7:10   ` Jens Axboe
2005-03-31  8:17     ` Keir Fraser
2005-03-31  8:19       ` Jens Axboe
2005-03-31 14:33         ` Philip R Auld
2005-03-31 15:34           ` Kurt Garloff
2005-03-31 15:39             ` Jens Axboe
2005-03-31 15:41               ` Jens Axboe
2005-03-31 16:27                 ` Nivedita Singhvi
2005-03-31 17:43                   ` Jens Axboe
2005-03-31 18:27                   ` Kurt Garloff
2005-03-31 21:59                     ` Nivedita Singhvi
2005-03-31 15:49               ` Keir Fraser
2005-03-31 16:02                 ` Andrew Theurer
2005-03-31 17:44                 ` Jens Axboe
2005-03-31 16:55               ` Philip R Auld
2005-03-31 16:53             ` Philip R Auld
2005-03-31 18:01               ` Jens Axboe
2005-03-31 18:43                 ` Philip R Auld
2005-03-31 19:07                   ` Keir Fraser
2005-03-31 19:10                     ` Keir Fraser
2005-03-31 19:20                     ` Jens Axboe
2005-03-31 19:21                   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2005-04-12 10:51 Ian Pratt
2005-04-04 19:36 Ian Pratt
2005-04-04 22:35 ` Nicholas Lee
2005-04-03 16:38 Ian Pratt
2005-04-04 19:13 ` Cédric Schieli
2005-04-01 23:22 Ian Pratt
2005-04-02 10:36 ` Cédric Schieli
2005-04-02 19:54   ` peter bier
2005-04-03 15:27     ` Cédric Schieli
2005-04-01 17:46 Ian Pratt
2005-03-29 14:19 Ian Pratt
2005-03-29 13:38 Ian Pratt
2005-03-29 14:28 ` B.G. Bruce
2005-03-29  8:13 Ian Pratt
2005-03-29 18:39 ` Andrew Theurer
2005-03-29 19:13   ` Steven Hand
2005-03-28 20:14 Ian Pratt
2005-03-28 21:48 ` Andrew Theurer
2005-03-28 23:38   ` Peter Bier
2005-03-29  0:27     ` Andrew Theurer
2005-03-29 13:34 ` Kurt Garloff

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.