Subject: Kernel configuration questions
To: None <netbsd-help@netbsd.org>
From: Amadeus Stevenson <amadeus.stevenson@gmail.com>
List: netbsd-help
Date: 04/29/2006 21:42:44
Hello,

I'm trying to tighten up one of my systems (release-2-0 i386), and
having a look through the kernel conf realised that there are a lot of
non-driver entries that

a) I don't know what they do
b) I don't know if I need them

Documentation is a little scarce; although only looking at the
netbsd-guide is perhaps a reason for this.

maxusers        64              # estimated number of users

From the freebsd handbook
(http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-ker=
nel-limits.html)
this is where kern.maxfiles comes from?

On my system

# pstat -Th
142/6000 files
  10234 vnodes
35M/488M swap space

So it looks like I'm underusing my kern.maxfiles quite a lot. I wonder
what the calculation between maxusers and maxfiles is? Does it matter
that this is more than it needs to be (taking into account load
spikes)?

Also

options         MATH_EMULATE    # floating point emulation
options         VM86            # virtual 8086 emulation
options         MTRR            # memory-type range register syscall suppor=
t

I'm not sure I need these are; what does floating point emulation do?
Is it needed?

options         INSECURE        # disable kernel security levels - X needs =
this

Seeing as I'm not using X would this cause problems if disabled?

Running modstat shows no lkm's so I guess I can remove support for this?

`mount` shows ffs and kernfs in use, so is it safe to just enable
these and ignore union, overlay and such? Is nullfs important?

options         SYSVMSG         # System V-like message queues
options         SYSVSEM         # System V-like semaphores
options         SYSVSHM         # System V-like memory sharing
options         P1003_1B_SEMAPHORE      # p1003.1b semaphore support

I'm not sure if these are "mission-critical" either.

How can I find out if the system is using things like

pseudo-device   md              1       # memory disk device (ramdisk)
pseudo-device   vnd             4       # disk-like interface to files
pseudo-device   bpfilter        8       # Berkeley packet filter
pseudo-device   sl              2       # Serial Line IP
pseudo-device   strip           2       # Starmode Radio IP (Metricom)
pseudo-device   irframetty              # IrDA frame line discipline
pseudo-device   tun             2       # network tunneling over tty
pseudo-device   gre             2       # generic L3 over IP tunnel
pseudo-device   gif             4       # IPv[46] over IPv[46] tunnel

? I know gre is used from looking at tcpdump from time to time, but
otherwise I wouldn't know where to look.

Sorry for the ignorant questions; a quick amazon search didn't reveal
any netbsd-tweaking guides and I have always wondered about these
things anyway.

I guess my main question is: "how to find out what kernel options your
system is using".

Thanks in advance for any help,

Amadeus