All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Interrupt levels
@ 2005-03-08 11:07 Ian Pratt
  2005-03-08 23:17 ` Nicholas Lee
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Pratt @ 2005-03-08 11:07 UTC (permalink / raw)
  To: Nicholas Lee, Keir Fraser; +Cc: xen-devel, ian.pratt

 
> > This can happen if you block/unblock very frequently. The timer 
> > interrupt from Xen isn't entirely tick-based -- you also 
> get a timer 
> > interrupt every time you are rescheduled.
> 
> By block/unblock I assume you mean context switching between different
> domains. Is this level normal? Is there a method to track down exactly
> is causing the block/unblocking?
> 
> > So the large number of timer interrupts indicates lots of 
> unblocking. 
> > Really we should hold-off the timer interrupt if the domain was 
> > descheduled for less than a jiffy. :-)
> 
> Is there a way to fix this at the moment?

Since processing timer interrupts are cheap there's no urgent fix
required.
The real question is why are you blocking/unblocking at a rate of
55k/second.

What are your domains doing? What interrupt rates do they see?

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: Interrupt levels
@ 2005-03-10  2:28 Ian Pratt
  2005-03-10  5:41 ` Nicholas Lee
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Pratt @ 2005-03-10  2:28 UTC (permalink / raw)
  To: Nicholas Lee; +Cc: xen-devel, ian.pratt

 > The exact problem is 'bridge hello time' being set to zero.
> 
> When I when I switch between '0' and '1' hello time via:
> 
> auto internal-br
> iface internal-br inet static
>         address 10.8.0.254
>         netmask 255.255.0.0
>         network 10.8.0.0
>         broadcast 10.8.255.255
>         bridge_ports eth1
>         bridge_fd 0
>         bridge_hello 1
>         bridge_stp off

Yep, this is a problem that's cropped up several times before. I would
argue strongly that it's a bug in the bridge code to add a timer for the
current jiffies value.

On native I think you get away with is as the timer won't fire until the
next jiffie. On Xen, you'll enter Xen and then bounce straight back out
as the time has already passed.

I think we may have to hack arch xen to round to the next jiffie to
match the native behaviour.

However, the bridge's behaviour is still pretty evil -- you'll still end
up executing the code HZ (100/1000) times a second, and the intention of
the user was probably to disable execution of the code altogether. It
won't slay the machine (like executing int 200k times a second), but its
not ideal.

Ian








-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: Interrupt levels
@ 2005-03-09 22:24 Ian Pratt
  2005-03-10  1:56 ` Nicholas Lee
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Pratt @ 2005-03-09 22:24 UTC (permalink / raw)
  To: Nicholas Lee; +Cc: xen-devel, ian.pratt

 

> -----Original Message-----
> From: Nicholas Lee [mailto:nic-lists@plumtree.co.nz] 
> Sent: 09 March 2005 22:13
> To: Ian Pratt
> Cc: xen-devel@lists.sourceforge.net; ian.pratt@cl.cam.ac.uk
> Subject: Re: [Xen-devel] Interrupt levels
> 
> On Wed, Mar 09, 2005 at 09:33:06PM -0000, Ian Pratt wrote:
> >  http://www.cl.cam.ac.uk/netos/xen/downloads/xendemo-2.0-beta1.iso
> 
> Since I'm not sitting on JAnet at the moment and just a proxie DSL
> connection I'll have to skipping downloading that.
> 
> Which kernel is it running?

2.0-testing from a few days ago.

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: Interrupt levels
@ 2005-03-09 21:33 Ian Pratt
  2005-03-09 22:12 ` Nicholas Lee
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Pratt @ 2005-03-09 21:33 UTC (permalink / raw)
  To: Nicholas Lee; +Cc: xen-devel, ian.pratt

> On Wed, Mar 09, 2005 at 03:20:41PM -0000, Ian Pratt wrote:
> > 
> > I just tried booting the demo CD on a machine with an MPT 
> Fusion card (a
> > sun V20z) and it worked fine.
> 
> Have you tried running Xen from the MPT card in a similar 
> setup as mine?
> 
> I've got
> xencd-base_xen-2.0.4_20050225T220000.iso
> 
> and the latest release:
> 
> xencd 1.0rc01.
> 
> Which one did you use?  

 http://www.cl.cam.ac.uk/netos/xen/downloads/xendemo-2.0-beta1.iso


