From owner-freebsd-wireless@freebsd.org Mon Oct 9 09:29:27 2017 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BE24E2B03A for ; Mon, 9 Oct 2017 09:29:27 +0000 (UTC) (envelope-from rvan@sdf.org) Received: from mx.sdf.org (mx.sdf.org [205.166.94.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ol.sdf.org", Issuer "ol.sdf.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E5D26A377 for ; Mon, 9 Oct 2017 09:29:25 +0000 (UTC) (envelope-from rvan@sdf.org) Received: from sdf.org (IDENT:rvan@otaku.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id v999TE5E001547 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO) for ; Mon, 9 Oct 2017 09:29:15 GMT Received: (from rvan@localhost) by sdf.org (8.15.2/8.12.8/Submit) id v999TEC3010888 for freebsd-wireless@freebsd.org; Mon, 9 Oct 2017 22:29:14 +1300 (NZDT) Date: Mon, 9 Oct 2017 22:29:14 +1300 From: Rouan Lucas van Ryn To: freebsd-wireless@freebsd.org Subject: Wireless network slows down with zyd0 Message-ID: <20171009092914.GA22203@SDF.ORG> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-PGP-Key: http://rvan.sdf.org/public.key User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2017 09:29:27 -0000 I have been experiencing slow network speeds with my FreeBSD (11.0) system on my wireless LAN. My wireless card is a USB ZyDAS card: zyd0: on usbus3 When I start networking, wireless speeds seem OK (~700KB/s when scp'ing a file to my laptop on the WLAN), but after around 10 seconds of network activity drop off to become very slow (~70KB/s). Speeds stay slow until networking is restarted and then pick up again momentarily. Tests with iperf yield similar results. I have found that the wireless connection is being renegotiated at lower and lower speeds: wlan0: [0c:d6:bd:1a:19:24] AMRR: current rate 72, txcnt=11, retrycnt=17 wlan0: [0c:d6:bd:1a:19:24] AMRR decreasing rate 48 (txcnt=11 retrycnt=17) wlan0: [0c:d6:bd:1a:19:24] AMRR: current rate 48, txcnt=11, retrycnt=14 wlan0: [0c:d6:bd:1a:19:24] AMRR decreasing rate 36 (txcnt=11 retrycnt=14) wlan0: [0c:d6:bd:1a:19:24] AMRR: current rate 36, txcnt=11, retrycnt=13 wlan0: [0c:d6:bd:1a:19:24] AMRR decreasing rate 24 (txcnt=11 retrycnt=13) wlan0: [0c:d6:bd:1a:19:24] AMRR: current rate 24, txcnt=11, retrycnt=11 wlan0: [0c:d6:bd:1a:19:24] AMRR decreasing rate 22 (txcnt=11 retrycnt=11) wlan0: [0c:d6:bd:1a:19:24] AMRR: current rate 22, txcnt=11, retrycnt=13 wlan0: [0c:d6:bd:1a:19:24] AMRR decreasing rate 18 (txcnt=11 retrycnt=13) wlan0: [0c:d6:bd:1a:19:24] AMRR: current rate 18, txcnt=11, retrycnt=11 wlan0: [0c:d6:bd:1a:19:24] AMRR decreasing rate 12 (txcnt=11 retrycnt=11) wlan0: [0c:d6:bd:1a:19:24] AMRR: current rate 12, txcnt=11, retrycnt=12 wlan0: [0c:d6:bd:1a:19:24] AMRR decreasing rate 11 (txcnt=11 retrycnt=12) wlan0: [0c:d6:bd:1a:19:24] AMRR: current rate 11, txcnt=11, retrycnt=11 wlan0: [0c:d6:bd:1a:19:24] AMRR decreasing rate 4 (txcnt=11 retrycnt=11) wlan0: [0c:d6:bd:1a:19:24] AMRR: current rate 4, txcnt=11, retrycnt=11 wlan0: [0c:d6:bd:1a:19:24] AMRR decreasing rate 2 (txcnt=11 retrycnt=11) wlan0: [0c:d6:bd:1a:19:24] AMRR: current rate 2, txcnt=11, retrycnt=11 The same wireless card works well (no slowdown) when connected to a different computer (not FreeBSD) in the same room, leading me to suspect that this isn't a hardware or signal strength issue. Netstat shows that packets are being retransmitted: tcp: 109179 packets sent 108551 data packets (110570192 bytes) 575 data packets (534156 bytes) retransmitted 6 data packets unnecessarily retransmitted ... Relevant parts of ifconfig: zyd0: flags=8843 metric 0 mtu 2290 ether 00:25:xx:xx:xx:xx nd6 options=29 media: IEEE 802.11 Wireless Ethernet autoselect mode 11g status: associated wlan0: flags=8843 metric 0 mtu 1500 ether 00:25:xx:xx:xx:xx inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255 nd6 options=29 media: IEEE 802.11 Wireless Ethernet DS/1Mbps mode 11g status: associated ssid SPARK-XXXX channel 1 (2412 MHz 11g) bssid 0c:d6:bd:1a:19:24 regdomain APAC country NZ authmode WPA2/802.11i privacy ON deftxkey UNDEF TKIP 2:128-bit txpower 30 bmiss 7 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS roaming MANUAL Note in particular the line: media: IEEE 802.11 Wireless Ethernet DS/1Mbps mode 11g ifconfig wlan0 scan gives me: SSID/MESH ID BSSID CHAN RATE S:N INT CAPS SPARK-XXXX 0c:d6:bd:1a:19:24 1 54M -58:-95 100 EP RSN HTCAP WPS WPA (among other networks) -- Thanks, Rouan