From owner-freebsd-questions@FreeBSD.ORG Sun Dec 10 16:59:34 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1953F16A412 for ; Sun, 10 Dec 2006 16:59:34 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8743B43C9D for ; Sun, 10 Dec 2006 16:58:22 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from working (c-71-60-174-60.hsd1.pa.comcast.net [71.60.174.60]) (AUTH: LOGIN wmoran, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Sun, 10 Dec 2006 11:59:32 -0500 id 00056403.457C3CF4.0000E62E Date: Sun, 10 Dec 2006 11:59:31 -0500 From: Bill Moran To: Kirk Strauser Message-Id: <20061210115931.3c176bd7.wmoran@collaborativefusion.com> In-Reply-To: <200612100941.53860.kirk@strauser.com> References: <200612100905.30430.kirk@strauser.com> <200612100919.59564.lane@joeandlane.com> <200612100941.53860.kirk@strauser.com> Organization: Collaborative Fusion Inc. X-Mailer: Sylpheed version 2.2.10 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Advantages of trimmed kernel? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2006 16:59:34 -0000 Kirk Strauser wrote: > > On Sunday 10 December 2006 09:19, Lane wrote: > > > You say that you can't afford to take a production machine down, but > > consider this: What if you trimmed all of the "fat" from the kernel on a > > server, and then the server's nic goes bad. > > Well, that's an example of the kind of thing that makes me not want to hack > GENERIC too much. Also, accidentally removing some critical driver is > another drawback. So, with all the disadvantages, are there any real > advantages to doing this? Saving half a meg of memory on a four gig machine > isn't worth the aggravation. Squeezing an extra 10% performance out of the > same hardware would be, though. It's interesting that I've never seen any performance tests regarding this sort of thing. Theoretically, the kernel should be faster with less stuff in it, but whether that theory bears out in practice, and whether it's enough to make it worthwhile -- I don't know. The tough thing would be effectively testing it. It's quite possible that only certain functions of the kernel would speed up, in which case, it could be difficult to determine whether there's any gain or not. Additionally, different drivers might provide different advantages/ disadvantages from being loaded/unloaded. I.e., compiling without a particular SCSI adapter might provide a benefit, while compiling without a particular NIC driver might do nothing. One has to wonder whether it's even worth going to all the work to quantify it? I mean, take the following in to account: 1) Recompiling a kernel in FreeBSD is damn easy. 2) Loading a driver from a kld if you forget it is easy. 3) Most (all?) settings that are set at kernel compile time can be adjusted via sysctl without recompiling. 4) There's obviously no _huge_ benefit to building a custom kernel, or someone would have made mention of it. -Bill