From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Tizzoni Subject: Sending packet at fixed rate really bad performance Date: Sun, 27 Sep 2009 19:26:49 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 =A0handle 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 =A0 =A0 =A0 =A0 =A0 =A0 | 10.03 100 =A0 =A0 =A0 =A0 =A0 | 100.05 200 =A0 =A0 =A0 =A0 =A0 | 200.04 500 =A0 =A0 =A0 =A0 =A0 | 250.04 1000 =A0 =A0 =A0 =A0 | 250.18 10000 =A0 =A0 =A0 =A0| 247.49 20000 =A0 =A0 =A0 =A0| 250.26 40000 =A0 =A0 =A0 =A0| 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 thi= s: ------------------ for (;;) send_pkt(); ------------------ while the fixed rate use setitimer to wake up send_pkt() when needed. Any idea of why this happen? bye, Marco