#--lavr, use for 4.6/7/8/9 & 4.10 RELEASE, this is KERNEL for SERVER != WKS
machine		i386
cpu             I686_CPU
ident		DBSERVER
maxusers	512

# mem use
options         MAXDSIZ="(512*1024*1024)"
options         MAXSSIZ="(512*1024*1024)"
options         DFLDSIZ="(512*1024*1024)"

# co-processor emulate
options 	MATH_EMULATE		#Support for x87 emulation

# net support
options 	INET			#InterNETworking
#options 	INET6			#IPv6 communications protocols

# FS and feature support
options 	FFS			#Berkeley Fast Filesystem
options 	FFS_ROOT		#FFS usable as root device [keep this!]
options 	MFS			#Memory Filesystem
options 	MD_ROOT			#MD is a potential root device
options 	NFS			#Network Filesystem
options 	NFS_ROOT		#NFS usable as root device, NFS required
options 	MSDOSFS			#MSDOS Filesystem
options 	CD9660			#ISO 9660 Filesystem
options 	CD9660_ROOT		#CD-ROM usable as root, CD9660 required
options 	PROCFS			#Process filesystem
options         FDESC                   #File descriptor filesystem
options         KERNFS                  #Kernel filesystem
options         SMBFS                   #SMB/CIFS filesystem
# UMAP, UNION, NULL, PORTAL buggy - use modules for load
#options         UMAPFS                  #UID map filesystem
#options         UNION                   #Union filesystem
#options         NULLFS                  #NULL filesystem
#options         PORTAL                  #Portal filesystem

options 	SOFTUPDATES		#Enable FFS soft updates support
options 	UFS_DIRHASH		#Improve performance on big directories

# Disk quotas are supported when this option is enabled.
options         QUOTA                   #enable disk quotas

# more than one swap device
options         NSWAPDEV=4

# compat
options 	COMPAT_43		#Compatible with BSD 4.3 [KEEP THIS!]

# scsi reset
options 	SCSI_DELAY=8000	#Delay (in ms) before probing SCSI

# boot
options 	UCONSOLE		#Allow users to grab the console
options 	USERCONFIG		#boot -c editor
options 	VISUAL_USERCONFIG	#visual boot -c editor

options 	KTRACE			#ktrace(1) support

#--lavr. don't use this defaults for hard-loaded servers!!!
# SysV Shared Memory support
#options 	SYSVSHM			#SYSV-style shared memory
#options 	SYSVMSG			#SYSV-style message queues
#options 	SYSVSEM			#SYSV-style semaphores

#--lavr, below for MONOLITIC KERNEL, but better way to use sysctl!!!
#SysV SHM for Oracle and apps that use shared-memory, oreacle+perl+apps
# System V shared memory and tunable parameters
options 	SYSVSHM			#SYSV-style shared memory
options         SHMMAXPGS=131070         ### for Oracle...
#--lavr, after some kernel-changes DON'T use SHMALL (SHMALL=SHMMAXPGS)
#options         SHMALL=262144
options         SHMMAX="(SHMMAXPGS*PAGE_SIZE+1)"
options         SHMMIN=2
options         SHMMNI=512              ### for Oracle...
options         SHMSEG=512              ### for Oracle...
###
options         SYSVSEM                 #SYSV-style semaphore
options         SEMMAP=512
options         SEMMNI=512      ### for Oracle...
options         SEMUME=512
options         SEMMNS=1024     ### for Oracle...
options         SEMMNU=512
options         SEMMSL=256      ### for Oracle...
options         SEMOPM=256
###
options         SYSVMSG                 #SYSV-style messages.
options         MSGMNB=16384
options         MSGMNI=256
options         MSGSEG=8196
options         MSGSSZ=16
options         MSGTQL=256

# Posix standartization
options 	P1003_1B		#Posix P1003_1B real-time extensions
options 	_KPOSIX_PRIORITY_SCHEDULING
options         _KPOSIX_VERSION=199309L

# IPFIREWALL
options         IPFIREWALL
options         IPFIREWALL_DEFAULT_TO_ACCEPT
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_VERBOSE_LIMIT=500
#
options         IPFIREWALL_FORWARD

options         IPDIVERT                #divert sockets
options         IPSTEALTH               #support for stealth forwarding
options         TCPDEBUG

# RANDOM_IP_ID causes the ID field in IP packets to be randomized
# instead of incremented by 1 with each packet generated.  This
# option closes a minor information leak which allows remote
# observers to determine the rate of packet generation on the
# machine by watching the counter.
options         RANDOM_IP_ID

#--lavr, don't recommended for Web-Servers, can be use via sysctl
#options         TCP_DROP_SYNFIN         #drop TCP packets with SYN+FIN

# Statically Link in accept filters
options                ACCEPT_FILTER_DATA
options                ACCEPT_FILTER_HTTP

