Sending packet at fixed rate really bad performance
Hi all,
I'm doing some tests about i/o performance and cpu overhead in dom0. I've coded a small tool that can sends UDP packets at fixed rate or flood. While sending packet at fixed rate I'm experiencing performance problem, related to how Xen handle signal, I guess.
On my laptop (Core2 duo P8700), with no Xen running, I can send packets at a rate of 20k, 40k, 60k, 80k/s achieving an actual packet rate per second pretty near to the requested rate.
On Xen (dom0 with no guest running and no load - Athlon 64 dual core 4000+ ), the performance are really bad.
Here what happen:
Requested | Actual
10 | 10.03
100 | 100.05 200 | 200.04 500 | 250.04 1000 | 250.18 10000 | 247.49 20000 | 250.26 40000 | 250.24
It seems impossibile to go over 250 packets/second, but in flood configuration (send packet as fast as possible) the actual rate is quite higher, 39k packets/second about.
The main difference is in the code. Flood loop as been implemented like this:
------------------
for (;;)
send_pkt();
------------------
while the fixed rate use setitimer to wake up send_pkt() when needed.
Any idea of why this happen?
bye,
Marco
Quoted 6 lines · Marco Tizzoni
Hi all,
I'm doing some tests about i/o performance and cpu overhead in dom0. I've coded a small tool that can sends UDP packets at fixed rate or flood. While sending packet at fixed rate I'm experiencing performance problem, related to how Xen handle signal, I guess.
Quoted 6 lines
On my laptop (Core2 duo P8700), with no Xen running, I can send packets at a rate of 20k, 40k, 60k, 80k/s achieving an actual packet rate per second pretty near to the requested rate.
On Xen (dom0 with no guest running and no load - Athlon 64 dual core 4000+ ), the performance are really bad.
Lets narrow this down a bit. You are comparing two different systems with potentially different interfaces. Lets concentrate on one machine first. Is the performance on your Athlon 64 without Xen (meaning you boot without Xen) in the same ball-park figure?
I want to make sure we can eliminate the hardware being at fault here.
Quoted 5 lines · Konrad Rzeszutek Wilk
Lets narrow this down a bit. You are comparing two different systems with potentially different interfaces. Lets concentrate on one machine first. Is the performance on your Athlon 64 without Xen (meaning you boot without Xen) in the same ball-park figure?
I want to make sure we can eliminate the hardware being at fault here.
I've already done many tests to isolate the problem before writing here. I've tried to use a different nic, different LAN, different switch and loopback as well, same results.
Anyway forget aboout Athlon and let compare the same software, on the same hardware with linux and xenolinux.
I've connected two pc running linux via a cross-cable and made some tests. The test achieves good results in this case for rate over 10k packets/second.
On xenolinux (credit and sedf behaviour the same) the performance are really bad, 250 packets/second (as before).
Also I've just modified my software to not send packets, but simply count, so no sendto() is involved. Same low rate.
May be there's something wrong in my code (not yet finished). Attached you can find it if you want have a look or try to reproduce this issue.
thx,
Marco
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 11 lines · Marco Tizzoni
Quoted 5 lines · Konrad Rzeszutek Wilk
Lets narrow this down a bit. You are comparing two different systems with potentially different interfaces. Lets concentrate on one machine first. Is the performance on your Athlon 64 without Xen (meaning you boot without Xen) in the same ball-park figure?
I want to make sure we can eliminate the hardware being at fault here.I've already done many tests to isolate the problem before writing here. I've tried to use a different nic, different LAN, different switch and loopback as well, same results.
The problem you described was with two guests. Were those two guests on two different machines or on the same box?
Quoted 9 lines
Anyway forget aboout Athlon and let compare the same software, on the same hardware with linux and xenolinux.
I've connected two pc running linux via a cross-cable and made some tests. The test achieves good results in this case for rate over 10k packets/second.
On xenolinux (credit and sedf behaviour the same) the performance are really bad, 250 packets/second (as before).
This is with two machines, each connected via cross-cable, running the same version of Linux, and each running under Xen, correct? The tests executing under dom0 on both machines?
Quoted 15 lines
Also I've just modified my software to not send packets, but simply count, so no
sendto()is involved. Same low rate.May be there's something wrong in my code (not yet finished). Attached you can find it if you want have a look or try to reproduce this issue.
thx,
Marco_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines · Konrad Rzeszutek Wilk
The problem you described was with two guests. Were those two guests on two different machines or on the same box?
The 1st box runs Xen and sends packet to the 2nd box.
The test runs on dom0 with no load at all (the same behaviour occurs with 1 domU sending packets and dom0 doing nothing).
The 2nd box doesn't run xen and receive and counts udp packets received without responding.
Quoted 10 lines
Quoted 9 lines
Anyway forget aboout Athlon and let compare the same software, on the same hardware with linux and xenolinux.
I've connected two pc running linux via a cross-cable and made some tests. The test achieves good results in this case for rate over 10k packets/second.
On xenolinux (credit and sedf behaviour the same) the performance are really bad, 250 packets/second (as before).
Quoted 2 lines
This is with two machines, each connected via cross-cable, running the same version of Linux, and each running under Xen, correct?
No, the 1st runs Xen and 2nd not.
Quoted 2 lines
The tests executing
under dom0 on both machines?
dom0 on the first box. domU, as said before, act in the same way.
Marco