Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp474658ybl; Fri, 6 Dec 2019 00:42:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzNBDtr/Hc8nrT1Pbjxl6FA1hHcEwuKKgNaIuhfjzZmEQkfVFYTSbb9t8z0WbNUFkYsShTr X-Received: by 2002:aca:c256:: with SMTP id s83mr10598901oif.57.1575621778908; Fri, 06 Dec 2019 00:42:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575621778; cv=none; d=google.com; s=arc-20160816; b=ZbkUvDgblaZnivLkidFcwJzFGLWVRW+Y2buvEiDCb4btTQAjug8Kr5tkhJ5bTm07nr NSMgA0hnHbTW8fgvoJMWFmRG5fFMfiqMn4/XOpIjlLFnzl6khGkNOyVQ8ABGTEvfvZSx 8w/XkS4TNhBaIwkpNyqbcd9viiyoQ2FQEWWuwgdoLiFPvqG+JE/gRMsvca10R5iLDKHX kP5W0qofI0eFr+ocqt1ruOe/13Ceiujqj29HWPKxUIrM++7fKiG9fCOWMnVZ+DmQVi6z m3zX0BAVA1qnfXmMPqIruwICsz8pkU3MfeP2yQgAsI0Xkt/ciB7q+I0ppZQ24zMy5DIz Dzlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=o4mewlTrdtVKsQdEuT/WrKqWSRbnxy+Y1+aKm3XKx5w=; b=bItGbNSflK/Mq9tNRn+gEQtNVkzd1QcGU/6kWW225cEI2Q0DD+vtjVhi9+sU0U+cOZ t24+1+c/D89qcsFpfEeIfqXhDsyItXWOFt29ED4jupihmf+Hg2NRk5N2NjFx9MLAYm9V H7T8mVbn8PFy+RdYR2e1F/aNSQm0dUzZWsMmfT/Nj5LSa5Ds9gqmf3r+6lqvB9EnJBg/ ieUiaEnXQ0qmnMlk4PxFMpfhAK8Q4eOr5bkWPIU+ZkjyCOMp2JqmNXYgCz7iv8BknI+z QlNsYATsSUY0sLu0WFl2p0yFLviIqqsTwmQRqzoa7pSOg4HTiuZSe7yQ6E8nCjxWe+EJ CE6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si6397006oif.92.2019.12.06.00.42.35; Fri, 06 Dec 2019 00:42:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726264AbfLFIlm (ORCPT + 99 others); Fri, 6 Dec 2019 03:41:42 -0500 Received: from s3.sipsolutions.net ([144.76.43.62]:54524 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbfLFIlm (ORCPT ); Fri, 6 Dec 2019 03:41:42 -0500 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.3) (envelope-from ) id 1id9BD-006A2o-9P; Fri, 06 Dec 2019 09:41:39 +0100 Message-ID: <9b89b3b294295063aec045b9e863a44ad20b8782.camel@sipsolutions.net> Subject: Re: debugging TXQs being empty From: Johannes Berg To: Kan Yan Cc: Toke =?ISO-8859-1?Q?H=F8iland-J=F8rgensen?= , linux-wireless Date: Fri, 06 Dec 2019 09:41:38 +0100 In-Reply-To: (sfid-20191206_020554_916514_C4D7D41E) References: (sfid-20191206_020554_916514_C4D7D41E) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 (3.34.2-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi, Thanks! On Thu, 2019-12-05 at 17:05 -0800, Kan Yan wrote: > > Anyhow, do you have any tips on debugging this? This is still without > > AQL code. The AQM stats for the AP look fine, basically everything is 0 > > except for "new-flows", "tx-bytes" and "tx-packets". > > If the "backlog" field is also 0, then it is a sign that the TCP stack > is not feeding packets fast enough. Mostly, not always. One thing I do noticed there now is that I get like 64k packets into the driver. Maybe somehow TSO is interacting badly with the TXQs and the tracking here, since TSO makes the traffic *very* bursty? A 64k packet in the driver will typically expand to 9 or 10 A-MSDUs I think? > > One thing that does seem odd is that the new-flows counter is increasing > > this rapidly - shouldn't we expect it to be like 10 new flows for 10 TCP > > sessions? I see this counter increase by the thousands per second. > > This could be normal. When a flow queue is completely drained, it will > be deleted. Next packet will be in the "new_flows". This is another > sign of the bottleneck maybe at TCP stack. Right, Toke pointed that out too. > > CPU load is not an issue AFAICT, even with all the debugging being > > written into the syslog (or journal or something) that's the only thing > > that takes noticable CPU time - ~50% for systemd-journal and ~20% for > > rsyslogd, <10% for the throughput testing program and that's about it. > > The system has 4 threads and seems mostly idle. > > What's CPU usage for software irq? Is CPU usage average of all cores? > Maybe the core that handles packet processing or softirq is maxed out > even the average is fine. Agree, I didn't really say that well. I'm really just ballparking this by using 'top', but even the *most* loaded of the 4 CPUs (threads?) is at >80% idle, <6% softirq and <12% sys for the duration of the test. > Are you using iperf or netperf? increase the TCP windows size may > help. Adjust things like "net.core.wmem_max" and "net.ipv4.tcp_mem" > maybe necessary to enable iperf to use larger windows. Chariot :) Anyway, this had no effect. I'll go play with the TSO next, for some reason our driver won't let me disable it dynamically (I guess I should just fix that). johannes