From owner-freebsd-xen@FreeBSD.ORG Sat Apr 19 13:17:35 2014 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F26BCE4 for ; Sat, 19 Apr 2014 13:17:35 +0000 (UTC) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (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 AB59A1278 for ; Sat, 19 Apr 2014 13:17:34 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id w61so2408559wes.32 for ; Sat, 19 Apr 2014 06:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IkM+RePSNTSFA/KLVQV7Rp+LW4MDd/+JRQD6rpr9VF8=; b=mifDLHBeF+h6raFUslchaHroHNBfk/+lZvPpxf0sd2BNJuEM9e1KxUVRIS88WKvZAv GRQLX2fyoJuCkeLfvdvJaLIHcQU/xSJrmqbQWlmvHEKTCsW6KsR83gMV8RaemsCIkduz 3/nK22nO39F/7hFMucCaqwja8a8FPM5W3oLpOqMWPsRyDgrc36XlPW5XYWYMdOaHLUpE eRMZZaX5OALKzDbE8ZLtVDaSEEl8+u/8UPxfZvZOYWTaMdE3EX3+SwxgP/rrrX+E5KKY Q7yOJYGwJtTjGnZKAdpK12pfSmJp6I5OPfY3GK5bv/U/K3q7m5dF4QTM58JVIY4i4Siw 7a4A== MIME-Version: 1.0 X-Received: by 10.194.78.77 with SMTP id z13mr41115wjw.64.1397913452766; Sat, 19 Apr 2014 06:17:32 -0700 (PDT) Received: by 10.216.61.203 with HTTP; Sat, 19 Apr 2014 06:17:32 -0700 (PDT) In-Reply-To: <2C3A747F-DA88-4815-A930-7C5EB1CD6238@gmail.com> References: <2C3A747F-DA88-4815-A930-7C5EB1CD6238@gmail.com> Date: Sat, 19 Apr 2014 14:17:32 +0100 Message-ID: Subject: Re: VM in Xen 4.1; poor packet forwarding performance on xn0 From: "seanrees@gmail.com" To: Tiago Ribeiro Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: "freebsd-xen@freebsd.org" 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: Sat, 19 Apr 2014 13:17:35 -0000 On Sat, Apr 19, 2014 at 1:11 PM, Tiago Ribeiro wrote: > > > > Em 18/04/2014, =C3=A0s 11:57, "seanrees@gmail.com" > escreveu: > > > > 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) runnin= g > 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 i= s > > 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 > > _____________________________________________ > > > Do you use pf? I do. Fairly simple ruleset: default deny, a few specific port allows, NAT. Sean