From owner-freebsd-performance@FreeBSD.ORG Mon Jul 24 14:33:53 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CBF116A4E1; Mon, 24 Jul 2006 14:33:53 +0000 (UTC) (envelope-from bkoenig@cs.tu-berlin.de) Received: from efacilitas.de (smtp.efacilitas.de [85.10.196.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0217D43D46; Mon, 24 Jul 2006 14:32:52 +0000 (GMT) (envelope-from bkoenig@cs.tu-berlin.de) Received: from eurystheus.local (port-212-202-39-242.dynamic.qsc.de [212.202.39.242]) by efacilitas.de (Postfix) with ESMTP id 108344CCB5; Mon, 24 Jul 2006 16:32:50 +0200 (CEST) Received: from [192.168.1.2] (muhkuh.local [192.168.1.2]) by eurystheus.local (Postfix) with ESMTP id 1AA735285B; Mon, 24 Jul 2006 16:32:48 +0200 (CEST) Message-ID: <44C4DA1A.80406@cs.tu-berlin.de> Date: Mon, 24 Jul 2006 16:32:58 +0200 From: =?ISO-8859-15?Q?Bj=F6rn_K=F6nig?= User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: etalk etalk References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 24 Jul 2006 16:19:43 +0000 Cc: freebsd-fs@freebsd.org, freebsd-performance@freebsd.org Subject: Re: about the performance comparsion of 6.1 vs 5.3 on amd64 X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 14:33:53 -0000 Hello, I used unixbench among some other tools like ubench, NetPIPE, mysqlbench to get an overall impression of the performance. These are some the results of unixbench: FreeBSD 5.4-RELEASE: http://alpha-tierchen.de/dateien/etc/unixbench-amd64 FreeBSD 6.0-BETA2: http://alpha-tierchen.de/dateien/etc/unixbench-amd64-6-aj-sched_4bsd This is an AMD Athlon64 3000+ processor. Regards Björn From owner-freebsd-performance@FreeBSD.ORG Wed Jul 26 01:04:30 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0130116A4DE for ; Wed, 26 Jul 2006 01:04:30 +0000 (UTC) (envelope-from owensr@comcast.net) Received: from alnrmhc11.comcast.net (alnrmhc14.comcast.net [206.18.177.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id D13B443D5D for ; Wed, 26 Jul 2006 01:04:15 +0000 (GMT) (envelope-from owensr@comcast.net) Received: from desky64 (c-69-243-17-124.hsd1.va.comcast.net[69.243.17.124]) by comcast.net (alnrmhc14) with SMTP id <20060726010414b140046su1e>; Wed, 26 Jul 2006 01:04:14 +0000 Message-ID: <000701c6b04f$70c9b4d0$0501a8c0@desky64> From: "Raymond Owens" To: Date: Tue, 25 Jul 2006 21:04:25 -0400 MIME-Version: 1.0 Content-Type: multipart/related; type="multipart/alternative"; boundary="----=_NextPart_000_0003_01C6B02D.E94A5EE0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-Mailman-Approved-At: Wed, 26 Jul 2006 01:57:33 +0000 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: question concerning proper usage of kernel variables net.bpf.bufsize and vm_kmem_size_max X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2006 01:04:30 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0003_01C6B02D.E94A5EE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable System: Dell 2850 dual dual-core 3 Ghz Xeon processors FreeBSD 6.1 amd64=20 6Gb Ram Problem: System crashes when net.bpf.bufsize kernel variable is altered to value = above 67Mb Situation: Box performs packet capture using Bro IDS application. It was seen that = the larger the net.bpf.bufsize variable was made the more traffic that = was captured. Unfortunately when the net.bpf.bufsize and = net.bpf.maxbufsize variables exceed certain limits, the box immediately = crashes sometimes rebooting sometimes falling to single user mode. There = are a number of identical systems and the precise value at which this = crash occurs varies, one box crashes when the variable is set to over = 8Mb, others can be set successfully to 67Mb. Crash logs seem to = consistently give messages that 'kmem_map too small'. The = 'VM_KMEM_SIZE_MAX' variable is set by default apparently to 400Mb. Questions: Is there a limit to the value that net.bpf.bufsize and = net.bpf.maxbufsize can be set to? Is there a limit to the value that VM_KMEM_SIZE_MAX can be set to? Can VM_KMEM_SIZE_MAX be set manually with sysctl? Will increasing the value of VM_KMEM_SIZE_MAX have any chance of = preventing the crash? Thanks ------=_NextPart_000_0003_01C6B02D.E94A5EE0-- From owner-freebsd-performance@FreeBSD.ORG Wed Jul 26 07:27:55 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC9F616A4DA for ; Wed, 26 Jul 2006 07:27:55 +0000 (UTC) (envelope-from arne_woerner@yahoo.com) Received: from web30312.mail.mud.yahoo.com (web30312.mail.mud.yahoo.com [68.142.201.230]) by mx1.FreeBSD.org (Postfix) with SMTP id 7A1C743D62 for ; Wed, 26 Jul 2006 07:27:54 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: (qmail 17140 invoked by uid 60001); 26 Jul 2006 07:27:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=CfXzdkB4YIU5UwQ5gjkhJGlpvwQA48U3jpU597uqvvIq9gykdX6+GpA3H5ONuR+Ali4bqTacoV9CRnVM5iIZLYbd4tgLzDL6phnVQnp14FeW9HdHZlMsKqK3mDy05WVwgof99xIVlEV2nKSoZQf0phSviZo9aqQawbEa3iNJZ2A= ; Message-ID: <20060726072753.17138.qmail@web30312.mail.mud.yahoo.com> Received: from [213.54.69.84] by web30312.mail.mud.yahoo.com via HTTP; Wed, 26 Jul 2006 00:27:53 PDT Date: Wed, 26 Jul 2006 00:27:53 -0700 (PDT) From: "R. B. Riddick" To: Raymond Owens , freebsd-performance@freebsd.org In-Reply-To: <000701c6b04f$70c9b4d0$0501a8c0@desky64> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: question concerning proper usage of kernel variables net.bpf.bufsize and vm_kmem_size_max X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2006 07:27:55 -0000 --- Raymond Owens wrote: > Questions: > Can VM_KMEM_SIZE_MAX be set manually with sysctl? > No, but you could set it with this procedure: 1. Insert the lines vm.kmem_size=123456789 vm.kmem_size_max=1234567890 in /boot/loader.conf 2. reboot That should change those values... (see src/sys/kern/kern_malloc.c) I wonder, why your box needs such a big buffer? Do u have network traffic bursts or so? -Arne __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-performance@FreeBSD.ORG Wed Jul 26 23:20:57 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FE9816A4DD for ; Wed, 26 Jul 2006 23:20:57 +0000 (UTC) (envelope-from jin@george.lbl.gov) Received: from smtp102.sbc.mail.mud.yahoo.com (smtp102.sbc.mail.mud.yahoo.com [68.142.198.201]) by mx1.FreeBSD.org (Postfix) with SMTP id E6D1243D55 for ; Wed, 26 Jul 2006 23:20:56 +0000 (GMT) (envelope-from jin@george.lbl.gov) Received: (qmail 49693 invoked from network); 26 Jul 2006 23:20:56 -0000 Received: from unknown (HELO ?192.168.2.8?) (jinmtb@sbcglobal.net@68.127.175.91 with plain) by smtp102.sbc.mail.mud.yahoo.com with SMTP; 26 Jul 2006 23:20:55 -0000 Message-ID: <44C7F819.9020504@george.lbl.gov> Date: Wed, 26 Jul 2006 16:17:45 -0700 From: "Jin Guojun [VFFS]" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050108 X-Accept-Language: en, zh, zh-CN MIME-Version: 1.0 To: "R. B. Riddick" References: <20060726072753.17138.qmail@web30312.mail.mud.yahoo.com> In-Reply-To: <20060726072753.17138.qmail@web30312.mail.mud.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-performance@freebsd.org, Raymond Owens Subject: Re: question concerning proper usage of kernel variables net.bpf.bufsize and vm_kmem_size_max X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2006 23:20:57 -0000 R. B. Riddick wrote: >--- Raymond Owens wrote: > > >>Questions: >>Can VM_KMEM_SIZE_MAX be set manually with sysctl? >> >> >> >No, but you could set it with this procedure: >1. Insert the lines > vm.kmem_size=123456789 > vm.kmem_size_max=1234567890 >in > /boot/loader.conf > >2. reboot > >That should change those values... >(see src/sys/kern/kern_malloc.c) > >I wonder, why your box needs such a big buffer? Do u have network traffic >bursts or so? > > Regardless what purpose is for, the net.bpf.bufsize should never set above hardware cache size. The best (optimal size) is 50% - 80% of the hardware cache size, unless original BPF is modified in some way I do not know. Such high bufsize will degrade performance. -- ------------ Jin Guojun ----------- v --- jin@george.lbl.gov --- Distributed Systems Department http://www.dsd.lbl.gov/~jin Lawrence Berkeley National Laboratory, Berkeley, CA 94720 From owner-freebsd-performance@FreeBSD.ORG Sat Jul 29 00:02:41 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95D6B16A4E1 for ; Sat, 29 Jul 2006 00:02:41 +0000 (UTC) (envelope-from owensr@comcast.net) Received: from alnrmhc11.comcast.net (alnrmhc13.comcast.net [206.18.177.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2CF543D4C for ; Sat, 29 Jul 2006 00:02:40 +0000 (GMT) (envelope-from owensr@comcast.net) Received: from desky64 (c-69-243-17-124.hsd1.va.comcast.net[69.243.17.124]) by comcast.net (alnrmhc13) with SMTP id <20060729000233b1300icvcre>; Sat, 29 Jul 2006 00:02:39 +0000 Message-ID: <003801c6b2a2$5b6687d0$0501a8c0@desky64> From: "Raymond Owens" To: Date: Fri, 28 Jul 2006 20:02:54 -0400 MIME-Version: 1.0 Content-Type: multipart/related; type="multipart/alternative"; boundary="----=_NextPart_000_0034_01C6B280.D06202C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-Mailman-Approved-At: Sat, 29 Jul 2006 01:46:28 +0000 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: question concerning proper usage of kernel variables net.bpf.bufsize and vm_kmem_size_max X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2006 00:02:41 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0034_01C6B280.D06202C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sir, By hardware cache size, you are referring to the processor cache? If the = box has two processors, should the value used for cache size in this = calculation be doubled? In very general terms, what is the link between = the net.bpf.bufsize and the cache? Thanks for info.. R. B. Riddick wrote: >--- Raymond Owens wrote: > =20 > >>Questions: >>Can VM_KMEM_SIZE_MAX be set manually with sysctl? >> >> =20 >> >No, but you could set it with this procedure: >1. Insert the lines > vm.kmem_size=3D123456789 > vm.kmem_size_max=3D1234567890 >in > /boot/loader.conf > >2. reboot > >That should change those values... >(see src/sys/kern/kern_malloc.c) > >I wonder, why your box needs such a big buffer? Do u have network = traffic >bursts or so? > =20 > Regardless what purpose is for, the net.bpf.bufsize should never set above hardware cache size. The best (optimal size) is 50% - 80% of the hardware cache size, unless original BPF is modified in some way I do not know. Such high bufsize will degrade performance. --=20 ------------ Jin Guojun ----------- v --- jin@george.lbl.gov --- Distributed Systems Department http://www.dsd.lbl.gov/~jin Lawrence Berkeley National Laboratory, Berkeley, CA 94720 ------=_NextPart_000_0034_01C6B280.D06202C0-- From owner-freebsd-performance@FreeBSD.ORG Sat Jul 29 23:43:25 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C748916A4E0 for ; Sat, 29 Jul 2006 23:43:25 +0000 (UTC) (envelope-from jin@george.lbl.gov) Received: from smtp109.sbc.mail.mud.yahoo.com (smtp109.sbc.mail.mud.yahoo.com [68.142.198.208]) by mx1.FreeBSD.org (Postfix) with SMTP id 6606043D6B for ; Sat, 29 Jul 2006 23:43:25 +0000 (GMT) (envelope-from jin@george.lbl.gov) Received: (qmail 78561 invoked from network); 29 Jul 2006 23:43:24 -0000 Received: from unknown (HELO ?192.168.2.9?) (jinmtb@sbcglobal.net@68.127.173.50 with plain) by smtp109.sbc.mail.mud.yahoo.com with SMTP; 29 Jul 2006 23:43:24 -0000 Message-ID: <44CBF2E8.5060504@george.lbl.gov> Date: Sat, 29 Jul 2006 16:44:40 -0700 From: "Jin Guojun [VFFS]" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050108 X-Accept-Language: en, zh, zh-CN MIME-Version: 1.0 To: Raymond Owens References: <003801c6b2a2$5b6687d0$0501a8c0@desky64> In-Reply-To: <003801c6b2a2$5b6687d0$0501a8c0@desky64> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-performance@freebsd.org Subject: Re: question concerning proper usage of kernel variables net.bpf.bufsize and vm_kmem_size_max X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2006 23:43:25 -0000 Raymond Owens wrote: >Sir, > >By hardware cache size, you are referring to the processor cache? If the box has two processors, should the value used for cache size in this calculation be doubled? In very general terms, what is the link between the net.bpf.bufsize and the cache? Thanks for info.. > > > BPF was designed to use ping-pong buffers, which create a link to the cache. It is not hard to see an individual bpf buffer size should not close to the cache size if upper layer applications need to continue to capture packets. If up layer program cannot drain the BPF buffer faster than the NIC to fill the buffer, increasing buffer only gives you a short-time cushion at start phase. Once buffers are filled, you will start to lose packets anyway. Only situation to increasing BPF size above cache size is if applications are designed for catching periodically bursting traffic, and the CPU/system is slow enough and not able to compete with NIC I/O. Under such scenario, you could to increase the BPF buffer size to cushion the surge. > R. B. Riddick wrote: > > >--- Raymond Owens wrote: > > > > > >>Questions: > >>Can VM_KMEM_SIZE_MAX be set manually with sysctl? > >> > >> > >> > >No, but you could set it with this procedure: > >1. Insert the lines > > vm.kmem_size=123456789 > > vm.kmem_size_max=1234567890 > >in > > /boot/loader.conf > > > >2. reboot > > > >That should change those values... > >(see src/sys/kern/kern_malloc.c) > > > >I wonder, why your box needs such a big buffer? Do u have network traffic > >bursts or so? > > > > > Regardless what purpose is for, the net.bpf.bufsize should never > set above hardware cache size. The best (optimal size) is 50% - 80% > of the hardware cache size, unless original BPF is modified in some > way I do not know. > Such high bufsize will degrade performance. > >