From owner-freebsd-net@FreeBSD.ORG Fri Mar 21 23:44:55 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60FEE378 for ; Fri, 21 Mar 2014 23:44:55 +0000 (UTC) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 13FA31EB for ; Fri, 21 Mar 2014 23:44:54 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqMEAAfOLFODaFve/2dsb2JhbABZg0FXgwe4Ioc6gSx0giUBAQEDAQECIARSBRYOChEZAgQfBy8GE4dlAwkIDaxjmzgNhwwXjFKBZBkbB4JvgUkEkFOFH2qDH4s2hUmDSSGBbg X-IronPort-AV: E=Sophos;i="4.97,706,1389762000"; d="scan'208";a="108072118" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 21 Mar 2014 19:44:53 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 9570CB4039; Fri, 21 Mar 2014 19:44:53 -0400 (EDT) Date: Fri, 21 Mar 2014 19:44:53 -0400 (EDT) From: Rick Macklem To: Christopher Forgeron Message-ID: <649240517.1169273.1395445493600.JavaMail.root@uoguelph.ca> In-Reply-To: Subject: Re: 9.2 ixgbe tx queue hang MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1169271_1381755531.1395445493598" X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 7.2.1_GA_2790 (ZimbraWebClient - FF3.0 (Win)/7.2.1_GA_2790) Cc: FreeBSD Net , Jack Vogel , Markus Gebert X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 23:44:55 -0000 ------=_Part_1169271_1381755531.1395445493598 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Christopher Forgeron wrote: > > > > > > > Hello all, > > I ran Jack's ixgbe MJUM9BYTES removal patch, and let iometer hammer > away at the NFS store overnight - But the problem is still there. > > > From what I read, I think the MJUM9BYTES removal is probably good > cleanup (as long as it doesn't trade performance on a lightly memory > loaded system for performance on a heavily memory loaded system). If > I can stabilize my system, I may attempt those benchmarks. > > > I think the fix will be obvious at boot for me - My 9.2 has a 'clean' > netstat > - Until I can boot and see a 'netstat -m' that looks similar to that, > I'm going to have this problem. > > > Markus: Do your systems show denied mbufs at boot like mine does? > > > Turning off TSO works for me, but at a performance hit. > > I'll compile Rick's patch (and extra debugging) this morning and let > you know soon. > > > > > > > On Thu, Mar 20, 2014 at 11:47 PM, Christopher Forgeron < > csforgeron@gmail.com > wrote: > > > > > > > > > BTW - I think this will end up being a TSO issue, not the patch that > Jack applied. > > When I boot Jack's patch (MJUM9BYTES removal) this is what netstat -m > shows: > > 21489/2886/24375 mbufs in use (current/cache/total) > 4080/626/4706/6127254 mbuf clusters in use (current/cache/total/max) > 4080/587 mbuf+clusters out of packet secondary zone in use > (current/cache) > 16384/50/16434/3063627 4k (page size) jumbo clusters in use > (current/cache/total/max) > 0/0/0/907741 9k jumbo clusters in use (current/cache/total/max) > > 0/0/0/510604 16k jumbo clusters in use (current/cache/total/max) > 79068K/2173K/81241K bytes allocated to network (current/cache/total) > 18831/545/4542 requests for mbufs denied > (mbufs/clusters/mbuf+clusters) > > 0/0/0 requests for mbufs delayed (mbufs/clusters/mbuf+clusters) > 0/0/0 requests for jumbo clusters delayed (4k/9k/16k) > 15626/0/0 requests for jumbo clusters denied (4k/9k/16k) > > 0 requests for sfbufs denied > 0 requests for sfbufs delayed > 0 requests for I/O initiated by sendfile > > Here is an un-patched boot: > > 21550/7400/28950 mbufs in use (current/cache/total) > 4080/3760/7840/6127254 mbuf clusters in use (current/cache/total/max) > 4080/2769 mbuf+clusters out of packet secondary zone in use > (current/cache) > 0/42/42/3063627 4k (page size) jumbo clusters in use > (current/cache/total/max) > 16439/129/16568/907741 9k jumbo clusters in use > (current/cache/total/max) > > 0/0/0/510604 16k jumbo clusters in use (current/cache/total/max) > 161498K/10699K/172197K bytes allocated to network > (current/cache/total) > 18345/155/4099 requests for mbufs denied > (mbufs/clusters/mbuf+clusters) > > 0/0/0 requests for mbufs delayed (mbufs/clusters/mbuf+clusters) > 0/0/0 requests for jumbo clusters delayed (4k/9k/16k) > 3/3723/0 requests for jumbo clusters denied (4k/9k/16k) > > 0 requests for sfbufs denied > 0 requests for sfbufs delayed > 0 requests for I/O initiated by sendfile > > > > See how removing the MJUM9BYTES is just pushing the problem from the > 9k jumbo cluster into the 4k jumbo cluster? > > Compare this to my FreeBSD 9.2 STABLE machine from ~ Dec 2013 : Exact > same hardware, revisions, zpool size, etc. Just it's running an > older FreeBSD. > > # uname -a > FreeBSD SAN1.XXXXX 9.2-STABLE FreeBSD 9.2-STABLE #0: Wed Dec 25 > 15:12:14 AST 2013 aatech@FreeBSD-Update > Server:/usr/obj/usr/src/sys/GENERIC amd64 > > root@SAN1:/san1 # uptime > 7:44AM up 58 days, 38 mins, 4 users, load averages: 0.42, 0.80, 0.91 > > root@SAN1:/san1 # netstat -m > 37930/15755/53685 mbufs in use (current/cache/total) > 4080/10996/15076/524288 mbuf clusters in use > (current/cache/total/max) > 4080/5775 mbuf+clusters out of packet secondary zone in use > (current/cache) > 0/692/692/262144 4k (page size) jumbo clusters in use > (current/cache/total/max) > 32773/4257/37030/96000 9k jumbo clusters in use > (current/cache/total/max) > > 0/0/0/508538 16k jumbo clusters in use (current/cache/total/max) > 312599K/67011K/379611K bytes allocated to network > (current/cache/total) > > 0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters) > 0/0/0 requests for mbufs delayed (mbufs/clusters/mbuf+clusters) > 0/0/0 requests for jumbo clusters delayed (4k/9k/16k) > 0/0/0 requests for jumbo clusters denied (4k/9k/16k) > 0/0/0 sfbufs in use (current/peak/max) > 0 requests for sfbufs denied > 0 requests for sfbufs delayed > 0 requests for I/O initiated by sendfile > 0 calls to protocol drain routines > > Lastly, please note this link: > > http://lists.freebsd.org/pipermail/freebsd-net/2012-October/033660.html > Hmm, this mentioned the ethernet header being in the TSO segment. I think I already mentioned my TCP/IP is rusty and I know diddly about TSO. However, at a glance it does appear the driver uses ether_output() for TSO segments and, as such, I think an ethernet header is prepended to the TSO segment. (This makes sense, since how else would the hardware know what ethernet header to use for the TCP segments generated.) I think prepending the ethernet header could push the total length over 64K, given a default if_hw_tsomax == IP_MAXPACKET. And over 64K isn't going to fit in 32 * 2K (mclbytes) clusters, etc and so forth. Anyhow, I think the attached patch will reduce if_hw_tsomax, so that the result should fit in 32 clusters and avoid EFBIG for this case, so it might be worth a try? (I still can't think of why the CSUM_TSO bit isn't set for the printf() case, but it seems TSO segments could generate EFBIG errors.) Maybe worth a try, rick > It's so old that I assume the TSO leak that he speaks of has been > patched, but perhaps not. More things to look into tomorrow. > > > > > ------=_Part_1169271_1381755531.1395445493598 Content-Type: text/x-patch; name=ixgbe.patch Content-Disposition: attachment; filename=ixgbe.patch Content-Transfer-Encoding: base64 LS0tIGRldi9peGdiZS9peGdiZS5jLnNhdgkyMDE0LTAzLTE5IDE3OjQ0OjM0LjAwMDAwMDAwMCAt MDQwMAorKysgZGV2L2l4Z2JlL2l4Z2JlLmMJMjAxNC0wMy0yMSAxOToyNTo0Ni4wMDAwMDAwMDAg LTA0MDAKQEAgLTI2MTQsNiArMjYxNCw5IEBAIGl4Z2JlX3NldHVwX2ludGVyZmFjZShkZXZpY2Vf dCBkZXYsIHN0cnUKIAlpZnAtPmlmX3NuZC5pZnFfZHJ2X21heGxlbiA9IGFkYXB0ZXItPm51bV90 eF9kZXNjIC0gMjsKIAlJRlFfU0VUX1JFQURZKCZpZnAtPmlmX3NuZCk7CiAjZW5kaWYKKwlpZiAo KGFkYXB0ZXItPm51bV9zZWdzICogTUNMQllURVMgLSBFVEhFUl9IRFJfTEVOKSA8IElQX01BWFBB Q0tFVCkKKwkJaWZwLT5pZl9od190c29tYXggPSBhZGFwdGVyLT5udW1fc2VncyAqIE1DTEJZVEVT IC0KKwkJICAgIEVUSEVSX0hEUl9MRU47CiAKIAlldGhlcl9pZmF0dGFjaChpZnAsIGFkYXB0ZXIt Pmh3Lm1hYy5hZGRyKTsKIAo= ------=_Part_1169271_1381755531.1395445493598--