Ian 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: Interrupt levels
@ 2005-03-09 15:20 Ian Pratt
  2005-03-09 20:03 ` Nicholas Lee
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Pratt @ 2005-03-09 15:20 UTC (permalink / raw)
  To: Nicholas Lee; +Cc: xen-devel, ian.pratt


I just tried booting the demo CD on a machine with an MPT Fusion card (a
sun V20z) and it worked fine.

Even doing a 'find . | xargs cat >/dev/null' I only got 10k interrupts a
second.

It'll be interesting to hear what it does on your machine.

Ian

> -----Original Message-----
> From: Nicholas Lee [mailto:nic-lists@plumtree.co.nz] 
> Sent: 09 March 2005 10:59
> To: Ian Pratt
> Cc: xen-devel@lists.sourceforge.net; ian.pratt@cl.cam.ac.uk
> Subject: Re: [Xen-devel] Interrupt levels
> 
> On Wed, Mar 09, 2005 at 09:38:44AM -0000, Ian Pratt wrote:
> > Things do rather point at your fusion mpt scsi card driver. It's odd
> > that it's the timer interrupt that counts fast rather than the
> > associated device interrupt, but this could be because its always
> > setting an 'add_timer' to go off in the very near future.
> 
> nic@stateless:/usr/src/xen/xen-2.0-testing.bk/linux-2.6.10-xen
0/drivers/message/fusion$ grep -rs add_time .
> ./mptbase.c:    add_timer(&pCfg->timer);
> ./mptbase.c:    add_timer(&pCfg->timer);
> ./mptctl.c:                                     
> add_timer(&ioc->ioctl->timer);
> ./mptctl.c:     add_timer(&ioctl->TMtimer);
> ./mptctl.c:     add_timer(&ioc->ioctl->timer);
> ./mptscsih.c:    * and add_timer
> ./mptscsih.c:   add_timer(&hd->TMtimer);
> ./mptscsih.c:   add_timer(&hd->timer);
> ./mptscsih.c:   add_timer(&hd->timer);
> 
> 
> Which is likely to be the one to look at closer? Not being a kernel
> expert myself.
> 
> 
> What about XFS? Could that cause this issue?
> 
> 
> I'll see if I can get out there tomorrow afternoon and try the text
> based CD.
> 
> Testing has the same problem:
> 
> ERROR: cannot use unconfigured serial port COM1
>  __  __            ____    ___
>  \ \/ /___ _ __   |___ \  / _ \
>   \  // _ \ '_ \    __) || | | |
>   /  \  __/ | | |  / __/ | |_| |
>  /_/\_\___|_| |_| |_____(_)___/
> 
>  http://www.cl.cam.ac.uk/netos/xen
>  University of Cambridge Computer Laboratory
> 
>  Xen version 2.0 (nic@) (gcc version 3.3.5 (Debian 
> 1:3.3.5-8)) Wed Mar  9 21:00:54 NZDT 2005
>  Latest ChangeSet: 2005/03/09 02:02:39 1.1768 
> 422e593fP_MDJ47j5LhtS8fQOVuyAQ
> 
> 
> nic@stateless:~$ vmstat 3
> procs -----------memory---------- ---swap-- -----io---- 
> --system-- ----cpu----
>  r  b   swpd   free   buff  cache   si   so    bi    bo   in  
>   cs us sy id wa
>  0  0      0 215240    104  15328    0    0   179    36 
> 150999   137  4  1 92  2
>  0  0      0 215240    104  15328    0    0     0     0 
> 202363    11  0  0 100  0
>  0  0      0 215248    104  15328    0    0     0   239 
> 205301    49  0  0 100  0
>  0  0      0 215248    104  15328    0    0     0     0 
> 202289     8  0  0 100  0
>  0  0      0 215248    104  15328    0    0     0     6 
> 202663    13  0  0 100  0
>  0  0      0 215248    104  15328    0    0     0   163 
> 204469    44  0  0 100  0
>  0  0      0 215248    104  15328    0    0     0     0 
> 205706     8  0  0 100  0
> 
> This is again a clean state, with no xend only the processes from the
> previous 'ps awx' running.
> 
> 
> MPT is in the kernel, but not mptctl.
> 
> Nicholas
> 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: Interrupt levels
@ 2005-03-09  9:38 Ian Pratt
  2005-03-09 10:59 ` Nicholas Lee
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Pratt @ 2005-03-09  9:38 UTC (permalink / raw)
  To: Nicholas Lee; +Cc: xen-devel, ian.pratt

 > > get the same problem. Since its running off CD it won't 
> have a driver
> > for your scsi card, which might eliminate that as the candidate. I'm
> > also very interested in the USB setup on the machine. Can 
> you boot it
> > with any usb modules moved out of the way so the kernel 
> can't load them?
> 
> Default kernel doesn't have any USB modules compiled in:

