Skip to contentSkip to conversation

n/w performance degradation

DISCUSSION Diwaker Gupta 3 participants 7 messages Dec 5, 2005 – Dec 6, 2005

lore
Share & tools
lore
#0 lore raw

Hi folks,

I was to post this over the weekend, but didn't get around to it, and look in the meanwhile Xen 3.0.0 was released! Good work all around, but I got some performance problems to report :)

I'm running Changeset 00c349d5b40d269da4fec9510f1dd7c6bb3b3327. This is a dual CPU machine but I'm currently running with noht, nosmp. All tests are done using iperf -- both endpoints are sitting on the same switch on our cluster. The machines have Broadcom BCM5704 NICs.

N/W performance from dom0 seems fine (though I used to get 930+ until a few days back):

[ 6] 0.0-20.0 sec 1.95 GBytes 835 Mbits/sec

However, from a VM, the throughput is really bad:

[ 5] 0.0-20.0 sec 1.05 GBytes 450 Mbits/sec

The above numbers are using the BVT scheduler. With the SEDF scheduler, the numbers are even worse (a VM can't get more than 300Mbps in my tests). I can post concrete figures if people are interested. I'm _not_ running pipelined netback.

Is anyone else observing such performance problems?

Diwaker
--
Web/Blog/Gallery: http://floatingsun.net

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 5 lines · Diwaker Gupta

N/W performance from dom0 seems fine (though I used to get 930+ until a few days back):

[ 6] 0.0-20.0 sec 1.95 GBytes 835 Mbits/sec

Quoted 8 lines

However, from a VM, the throughput is really bad:

[ 5] 0.0-20.0 sec 1.05 GBytes 450 Mbits/sec

The above numbers are using the BVT scheduler. With the SEDF scheduler, the numbers are even worse (a VM can't get more than 300Mbps in my tests). I can post concrete figures if people are interested. I'm _not_ running pipelined netback.

We used to be able to saturate GigE with a single CPU, although admittedly burning quite a bit more CPU than using dom0 as the endpoint. I guess things have got out of tune, but there are a bunch of things we could do to encourage I/O batching ('x packets or y milliseconds' style receive batching, and transmitting batches of packets every x milliseconds or when the domU goes idle). This, together with scheduler tuning, should definitely get the performance back, although its a balancing act with one CPU to ensure no stage of the I/O processing pipeline gets starved.

-- Keir

#2 lore raw
Quoted 1 line

We used to be able to saturate GigE with a single CPU, although

Same here.

Quoted 8 lines

admittedly burning quite a bit more CPU than using dom0 as the endpoint. I guess things have got out of tune, but there are a bunch of things we could do to encourage I/O batching ('x packets or y milliseconds' style receive batching, and transmitting batches of packets every x milliseconds or when the domU goes idle). This, together with scheduler tuning, should definitely get the performance back, although its a balancing act with one CPU to ensure no stage of the I/O processing pipeline gets starved.

Look forward to it. Whats the deal with the pipelined backend? Whats the target scenario there?

Meanwhile, though I agree that SMPs and hyperthreaded processors are becoming the norm, it still doesn't solve this problem. Even on an SMP machine, I can have dom0 co-located with a VM on the same CPU, and I'm not sure how different that would be from the current situation.

On a related note, has anyone been working on the IDD stuff? Is it possible to wrap up a device driver in its own domain? The last time I tried, it basically wasn't possible, but I'd really be interested in helping out any which way to get it working.

Diwaker
--
Web/Blog/Gallery: http://floatingsun.net

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
Quoted 2 lines · Diwaker Gupta

Look forward to it. Whats the deal with the pipelined backend? Whats the target scenario there?

It's a form of request-notification avoidance. It allows the frontend to avoid sending a notification (virtual ipi) to the backend if any previous requests are still in flight (no response received). In some situations, pipelining can mean you basically need to send no notifications, because the backend will pull down new requests as it responds to old ones.

Thing is, it doesn;t work for some forms of packet processing in domain0. For example, if you send fragmented IP datagrams and they are reassembled in domain0 there may be a dependency between packets. Hence you need to send notifications even if buffers are in flight because you won't get a response until the datagram is reassembled and forwarded.

Quoted 4 lines

Meanwhile, though I agree that SMPs and hyperthreaded processors are becoming the norm, it still doesn't solve this problem. Even on an SMP machine, I can have dom0 co-located with a VM on the same CPU, and I'm not sure how different that would be from the current situation.

With enough hardware contexts, it'll soon become sensible to dedicate a context to domain0 or your IDD. It's certainly a very sensible use of a hyperthread (almost certainly a better use than multiprocessing within a guest, if you do a significant amount of i/o).

Quoted 4 lines

On a related note, has anyone been working on the IDD stuff? Is it possible to wrap up a device driver in its own domain? The last time I tried, it basically wasn't possible, but I'd really be interested in helping out any which way to get it working.

Needs some PCI virtualization in Xen (managed by platform code in domain0). Nothing too tricky I think.

-- Keir

#4 lore raw
In reply to Diwaker Gupta
Quoted 18 lines · Diwaker Gupta

Hi folks,

I was to post this over the weekend, but didn't get around to it, and look in the meanwhile Xen 3.0.0 was released! Good work all around, but I got some performance problems to report :)

I'm running Changeset 00c349d5b40d269da4fec9510f1dd7c6bb3b3327. This is a dual CPU machine but I'm currently running with noht, nosmp. All tests are done using iperf -- both endpoints are sitting on the same switch on our cluster. The machines have Broadcom BCM5704 NICs.

N/W performance from dom0 seems fine (though I used to get 930+ until a few days back):

[ 6] 0.0-20.0 sec 1.95 GBytes 835 Mbits/sec

However, from a VM, the throughput is really bad:

Quoted 8 lines

[ 5] 0.0-20.0 sec 1.05 GBytes 450 Mbits/sec

The above numbers are using the BVT scheduler. With the SEDF scheduler, the numbers are even worse (a VM can't get more than 300Mbps in my tests). I can post concrete figures if people are interested. I'm _not_ running pipelined netback.

Is anyone else observing such performance problems?

Diwaker,

Can you run oprofile and obtain any kind of breakdown on that, if possible? Also, are you dedicating individual CPUs to dom0 and guest? (Avoiding much of the context switching on I/O). What are your memory allocations? How much of a bump do you get if you increase memory?

thanks,
Nivedita

#5 lore raw
Quoted 4 lines

Diwaker,

Can you run oprofile and obtain any kind of breakdown on that, if possible?

Not today. Unfortunately I'm going to be offline for the next couple of weeks. Anyhow, I'll try to see if I can post some more data in the interim.

Quoted 3 lines

Also, are you dedicating individual
CPUs to dom0 and guest? (Avoiding much of the context switching on I/O)

Like I mentioned in my email, everything is on the same CPU right now (nosmp, noht)

Quoted 2 lines

What are your memory allocations? How much
of a bump do you get if you increase memory?

Currently, both dom0 and the vm have 128MB. I rebooted with dom0 having 512MB and VM with 256 MB. Here are the numbers:

dom0:
[ 5] 0.0-10.0 sec 987 MBytes 828 Mbits/sec

VM:
[ 5] 0.0-10.0 sec 938 MBytes 787 Mbits/sec

So getting slightly better. I haven't run these with SEDF though, above are using BVT.

--
Web/Blog/Gallery: http://floatingsun.net

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw
Quoted 3 lines · Diwaker Gupta

Not today. Unfortunately I'm going to be offline for the next couple of weeks. Anyhow, I'll try to see if I can post some more data in the interim.

No problem, thanks for running your tests again..

Quoted 7 lines
Quoted 2 lines

What are your memory allocations? How much
of a bump do you get if you increase memory?

Currently, both dom0 and the vm have 128MB. I rebooted with dom0 having 512MB and VM with 256 MB. Here are the numbers:

Quoted 8 lines

dom0:
[ 5] 0.0-10.0 sec 987 MBytes 828 Mbits/sec

VM:
[ 5] 0.0-10.0 sec 938 MBytes 787 Mbits/sec

So getting slightly better. I haven't run these with SEDF though, above are using BVT.

Yep, the bigger difference in Xen 3.0 is that it's just more sensitive to memory - when I tested earlier in the summer most of the difference between dom0 and domU could be gained back by 350MB dom0 and 512MB domUs doing heavy network traffic.

So you have:

128MB domU - 450 Mbits/sec
250MB domU - 787 Mbits/sec

Which is roughly the same amount off the linear that I recall..

thanks,
Nivedita