# Some TCP/IP stack limits against hackers attacks, can be use via sysctl
options		ICMP_BANDLIM		#Rate limit bad replies

# DUMMYNET enables the "dummynet" bandwidth limiter. You need
# IPFIREWALL as well. See the dummynet(4) and ipfw(8) manpages for more info.
# When you run DUMMYNET it is advisable to also have "options HZ=1000"
# to achieve a smoother scheduling of the traffic.
#
# BRIDGE enables bridging between ethernet cards -- see bridge(4).
# You can use IPFIREWALL and DUMMYNET together with bridging.
#
#--lavr uncomment for use trafic-shaper and bandwidth
#options         DUMMYNET
#--lavr use this for bridge
#options         BRIDGE

#
# SMB/CIFS requester
# NETSMB enables support for SMB protocol, it requires LIBMCHAIN and LIBICONV
# options.
# NETSMBCRYPTO enables support for encrypted passwords.
options         NETSMB                  #SMB/CIFS requester
options         NETSMBCRYPTO            #encrypted password support for SMB

# mchain library. It can be either loaded as KLD or compiled into kernel
options         LIBMCHAIN               #mbuf management library
# Kernel side iconv library
options         LIBICONV

# some other feature
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
#options         USER_LDT                #allow user-level control of i386 ldt

# To make an SMP kernel, the next two are needed
#options 	SMP			# Symmetric MultiProcessor Kernel
#options 	APIC_IO			# Symmetric (APIC) I/O

device		isa
device		pci

# Floppy drives
device		fdc0	at isa? port IO_FD1 irq 6 drq 2
device		fd0	at fdc0 drive 0
device		fd1	at fdc0 drive 1

# ATA and ATAPI devices
device		ata
device		atadisk			# ATA disk drives
device		atapicd			# ATAPI CDROM drives
device		atapifd			# ATAPI floppy drives
device		atapist			# ATAPI tape drives
options 	ATA_STATIC_ID		#Static device numbering

# SCSI Controllers
device		ahc		# AHA2940 and onboard AIC7xxx devices

# SCSI peripherals
device		scbus		# SCSI bus (required)
device		da		# Direct Access (disks)
device		sa		# Sequential Access (tape etc)
device		cd		# CD
device		pass		# Passthrough device (direct SCSI access)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc0	at isa? port IO_KBD
device		atkbd0	at atkbdc? irq 1 flags 0x1
device		psm0	at atkbdc? irq 12

device		vga0	at isa?

# splash screen/screen saver
pseudo-device	splash

# syscons is the default console driver, resembling an SCO console
device		sc0	at isa? flags 0x100
options         SC_DISABLE_REBOOT

# Floating point support - do not disable.
device		npx0	at nexus? port IO_NPX irq 13

# Power management support (see LINT for more options)
#device		apm0    at nexus? disable flags 0x20 # Advanced Power Management
device		apm0
#--lavr, use only one: apm OR acpica
# ACPI support using the Intel ACPI Component Architecture reference
# implementation.
#
#device          acpica


# Serial (COM) ports
device		sio0	at isa? port IO_COM1 flags 0x10 irq 4
device		sio1	at isa? port IO_COM2 irq 3

# Parallel port
#device		ppc0	at isa? irq 7
#device		ppbus		# Parallel port bus (required)
#device		lpt		# Printer
#device		plip		# TCP/IP over parallel
#device		ppi		# Parallel port interface device
#device		vpo		# Requires scbus and da


# PCI Ethernet NICs.

# DEVICE_POLLING adds support for mixed interrupt-polling handling
# of network device drivers, which has significant benefits in terms
# of robustness to overloads and responsivity, as well as permitting
# accurate scheduling of the CPU time between kernel network processing
# and other activities. The drawback is a moderate (up to 1/HZ seconds)
# potential increase in response times.
# It is strongly recommended to use HZ=1000 or 2000 with DEVICE_POLLING
# to achieve smoother behaviour.
# Additionally, you can enable/disable polling at runtime with the
# sysctl variable kern.polling.enable (defaults off), and select
# the CPU fraction reserved to userland with the sysctl variable
# kern.polling.user_frac (default 50, range 0..100).
#
# Only the "dc" "fxp" and "sis" devices support this mode of operation at
# the time of this writing.
 
#--lavr uncomment for use POLLING
#options         DEVICE_POLLING

# The granularity of operation is controlled by the kernel option HZ whose
# default value (100) means a granularity of 10ms (1s/HZ).
# Some subsystems, such as DUMMYNET or DEVICE_POLLING, might benefit from
# a smaller granularity such as 1ms or less.
# Consider, however, that reducing the granularity too much might
# cause excessive overhead in clock interrupt processing,
# potentially causing ticks to be missed and thus actually reducing
# the accuracy of operation.

