Opcje bootowania serwera

Za pomocą pliku /boot/loader.conf można wysterować serwer w celu lepszego działania. Szczególnie możliwe jest dogranie różnych niezbędnych modułów.


loader.conf

#
# loader.conf
#
# Lokalna konfiguracja bootowania systemu operacyjnego
#

# --- Za/ladowanie modu/l/ow do obs/lugi system/ow plik/ow -----------------
#
opensolaris_load="YES"
zfs_load="YES"

# szyfrowana partycja SWAP
geom_eli_load="YES"

# je/zeli jest wsparcie w procesorze dla AESNI:
aesni_load="YES"

# wy/l/aczenie gptid
kern.geom.label.gpt.enable="1"
kern.geom.label.gptid.enable="0"
kern.geom.label.disk_ident.enable="0"

# --- ustawienie konsoli VT (zamiast SC) -----------------------------------
#
hw.vga.textmode=1
kern.vty=vt

# dla serwer/ow, kt/ore to wspieraj/a (np. HP, Dell, etc.)
ipmi_load="YES"

# --- Za/ladowanie modu/l/o/w odpowiedzialnych za interfejsy sieciowe ------
#
miibus_load="YES"
if_bge_load="YES"

### potrzebne w celu posiadania klawiatury PS/2 (szczeg/olnie przez KVM via JNLP)
### UWAGA!!! Dopisa/c dopiero przed instalacj/a oraz uruchomieniem w/lasnego kernela!
### Wpisanie poni/zszego dla kernela "instalacyjnego" powoduje problem z bootowaniem
###

# --- Za/ladowanie oraz konfiguracja obs/lugi wielu klawiatur ---------------
#
kbdmux_load="YES"
hint.atkbdc.0.at="isa"
hint.atkbdc.0.port="0x060"
hint.atkbd.0.at="atkbdc"
hint.atkbd.0.irq="1"

# --- Konfiguracja rozmiaru pami/eci dla kernela oraz ZFS -------------------
#
# vm.kmem_size= 150% fizycznej pami/eci RAM
# zfs.zfs.arc_max= 50% fizycznej pami/eci RAM
#
vm.kmem_size="NNG"
zfs.zfs.arc_max="NNG"

# --- /scie/zka, z kt/orej nale/zy startowa/c system ------------------------
#
vfs.root.mountfrom="zfs:sys/bootenv/default"

# accf accept filters are used so the server will not have to context switch several times
# before performing the initial parsing of the request. This could decrease server load by
# reducing the amount of CPU time to handle incoming requests.

# Wait for data accept filter. For nginx https servers add "listen
# 127.0.0.1:443 ssl spdy accept_filter=dataready;"
##accf_data_load="YES"

# buffer incoming connections until complete HTTP requests arrive (nginx
# apache) for nginx http add, "listen 127.0.0.1:80 accept_filter=httpready;"
##accf_http_load="YES"

# Wait for full DNS request accept filter (unbound)
accf_dns_load="YES"

# Je/zeli nie jest wkompilowane w kernel:
# Advanced Host Controller Interface (AHCI)
#ahci_load="YES"

# Asynchronous I/O, or non-blocking I/O is a form of input/output processing
# permiting other processing to continue before the transmission has finished.
# AIO is used for accelerating Nginx on ZFS. Check for our tutorials on both.
aio_load="YES"

# Increase VDEV read ahead cache size. This reduces scrub times and
# metadata-intensive tasks for a small cost in RAM. The vdev cache uses a
# simple FIFO rolling data set.
vfs.zfs.vdev.cache.size="64M"
vfs.zfs.vdev.cache.max="64M"

vfs.zfs.txg.synctime_ms="3000"  # default 1000

Monitorowanie temperatury procesora

Potrzebne w szczególności dla collectd.

# thermal sensors for intel or amd cpus
coretemp_load="YES"

# dla procesor/ow AMD
#amdtemp_load="YES"

Optymalizacja dla SAMBA

# Commit async writes if the maximum I/O requests pending on each device reach
# the limit.
vfs.zfs.vdev.max_pending="32"  # default 10

# Enable the optimized version of soreceive() for stream (TCP) sockets.
# soreceive_stream() only does one sockbuf unlock/lock per receive independent
# of the length of data to be moved into the uio compared to soreceive() which
# unlocks/locks per *mbuf*. soreceive_stream() can significantly reduced CPU
# usage and lock contention when receiving fast TCP streams. Additional gains
# are obtained when the receiving application is using SO_RCVLOWAT to batch up
# some data before a read (and wakeup) is done.
net.inet.tcp.soreceive_stream="1"  # (default 0)

# qlimit for igmp, arp, ether and ip6 queues only (netstat -Q) (default 256)
net.isr.defaultqlimit="2048" # (default 256)

# Size of the syncache hash table, must be a power of 2 (default 512)
net.inet.tcp.syncache.hashsize="1024"

# Limit the number of entries permitted in each bucket of the hash table. (default 30)
net.inet.tcp.syncache.bucketlimit="100"

# CUBIC Congestion Control allows for more fairness between flows since the
# window growth is independent of RTT.
cc_cubic_load="YES"

Obsługa tmpfs

# TMPFS na potrzeby poudriere
#
tmpfs_load="YES"

Dodatki dla serwerów HP

multikonsole

Domyślna prędkość konsoli (Serial-over-LAN) to 9600 kB/s. Niemniej przestawiając w BIOSie oraz w loader.conf można uzyskać prędkość nawet 115200 (całkiem dobrze można pracować).

# --- wielokonsolowo/s/c ------------------------------
#
# Zgodnie z informacjami znalezionymi w sieci HP ML 110 G6 posiada emulacj/e PS/2
# opart/a na USB. Jednocze/snie nie mo/zna ustawi/c "USB Legacy", a zatem w trakcie
# bootowania nie ma klawiatury
# Poprzez przekierowanie konsoli na ttyu0 mo/zna sterowa/c procesem bootowania poprzez
# dedykowany port "MGMT" w serwerze
# Linki w sieci:
# https://www.freebsd.org/doc/handbook/serialconsole-setup.html
# http://h30499.www3.hp.com/t5/ProLiant-Servers-ML-DL-SL/ML110-G6-ILO-Password/td-p/2326467
# http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02063205/c02063205.pdf
#
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="9600"
comconsole_speed="115200"
console="comconsole,vidconsole"

Niestabilne działanie karty sieciowej

Zdarzyło się, że karta sieciowa zgłaszała problemy z działaniem. Na konsoli pojawiał się komunikat "watchdog timeout resetting". Rozwiązaniem problemu jest dopisanie wpisu w pliku loader.conf:

# --- ustawbilizownie pracy BGE - 'watchdog timeout resetting" -------------
#
hw.bge.allow_asf=0