Things do rather point at your fusion mpt scsi card driver. It's odd
that it's the timer interrupt that counts fast rather than the
associated device interrupt, but this could be because its always
setting an 'add_timer' to go off in the very near future.

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: Interrupt levels
@ 2005-03-09  8:47 Ian Pratt
  2005-03-09  9:22 ` Nicholas Lee
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Pratt @ 2005-03-09  8:47 UTC (permalink / raw)
  To: Nicholas Lee; +Cc: xen-devel, ian.pratt

 
> On Wed, Mar 09, 2005 at 08:03:49AM -0000, Ian Pratt wrote:
> > At what point does the high interrupt rate start happening? 
> > Does it happen with just dom0 running? When you start xend? When you
> > start dom1?
> 
> As soon as I ssh into the machine. With just the services shown in 'ps
> axw' list running. ie. no xend.

With just a mostly idle dom0 running there's no way should be getting
50k interrupts a second. I think it must be being caused by a bad
interaction with one of your hardware devices. Could you try out the
beta of the graphical demo CD I posted a few days back and see if you
get the same problem. Since its running off CD it won't have a driver
for your scsi card, which might eliminate that as the candidate. I'm
also very interested in the USB setup on the machine. Can you boot it
with any usb modules moved out of the way so the kernel can't load them?

> How stable is testing at the moment? 

I would defnitely use 2.0-testing over 2.0.4 at the moment -- we're on
the verge of releasing 2.0.5 but I want to understand your interupt
storm issue.

Ian 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: Interrupt levels
@ 2005-03-09  8:03 Ian Pratt
  2005-03-09  8:17 ` Nicholas Lee
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Pratt @ 2005-03-09  8:03 UTC (permalink / raw)
  To: Nicholas Lee, xen-devel; +Cc: ian.pratt

 

> > > I doubt its anything to do with spinlocks, but this issue 
> is going to be
> > > much easier to figure out if it occurs on a freshly 
> booted machine with
> > > just a dom0, no xend (hence no bridge).
> > 
> > I'll build a minimal config kernal and test it this evening.
> 
> Default kernel with the attach difference from default.
> 
> Same problem.

At what point does the high interrupt rate start happening? 
Does it happen with just dom0 running? When you start xend? When you
start dom1?

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: Interrupt levels
@ 2005-03-08 23:24 Ian Pratt
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Pratt @ 2005-03-08 23:24 UTC (permalink / raw)
  To: Nicholas Lee; +Cc: Keir Fraser, xen-devel, ian.pratt

> On Tue, Mar 08, 2005 at 11:07:53AM -0000, Ian Pratt wrote:
> > Since processing timer interrupts are cheap there's no urgent fix
> > required.
> > The real question is why are you blocking/unblocking at a rate of
> > 55k/second.
> 
> Seems to be affecting my interactive latency though. I was going to
> test a headless NX desktop install, I'll probably hold off on 
> that for a
> little while.

55k interrupts/second will certainly make things seem sluggish. 
There's something bad happening on your system.
 
> NFS, qmail, apache/php, imap and openvpn are the main 
> services. Very low
> load. Two imap sessions, one openvpn sessions. Not more than 
> 2000 emails
> per day.  CRM114 and clamav virus/spam scanning. mutt.
> 
> Postgres and mysql, on very low loads.
> 
> vmstat intr figures for the guest domU domains is usually <30.
> 
> I'm going reduce a dom0 kernel configure to the minimal and 
> see how that
> functions.

It would be very helpful if you could see whether you can reproduce this
with just dom0, or with one of our stock 2.0-testing kernels.

I'd like to get to the bottom of this before announcing 2.0.5.

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: Interrupt levels
@ 2005-03-08 12:50 Ian Pratt
  2005-03-09  0:48 ` Nicholas Lee
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Pratt @ 2005-03-08 12:50 UTC (permalink / raw)
  To: Nicholas Lee, xen-devel; +Cc: ian.pratt


> In fact in a new rebooted machine with hardly anything 
> running the same
> is occuring.   Seems like some spinlock out of control.

I doubt its anything to do with spinlocks, but this issue is going to be
much easier to figure out if it occurs on a freshly booted machine with
just a dom0, no xend (hence no bridge).

Please can you confirm that this is the case. Is it just the timer
interrupt line that's going up fast?
(BTW: what is ioc0?)

Exactly what kernel are you using? Have you modified the config?
What hardware are you using (including any USB devices)?

Thanks,
Ian



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: Interrupt levels
@ 2005-03-08  7:52 Ian Pratt
  2005-03-08  8:50 ` Nicholas Lee
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Pratt @ 2005-03-08  7:52 UTC (permalink / raw)
  To: Nicholas Lee, xen-devel; +Cc: ian.pratt

 > nic@stateless:~$ vmstat 3