#options         HZ=100
#--lavr uncomment for DUMMYNET trafic-shaper (man DUMMYNET)
#options HZ=1000

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device		miibus		# MII bus support
device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)

# Pseudo devices - the number indicates how many units to allocate.
pseudo-device	loop		# Network loopback
pseudo-device	ether		# Ethernet support
#pseudo-device	ppp	4	# Kernel PPP
#pseudo-device	tun		# Packet tunnel.
pseudo-device	pty		# Pseudo-ttys (telnet etc)
pseudo-device	md		# Memory "disks"
#pseudo-device   ccd     4       #Concatenated disk driver
#pseudo-device   vinum           #Vinum concat/mirror/raid driver

# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device	bpf		#Berkeley packet filter

# VLan device for 802.1q
#pseudo-device   vlan    4

# IPv6
#pseudo-device	gif		# IPv6 and IPv4 tunneling
#pseudo-device	faith	1	# IPv6-to-IPv4 relaying (translation)

#
# SMB bus
#
# System Management Bus support is provided by the 'smbus' device.
# Access to the SMBus device is via the 'smb' device (/dev/smb*),
# which is a child of the 'smbus' device.
#
# Supported devices:
# smb           standard io through /dev/smb*
#
# Supported SMB interfaces:
# iicsmb        I2C to SMB bridge with any iicbus interface
# intpm         Intel PIIX4 (82371AB, 82443MX) Power Management Unit
# ichsmb        Intel ICH SMBus controller chips (82801AA, 82801AB, 82801BA)
# viapm         VIA VT82C586B,596,686A and VT8233 SMBus controllers

#device		smbus
#device          iicsmb          # smb over i2c bridge
#device          smb

# iicbb generic I2C bit-banging code (needed by lpbb, bktr)
#
#device          iicbus         # Bus support, required for ic/iic/iicsmb below.
#device          iicbb

#
# I2C Bus
#
# Philips i2c bus support is provided by the `iicbus' device.
#
# Supported devices:
# ic    i2c network interface
# iic   i2c standard io
# iicsmb i2c to smb bridge. Allow i2c i/o with smb commands.
#device          ic
#device          iic

# Tuning
# Add tie-ins for a hardware watchdog.  This only enable the hooks;
# the user must still supply the actual driver.
#
options         HW_WDOG

#
# Set the number of PV entries per process.  Increasing this can
# stop panics related to heavy use of shared memory. However, that can
# (combined with large amounts of physical memory) cause panics at
# boot time due the kernel running out of VM space.
#
# If you're tweaking this, you might also want to increase the sysctls
# "vm.v_free_min", "vm.v_free_reserved", and "vm.v_free_target".
#
# The value below is the one more than the default.
#
#options         PMAP_SHPGPERPROC=201

#
# Change the size of the kernel virtual address space.  Due to
# constraints in loader(8) on i386, this must be a multiple of 4.
# 256 = 1 GB of kernel address space.  Increasing this also causes
# a reduction of the address space in user processes.  512 splits
# the 4GB cpu address space in half (2GB user, 2GB kernel).
#
#options         KVA_PAGES=260

# Set the number of sf_bufs to allocate. sf_bufs are virtual buffers
# for sendfile(2) that are used to map file VM pages, and normally
# default to a quantity that is roughly 16*MAXUSERS+512. You would
# typically want about 4 of these for each simultaneous file send.
#
#options         NSFBUFS=1024

# Set the size of the buffer cache KVM reservation, in buffers.  This is
# scaled by approximately 16384 bytes.  The system will auto-size the buffer
# cache if this option is not specified.
#
#options         NBUF=512

# Set the size of the mbuf KVM reservation, in clusters.  This is scaled
# by approximately 2048 bytes.  The system will auto-size the mbuf area
# to (512 + maxusers*16) if this option is not specified.
# maxusers is in turn computed at boot time depending on available memory
# or set to the value specified by "options MAXUSERS=x" (x=0 means
# autoscaling).
# So, to take advantage of autoscaling, you have to remove both
# NMBCLUSTERS and MAXUSERS (and NMBUFS) from your kernel config.
#
#options         NMBCLUSTERS=1024
options         NMBCLUSTERS=8192
#options         NMBCLUSTERS=16384
#options         NMBCLUSTERS=32768

# Set the number of mbufs available in the system. Each mbuf
# consumes 256 bytes. The system will autosize this (to 4 times
# the number of NMBCLUSTERS, depending on other constraints)
# if this option is not specified.
#
#options         NMBUFS=4096
options         NMBUFS=32768

# Set the amount of time (in seconds) the system will wait before
# rebooting automatically when a kernel panic occurs.  If set to (-1),
# the system will wait indefinitely until a key is pressed on the
# console.
options         PANIC_REBOOT_WAIT_TIME=16

