From owner-freebsd-current@freebsd.org Sat Dec 17 09:20:02 2016 Return-Path: Delivered-To: freebsd-current@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 DFA6AC811F5 for ; Sat, 17 Dec 2016 09:20:02 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3B2A125F; Sat, 17 Dec 2016 09:20:02 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cIB9m-000BMx-Fx; Sat, 17 Dec 2016 12:19:54 +0300 Date: Sat, 17 Dec 2016 12:19:54 +0300 From: Slawa Olhovchenkov To: Julian Elischer Cc: freebsd-current Subject: Re: FreeBSD system profiling and tuning for 10, 11 and 12 Message-ID: <20161217091954.GE90401@zxy.spb.ru> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Dec 2016 09:20:03 -0000 On Sat, Dec 17, 2016 at 04:06:40PM +0800, Julian Elischer wrote: > Hi > > I'm looking for recent information regarding profiling and tuning in > FreeBSD. > > Google has turned up some links but I think that the best leads are > still hiding.. > for example I only found > https://wiki.freebsd.org/NetworkPerformanceTuning recently. > > (BTW Anyone who has a moment is encouraged to check if they have > anything to add to it.) === Ensure BPF is OFF. No tcpdump, cdpd, lldpd, dhcpd, dhcp-relay. Patches are coming. Check netstat -B. === Don't see any problem with tcpdump up to 40G. tcpdump used for capture selected stream. === On FreeBSD older than 11.0, use more compact ip_fastfoward routine. It processes most packets falling back to 'normal' forward routine for fragments, packets with options, etc. Can save you up to 20% speed (but will break IPSec). net.inet.ip.fastforwarding=1 === I am not found in 11/12 this sysctl/tunable. === Skip feeding /dev/random from network by adding harvest_mask="351" to /etc/rc.conf or theses line to /etc/sysctl.conf: kern.random.sys.harvest.ethernet=0 kern.random.sys.harvest.point_to_point=0 kern.random.sys.harvest.interrupt=0 === On 11: # sysctl kern.random.sys.harvest sysctl: unknown oid 'kern.random.sys.harvest' > I am sure there is better information around for profiling the kernel > and modules, > but I am not seeing "the definitive profiler's guide" out there. I do > know several people > have blogs that cover this sort of thing. If you have one or know of good > profiling resources we should gather them.. send them to me and I'll > try make > sure everything is up to date, and put them together in a wiki page. > > there is already some stuff there, > (see > https://wiki.freebsd.org/NetworkPerformanceTuning?action=fullsearch&context=180&value=profiling&fullsearch=Text > ) > but it could do with gathering together. You might surprised, but various options in BIOS can gain up to 10-20%% every, 50% total. Also, be careful about using internal architectures detials. I am already overloaded: a) bandwidtch of DMI2 link b) bandwidtch of 8x PCIe3 Not all cores equals for IRQ handling and cost of PCIe access.