Bug 175954 - [xen] XENHVM xn network driver extreme packet loss during a slow download
Summary: [xen] XENHVM xn network driver extreme packet loss during a slow download
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-08 10:50 UTC by Paul
Modified: 2017-12-31 22:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul 2013-02-08 10:50:00 UTC
The xn0 PV network driver for freebsd has a bug where if the client is downloading slowly leading to really poor network performance.

I am guessing httpd is filling up the network buffer space with the large file, but the client is not downloading it fast enough.

Increasing the various network send/recv/mbuf buffers with sysctl has no effect.

#ping running from inside the freebsd guest ping the IP of xen host dom0
64 bytes from 10.0.0.1: icmp_seq=1303 ttl=64 time=234.603 ms
64 bytes from 10.0.0.1: icmp_seq=1304 ttl=64 time=204.760 ms
64 bytes from 10.0.0.1: icmp_seq=1305 ttl=64 time=261.683 ms
64 bytes from 10.0.0.1: icmp_seq=1306 ttl=64 time=47.769 ms
ping: sendto: No buffer space available
64 bytes from 10.0.0.1: icmp_seq=1308 ttl=64 time=436.514 ms
64 bytes from 10.0.0.1: icmp_seq=1309 ttl=64 time=72.970 ms
64 bytes from 10.0.0.1: icmp_seq=1310 ttl=64 time=82.359 ms
64 bytes from 10.0.0.1: icmp_seq=1311 ttl=64 time=272.854 ms
64 bytes from 10.0.0.1: icmp_seq=1312 ttl=64 time=328.472 ms
64 bytes from 10.0.0.1: icmp_seq=1313 ttl=64 time=122.783 ms
ping: sendto: No buffer space available
64 bytes from 10.0.0.1: icmp_seq=1315 ttl=64 time=84.061 ms
64 bytes from 10.0.0.1: icmp_seq=1316 ttl=64 time=70.805 ms
^C
--- 10.0.0.1 ping statistics ---
1317 packets transmitted, 1173 packets received, 10.9% packet loss
round-trip min/avg/max/stddev = 18.828/200.423/659.228/117.169 ms

Fix: 

The problem does not occur while using the GENERIC kernel.
It also does not occur if the wget command is run from a different VM, but thats preventing me from running a reverse proxy on the dom0.
How-To-Repeat: On the freebsd guest, run a http server such as apache or nginx and serve a large file, mine was 300mb.

On the xen host (dom0) run this command (10.0.0.2 is the IP of the freebsd guest)
wget -O /dev/null --limit-rate=1000K http://10.0.0.2/300mb.bin
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-02-13 16:16:36 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-xen

Over to maintainer(s).
Comment 2 Mark Felder freebsd_committer freebsd_triage 2013-02-13 18:22:26 UTC
Is this server running a pf firewall? And does setting net.inet.tcp.tso=0  
resolve it?
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:34 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped