From owner-freebsd-xen@FreeBSD.ORG Fri Apr 18 14:57:48 2014 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 730D32FA for ; Fri, 18 Apr 2014 14:57:48 +0000 (UTC) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F5AF18B5 for ; Fri, 18 Apr 2014 14:57:47 +0000 (UTC) Received: by mail-wi0-f175.google.com with SMTP id cc10so801277wib.8 for ; Fri, 18 Apr 2014 07:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=11k+NXatbveV1KUNW4EpNqNuIZqGQNhL7fXD2u7zg2s=; b=kTmCPz9w3HBKaWhnaHNYoTsZSvEJvwN9du47NAiieOfU1oPMNadb4TsPiXQjotvG8P rp553mpkMc93aD5p3oEKbE0bRNGXyYMa5rfK9fGis8RPX48BmxRa6FENGlwi+u7Ilx3W olFcl6A4PXKizYr1arTd40hmZQXtgdBmJ233QByvWhXUQtRSyt5NNkh3rjm5dz/4N3xA ltO9BFksVGX7/NAjijGdFJlUD4DgMq46OGQGkzTuaTSt2gg11SnQiTBACy/pj4A2rfN2 0QD0CL9mOBwdG7His9F54GnkYPQvheqZW0Ep9A7YoKpxPD003ueBdBUVTg0nIF5uL6RL E3yA== MIME-Version: 1.0 X-Received: by 10.180.76.244 with SMTP id n20mr2751948wiw.4.1397833066369; Fri, 18 Apr 2014 07:57:46 -0700 (PDT) Received: by 10.216.61.203 with HTTP; Fri, 18 Apr 2014 07:57:46 -0700 (PDT) Date: Fri, 18 Apr 2014 15:57:46 +0100 Message-ID: Subject: VM in Xen 4.1; poor packet forwarding performance on xn0 From: "seanrees@gmail.com" To: freebsd-xen@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 14:57:48 -0000 Hi there freebsd-xen, I tried first on freebsd-questions@ without success, so I thought to retry here. I run OpenVPN on a FreeBSD 10.0-Rp1 VM in Xen 4.1 (HVM). I am experiencing slow network performance on xn0 that seems to have developed after I upgraded to FreeBSD 10 (no other changes). I can only achieve about 0.5mbps through this interface when forwarding packets; packets in a single direction are fine (e.g; downloading to the VPS or pushing from the VPS) and clock in at many (>10 usually) mbps. Interestingly, my identical VM (configuration managed centrally) running on Xen 3.4 (HVM) does *not* have this issue. I did a little debugging and here's what I've noticed: - Not related to OpenVPN, repro'd using ssh -d. - Slow VM has a very low rate of context switches (~250) while forwarding, fast VM has a lot more (~2000) sampled over 5 seconds using systat -v. - I can't repro a context switch limit (tried a limited fork() bomb). - Tried with *and* without LRO and TSO on xn0 (and all combinations of LRO and TSO on/off) I started digging into the Xen drivers but I realised I am not equipped to debug this. I'm looking for suggestions on what to check. My provider is offering to move me to an older Xen host but I'd like to see if I can help identify a bug either in my configuration or perhaps in FreeBSD's Xen code. Sean