[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XSA-332 kernel patch - huge network performance on pfSense VMs


  • To: Samuel Verschelde <samuel.verschelde@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 3 Feb 2021 20:47:25 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hfvo2o5oAnfmFGbVgAajbGLECLlQJM7Qv3dgtr2MtPI=; b=NXKYUdfF7PjD4x+iAtt4vsWqhw0mBxNEcQQL5LGDSvIczyloWgrb31bQ6SWd4HezhNI1rBFgiAzgix+5mbJD2OadJfIRVNmvQUiVK/d150oqfHenFSjoFjy6NQyEt2YnatQDMHm/k8FQIf1IPUPV63/6xzF+QRwaTVpt1k0vrZEy1KcRQr/ycCUq3gzGraPIK39Ka976oAZfp2K46ok2obvuCqOHwJNAySujn1ClDapA2TVL2bj1mWc5srfDj7Hw8ThuJKhxB5j7vEnJVz+dHBIEC05I+lca9supAynrbgJlf8ytYF/lulCm8hX6YA+oX9WSZs0Q0trZ9UYgRQLXIw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a7IteZYoU7f9t+HoNzz7zglJq1LAg7hfUn48ReByZk9r/iBv9cz5fcYUIHAiBeMWduZSRi96D5QNbd9Ws6jQiVd9spgarQqr8op+KGUIn15SqtHWxq0VGM3pjI9+P/ntdo3fHqS7IzfkOdGuDLnsvMvIdPWvs5xzbrzLeNUc7QhErzmdYpUQufGEYqL9jJwUn+1APdfguAplbee0Vf2cOzY5F/e9FxyASeXlHLK6++WzhDGB5TvwvYZKWgOm+6+RcwYT6p9d7ygJ3d+BmXVEsHLXCeCJAk7mtuBlNqfhZvecXlgzrPioJQmOfXoZJTv2EmIIOZftclEYwkigQn+xKg==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • Delivery-date: Wed, 03 Feb 2021 20:48:19 +0000
  • Ironport-sdr: J8W5GzqPsHr3Y97JsKDn4XoU0asK6UaQdJx3R/HEl69t6vF9NhijpyFW/6HKFGf+xoLUL5Iizg AnfShKY/nMZ7p/qpc13nJ+6mGpg3WnkvDSm1d8Pyg4a/GJjIXkexzIBmESUuddYqPmZco7av/M tz8WxeTZ/B23cAw/dmOi1rPClQYic4VaX5TY/NUwfLQlX5Mg0hbea/BZPDrTC7uteAvEBfvdEg kF7bafdV6hhhmzL+u5gbyGr905i6BsRhP0oN82EehG8hcaagGR3GOYz+/5mOsF6sH3axaY+nxn BPI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26/01/2021 15:04, Samuel Verschelde wrote:
> Le 18/01/2021 à 11:03, Roger Pau Monné a écrit :
>> On Fri, Jan 15, 2021 at 03:03:26PM +0000, Samuel Verschelde wrote:
>>> Hi list,
>>>
>>> Another "popular" thread on XCP-ng forum [1], started in october 2020,
>>> allowed us to detect that patch 12 from the XSA-332 advisory [2] had
>>> a very
>>> significant impact on network performance in the case of pfSense VMs.
>>>
>>> We reproduced the issue internally (well, we reproduced "something".
>>> The
>>> user setups in this thread are diverse) and our findings seem to
>>> confirm
>>> what the users reported. Running iperf3 from the pfSense VM to a
>>> debian VM
>>> gives results around 5 times slower than before. Reverting this
>>> single patch
>>> brings the performance back. On the debian to pfSense direction, the
>>> drop is
>>> about 25%.
>>
>> pfSense is based on FreeBSD, so I would bet that whatever performance
>> degradation you are seeing would also happen with plain FreeBSD. I
>> would assume netfront in FreeBSD is triggering the ratelimit on Linux,
>> and hence it gets throttled.
>>
>> Do you think you have the bandwidth to look into the FreeBSD side and
>> try to provide a fix? I'm happy to review and commit in upstream
>> FreeBSD, but would be nice to have someone else also in the loop as
>> ATM I'm the only one doing FreeBSD/Xen development AFAIK.
>>
>> Thanks, Roger.
>>
>
> (sorry about the previous email, looks like my mail client hates me)
>
> I would personnally not be able to hack into either Xen, the linux
> kernel or FreeBSD in any efficient way. My role here is limited to
> packaging, testing and acting as a relay between users and developers.
> We currently don't have anyone at Vates who would be able to hack into
> FreeBSD either.
>
> What currently put FreeBSD on our radar is the large amount of users
> who use FreeNAS/TrueNAS or pfSense VMs, and the recent bugs they
> detected (XSA-360 and this performance drop).
>
> Additionnally, regarding this performance issue, some users report an
> impact of that same patch 12 on the network performance of their
> non-BSD VMs [1][2], so I think the FreeBSD case might be helpful to
> help identify what in that patch caused throttling (if that's what
> happens), because it's easier to reproduce, but I'm not sure fixes
> would only need to be made in FreeBSD.
>
> Best regards,
>
> Samuel Verschelde
>
> [1] https://xcp-ng.org/forum/post/35521 mentions debian based Untangle
> OS and inter-VLAN traffic
> [2] https://xcp-ng.org/forum/post/35476 general slowdown affecting all
> VMs (VM to workstation traffic), from the first user who identified
> patch 12 as the cause.

Further to this, XenServer testing has also observed a ~5x drop in
intrahost VM->VM network performance between PV VMs running under PV-Shim

As one specific case has been bisected to patch 11, its obvious that
FreeBSD's netfront is hitting dom0's new spurious-event detection and
mitigation.  It is also reasonable to presume that the other ~5x hits
are related, which means it isn't behaviour unique to the FreeBSD netfront.

The next step is to figure out whether the event is genuinely spurious
(i.e. the frontend really is sending too many notifications), or whether
dom0's judgement of spuriosity is wrong.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.