> procs -----------memory---------- ---swap-- -----io---- 
> --system-- ----cpu----
>  0  0     12  10680     40  31168    0    0     0    15 
> 173097    20  0  0 100  0
>  
> Is this level of interrupts reasonable? 

55k interrupts a second on a supposedly idle machine is way too many.
Please can you post the ouput of 'cat /proc/interupts' a few seconds
appart.

Have you any USB devices connected?

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 30+ messages in thread
* Interrupt levels
@ 2005-03-08  6:52 Nicholas Lee
  2005-03-08 21:58 ` Kurt Garloff
  0 siblings, 1 reply; 30+ messages in thread
From: Nicholas Lee @ 2005-03-08  6:52 UTC (permalink / raw)
  To: xen-devel


I'm tracking performance on the machine I installed yesterday.

mutt running on one Xen instance, accessing via imap to another
instance, accessing via nfs the maildir in another instances, seems
little laggy when moving up and down the message index list.

Network latency seems low < 30ms on average.

So I was tracking vmstat.

On the mutt instances is seems reasonable:

[nic@shell:~] vmstat 3
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 0  0      0 144464      4 127748    0    0     0     0   36     6  0  0 100  0
 0  0      0 144464      4 127748    0    0     0     0   87    67  1  0 99  0
 0  0      0 144464      4 127748    0    0     0     0   90    83  0  0 100  0
 0  0      0 144464      4 127748    0    0     0     0   27    14  0  0 100  0
 0  0      0 144464      4 127748    0    0     0     0   10     7  0  0 100  0
 0  0      0 144400      4 127748    0    0     0    19   77    56  0  0 100  0


However on the dom0 instance (which doesn't run any of the above
services, just the bridge) is seems very high:

nic@stateless:~$ vmstat 3
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 0  0     12  10640     40  31168    0    0    17    25   94    19  0  1 99  0
 0  0     12  10576     40  31168    0    0     0    17 170616    16  0  0 100  0
 0  0     12  10616     40  31168    0    0     0     0 171948    10  0  0 100  0
 0  0     12  10680     40  31168    0    0     0     0 171134    10  0  0 100  0
 0  0     12  10680     40  31168    0    0     0     3 169175    11  0  0 100  0
 0  0     12  10680     40  31168    0    0     0    15 173097    20  0  0 100  0


Is this level of interrupts reasonable? 


This currently a UP Xen 2.8 machine with 5 domX instances running
without a large amount of load.



Nicholas


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

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

end of thread, other threads:[~2005-03-10 10:47 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-08 11:07 Interrupt levels Ian Pratt
2005-03-08 23:17 ` Nicholas Lee
2005-03-08 23:22   ` Nivedita Singhvi
2005-03-09  0:38     ` Nicholas Lee
  -- strict thread matches above, loose matches on Subject: below --
2005-03-10  2:28 Ian Pratt
2005-03-10  5:41 ` Nicholas Lee
2005-03-10 10:47   ` James Bulpin
2005-03-09 22:24 Ian Pratt
2005-03-10  1:56 ` Nicholas Lee
2005-03-09 21:33 Ian Pratt
2005-03-09 22:12 ` Nicholas Lee
2005-03-09 15:20 Ian Pratt
2005-03-09 20:03 ` Nicholas Lee
2005-03-09  9:38 Ian Pratt
2005-03-09 10:59 ` Nicholas Lee
2005-03-09  8:47 Ian Pratt
2005-03-09  9:22 ` Nicholas Lee
2005-03-09  8:03 Ian Pratt
2005-03-09  8:17 ` Nicholas Lee
2005-03-08 23:24 Ian Pratt
2005-03-08 12:50 Ian Pratt
2005-03-09  0:48 ` Nicholas Lee
2005-03-09  3:32   ` Nicholas Lee
2005-03-08  7:52 Ian Pratt
2005-03-08  8:50 ` Nicholas Lee
2005-03-08  9:14   ` Keir Fraser
2005-03-08  9:45     ` Nicholas Lee
2005-03-08 11:45   ` Nicholas Lee
2005-03-08  6:52 Nicholas Lee
2005-03-08 21:58 ` 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.