|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
FreeBSD Kernel Optimization
Hi guys,
Quick question. I've been using FreeBSD for many years, and whenever I compile a custom kernel, I've always made a point of going through and commenting out any devices I'm not using, such as ethernet cards, scsi cards, raid cards, etc. I was attempting to optimize the kernel and take a little load off the server, however I don't know much about the low level and how FreeBSD handles these unused devices during bootup. I was thinking about this earlier... does FreeBSD actually take a (tiny) performance hit from leaving those uncommented, or are they simply ignored on bootup and I'm wasting time going through and commenting them all out? Not critical either way, I'm just curious. Thanks! |
|
|||
In the OpenBSD world, such unnecessary "optimizations" leave the user with an unsupported kernel.
But as with all of the BSD projects, an unmodified kernel will not slow things down at all.. initial device discovery/probing is usually quite fast, all you could possibly gain is some negligible amount of free space.. a couple MB max shaved off of the final kernel binary. FreeBSD makes use of loadable kernel modules, so presumably some drivers can be made separate.. I do not know much about this functionality. Hope that helps. |
|
|||
So just a few megs of ram wasted? No CPU cycles / boot time / etc?
|
|
|||
If no appropriate devices are detected, the driver won't "attach" to anything.
It'll still be loaded in memory, but it'll just be a code path that's never followed.. no extra CPU cycles wasted. As I said, device probing takes a very insignificant amount of time.. but you can go ahead and time it if you want. Have fun. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FreeBSD 7 i386, PAE and kernel modules | eztiger | FreeBSD Installation and Upgrading | 7 | 1st April 2009 06:07 PM |
FreeBSD 7.1 kernel incompatible with a linux program | map7 | FreeBSD Installation and Upgrading | 7 | 5th November 2008 11:17 PM |
Compiling a blob-free FreeBSD 7.0 kernel | Tsuroerusu | FreeBSD General | 5 | 12th September 2008 08:56 PM |
FreeBSD 7.0 kernel building... | daemonFromHeaven | FreeBSD Installation and Upgrading | 4 | 3rd September 2008 02:42 PM |
Understanding the FreeBSD kernel | TomAmundsen | FreeBSD General | 3 | 7th July 2008 02:48 PM |