[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] xen network and samba



Niels Dettenbach wrote:

 >Also, DomU network access relies on a thread in Dom0. It's well known
that this can be a significant performance bottleneck.

Sorry, but can you explain this a bit more? This is partly new to me and sounds interesting...

I'm no expert, I'm sure someone will pop up and tell me it's all wrong ! This is also from the perspective of a PV guest (or at least using PV drivers) - there are some differences for HV guests.

DomU network traffic is handled by Dom0. Ie, when DomU "sends" a network packet, it stuffs it out though what looks like a NIC but is in fact an interface to code running in Dom0. This thread running in Dom0 then deals with passing the packet through to the right place - in a bridge setup, this will mean presenting it to the bridge as though it came from a NIC.

See this image (under DomU and Dom0 on real network) :
http://new-wiki.xen.org/old-wiki/xenwiki/XenNetworkingUsecase.html


The key thing is that eth0 in Dom1 is not a real NIC, it's a bit of Xen provided code that has the same interface to the guest OS as would be used for any other NIC. So the guest OS writes a packet using the standard interface for sending packets via a NIC. This netfront bit of Xen (running in DomU) now has the packet and passes it over to the netback bit of Xen (running in Dom0). This also behaves much like the driver for a real NIC, this time presenting a packet it's just received from it's 'network' - so to the bridge code on Dom0, it looks like the packet just arrived on interface vif1.0. The packet still has to go through the bridge code, and either out through a real NIC, through another virtual network to a different DomU, or be handled by Dom0 itself - depending on destination.

Receiving a packet is much the same, just the directions are swapped round.

Now from previous comments on this list, I believe the code in Dom0 that does all this packet handling is single threaded. In high traffic environments this means it becomes a bottleneck and people have benchmarked some poor results which are blamed on this. How much of an issue it is will vary considerably with the setup. If you have multiple cores dedicated (pinned) for Dom0 use only then it probably isn't an issue. If you don't have any cores pinned for Dom0 and/or don't have many cores, then it's more likely to be an issue. bear in mind that all your disk I/O has to go through a similar level of abstraction, so there's a lot going on in Dom0.

--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.