From owner-freebsd-net@freebsd.org Thu Sep 10 20:27:41 2015 Return-Path: Delivered-To: freebsd-net@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 A0BEEA00029 for ; Thu, 10 Sep 2015 20:27:41 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.strugglingcoder.info", Issuer "mail.strugglingcoder.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F18C1554 for ; Thu, 10 Sep 2015 20:27:40 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 3A636C0624; Thu, 10 Sep 2015 13:27:40 -0700 (PDT) Date: Thu, 10 Sep 2015 13:27:40 -0700 From: hiren panchasara To: Dmitry Sivachenko Cc: FreeBSD Net Subject: Re: netisr process eats 100% cpu Message-ID: <20150910202740.GG64965@strugglingcoder.info> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WkfBGePaEyrk4zXB" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2015 20:27:41 -0000 --WkfBGePaEyrk4zXB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 09/10/15 at 07:45P, Dmitry Sivachenko wrote: > Hello! >=20 > I am using fresh FreeBSD-10/stable. >=20 > I have a program which establish a TCP connection to server and sends a l= ot of small requests over it. > I put haproxy load balancer working in TCP mode in the middle, which list= ens some port on localhost. >=20 > Under the relatively low network load (20MB/sec, ~100 kpps), netisr proce= ss starts to consume close to 100% CPU, and does not allow to utilize more = network bandwidth: >=20 > 11 root -72 - 0K 944K CPU27 27 0:34 98.06% intr{s= wi1: netisr 0} >=20 > If I do not pass traffic through haproxy but connect directly to remote s= erver, netisr process consumes 0% CPU and everything works well. >=20 > Is it rather expected or this can be fixed? Unsure at the moment if loopback is causing the trouble for you or not. See: https://lists.freebsd.org/pipermail/freebsd-net/2015-February/041239.html You may want to try: 1) pmcstat and see if you can catch something 2) disable checksum on localhost 3) look at netisr settings. sysctl net.isr o/p and how it looks under netstat -Q. I am not sure if adding more threads to netisr via net.isr.numthreads would help. (Note its a loader.conf variable) As I said, I am not sure whats up. Just throwing some ideas here. Cheers, Hiren --WkfBGePaEyrk4zXB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJV8ee5XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lj88H/24ZLjb/FFF0r82I2usBwP8y MK8bs+DpLuucki5EErKGSbBv38L9VpgYRXZEUUl99f1DudAbI0IqkHzmLeFjSG7Q VaseM/OZkbTnQlMSYnGstboQFtbFtJVh3A9jVVz3/StqvgTNe/P4y5ig/R1rkbgK hBtNKg46d//q+g+NHrbyMcvlvci3+D72oJaMYUlwUBKwhUs4yirHBEk4qulitGiB OmkNAo64VEKTYXY8mUqHO7l8SrHmm3wy7m0IU4MC1mZtKK8dhPph447CtLVu3km1 Og8Ze0uRlzhAt/9oXf+SeWwYioEmJwHrU4oGkn4cpLSh8FABI0o330W/woHVlKE= =+R5U -----END PGP SIGNATURE----- --WkfBGePaEyrk4zXB--