Bug 242070 - if_vmx: scp on 12.1p1-RELEASE is painfully slow
Summary: if_vmx: scp on 12.1p1-RELEASE is painfully slow
Status: Closed DUPLICATE of bug 236999
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
Keywords: needs-qa, performance, regression
Depends on:
Reported: 2019-11-19 08:14 UTC by oz42
Modified: 2020-04-19 17:20 UTC (History)
6 users (show)

See Also:
koobs: maintainer-feedback? (vmaffione)


Note You need to log in before you can comment on or make changes to this bug.
Description oz42 2019-11-19 08:14:45 UTC
scp on 12.1p1-RELEASE is painfully slow:

2%   80KB   4.5KB/s   11:25 ETA

Network is 10 GBit/s (both hosts are on ESXi). net.inet.tcp.cc.algorithm is newreno (default). No firewall, scp client is on the same network.
Comment 1 Eugene Grosbein freebsd_committer 2019-11-20 06:54:44 UTC
Please supply more details on your network configuration beginning with used network cards and drivers.
Comment 2 oz42 2019-11-20 10:27:55 UTC
Both hosts use IPv4 (on the same subnet) and vmx network card driver.
Comment 3 Eugene Grosbein freebsd_committer 2019-11-20 10:41:30 UTC
Does it help if you disable various offloads for network interfaces such ax tso4, rxcsum, txcsum etc.? Use: "ifconfig vmx0 -tso4" and so on for both sides.

Use "ifconfig vmx0" to verify that offload features got disabled, repeat test and report back.
Comment 4 Ed Maste freebsd_committer 2019-12-13 21:30:34 UTC
I see that the 'regression' tag is on this PR, but it's not clear if that's correct - did you use scp on the same hardware/VM configuration in 11.x or 12.0 and it was not slow there? Or is 12.1 the first release you've tried in this configuration?
Comment 5 info 2020-01-06 00:12:08 UTC
I'm also experiencing this after upgrading from 11.3 to 12.1. Scp and HTTP GET slows down to 5-10KB/s where I'm expecting 50MB or more. 

I'm running the VM under ESXI 5.5 as VMXNET 3.

vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:50:56:a9:a5:8f
	inet netmask 0xffffff00 broadcast
	media: Ethernet autoselect
	status: active

When I do `ifconfig vmx0 -tso41` I immediately get the proper 50MB/s speeds. When I `ifconfig vmx0 tso4` the slowness comes back.
Comment 6 Brendan Shanks 2020-01-14 07:26:24 UTC
This is almost certainly a dupe of bug 236999
Comment 7 oz42 2020-02-05 19:04:07 UTC
Sorry for the late reply.

(In reply to Brendan Shanks from comment #6)
Perhaps. But compiling a kernel without TSO support does not change anything.

Meanwhile being at p2 level, ssh sessions constantly freeze after 3-30 seconds. This means 12.1p2-RELEASE is unusable as an ESXi guest. As a KVM guest, no problems.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2020-02-21 04:41:11 UTC
@Vincenzo Can you advise whether this is a likely dupe of bug 236999 or not?
Comment 9 Eugene Grosbein freebsd_committer 2020-04-19 17:20:40 UTC
Closed as duplicate of the PR 236999 which has a fix.

*** This bug has been marked as a duplicate of bug 236999 ***