xen 3 dom0 eats memory
Hi!
Since my upgrade from xen 2-testing to xen 3-testing I have the problem that domain0 consumes more and more memory on domU networktraffic. It is about 50 bytes per packet that gets lost.
I reproduced the bug on another machine.
In normal bridged setup all works fine.
I changed the setup in the following way:
- added an ip address to the bridge (in another subnet (B))
- changed domU ip address to a net B address
- added masquerading for eth0 in the postrouting-chain in dom0
After that I pinged a host outside this machine.
Sending and receiving 100.000 pakets results to a dom0-memory-consumption increasement of about 5 MB!
I have to restart this machine once a day for not running out of memory.
What can I do?
Patrick
Quoted 5 lines
I changed the setup in the following way:
- added an ip address to the bridge (in another subnet (B))
- changed domU ip address to a net B address
- added masquerading for eth0 in the postrouting-chain in dom0
What iptables rules do you use to set this up? Is the gateway address for domU the net B address interface you add to the bridge?
It's worth trying 'ethtool -K eth0 tx off' in domU to turn off checksum offload, just in case that is causing problems.
-- Keir
Quoted 15 lines
After that I pinged a host outside this machine.
Sending and receiving 100.000 pakets results to a dom0-memory-consumption increasement of about 5 MB!
I have to restart this machine once a day for not running out of memory.
What can I do?
Patrick
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 7 lines
Quoted 5 lines
I changed the setup in the following way:
- added an ip address to the bridge (in another subnet (B))
- changed domU ip address to a net B address
- added masquerading for eth0 in the postrouting-chain in dom0What iptables rules do you use to set this up?
I used "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" for masquerading.
Quoted 1 line
Is the gateway address for domU the net B address interface you add to the bridge?
Yes that right, i forgot to mention that.
I have one official address on dom0 eth0 and a privat class B network for the domU's. The address used on the bridge is from this private network and the gateway for the domU's
Quoted 1 line
It's worth trying 'ethtool -K eth0 tx off' in domU to turn off checksum offload, just in case that is causing problems.
Checksum offload is turned off in all domU's.
The problem only appears if the pakets are masqueraded. Pinging the gateway-address (the one on the bridge-if) or the dom0-eth0-address causes no memory consumption
Patrick
Quoted 8 lines · Patrick Scharrenberg
Quoted 1 line
What iptables rules do you use to set this up?
I used "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" for masquerading.
Quoted 1 line
Is the gateway address for domU the net B address interface you add to the bridge?
Yes that right, i forgot to mention that.
I have one official address on dom0 eth0 and a privat class B network for the domU's. The address used on the bridge is from this private network and the gateway for the domU's
What interface do you attach the domU gateway address to?
-- Keir
Quoted 12 lines
Quoted 9 lines
Quoted 3 lines
Is the gateway address for domU the net B address interface you add to the bridge?
Yes that right, i forgot to mention that.
I have one official address on dom0 eth0 and a privat class B network for the domU's.
The address used on the bridge is from this private network and the gateway for the domU'sWhat interface do you attach the domU gateway address to?
it's the xen-bridge-interface where I set the domU gateway address.
Patrick
Quoted 4 lines · Patrick Scharrenberg
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Is the gateway address for domU the net B address interface you add to the bridge?
Yes that right, i forgot to mention that.
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
I have one official address on dom0 eth0 and a privat class B network for the domU's.
The address used on the bridge is from this private network and the gateway for the domU'sWhat interface do you attach the domU gateway address to?
it's the xen-bridge-interface where I set the domU gateway address.
I can't repro the problem. My setup is that the domU vif is the only interface I attach to the bridge (eth0 is not attached). I give the bridge address 10.0.0.1, enable IP forwarding, and set up IP masquerade on eth0. I set domU IP address to 10.0.02 gw 10.0.0.1 and disable transmit checksumming. I then did a TCP bulk transfer to an external host (a few million packets) and observed no memory leak in domain 0.
-- Keir
Quoted 16 lines · Keir Fraser
Quoted 4 lines · Patrick Scharrenberg
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Is the gateway address for domU the net B address interface you add to the bridge?
Yes that right, i forgot to mention that.
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
I have one official address on dom0 eth0 and a privat class B network for the domU's.
The address used on the bridge is from this private network and the gateway for the domU'sWhat interface do you attach the domU gateway address to?
it's the xen-bridge-interface where I set the domU gateway address.
Quoted 8 lines
I can't repro the problem. My setup is that the domU vif is the only interface I attach to the bridge (eth0 is not attached). I give the bridge address 10.0.0.1, enable IP forwarding, and set up IP masquerade on eth0. I set domU IP address to 10.0.02 gw 10.0.0.1 and disable transmit checksumming. I then did a TCP bulk transfer to an external host (a few million packets) and observed no memory leak in domain 0.
Hmm.. thats strange, since I did nothing special.
Here once more what I did, maybe (hopefully) we misunderstood:
eth0 has my internet ip address.
I used the network-bridge-script to setup the (xen-) networking, set up ip 192.168.37.254 on xenbr0.
Then I startet domU.
After that I added masquerading to eth0.
I have the following interfaces in the bridge: peth0, vif0.0, vif1.0
I'm using debian sarge as os. Maybe they set something special in their networking-scripts?
It is a test-machine, so i can give you the root-pw, if nothing helps.
Patrick
Quoted 7 lines
-- Keir
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines · Patrick Scharrenberg
I used the network-bridge-script to setup the (xen-) networking, set up ip 192.168.37.254 on xenbr0.
Then I startet domU.
After that I added masquerading to eth0.
Possibly you can sidestep the whole issue, and end up with faster and simpler networking setup in dom0, by not using network-bridge and vif-bridge scripts at all. Instead make your own (much much simpler) scripts to set up NAT.
-- Keir
Hey Keir!
Quoted 6 lines
Quoted 4 lines
I used the network-bridge-script to setup the (xen-) networking, set up ip 192.168.37.254 on xenbr0.
Then I startet domU.
After that I added masquerading to eth0.Possibly you can sidestep the whole issue, and end up with faster and simpler networking setup in dom0, by not using network-bridge and vif-bridge scripts at all. Instead make your own (much much simpler) scripts to set up NAT.
I found another odd thing regarding the vif-interfaces that my has something to do with the problem mentioned before:
I have a high rate of dropped tx packets on all vif's except for vif 0.0.
As mentioned before, the config without eth0->peth0 renaming and without vif for dom0 and the rest of the vif's in the bridge works well.
Patrick