>Были проблеммы в сети и вдруг сервер начал ежесекундно выдавать такую ошибку:
>"All mbufs exhausted, please see tuning(7)"
>Что это? И из-за чего таке может быть? Помогла только перезагрузка.
недостаточно кол-ва сетевых mbuf, ясно же сказано, читай:
# man 7 tuning (там все расписано, так же как и в FAQ
# netstat -m
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-kernel-limits.html
увеличить maxusers, nmbclusters и nmbufs:
# less /sys/i386/conf/LINT
...
# 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.
#
#--lavr, читаем выше и там все расписано, как и по какой формуле, ну или
# положиться на автотюнинг ядра: maxusers=0 (последнее под вопросом)
options NMBCLUSTERS=1024
# 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
...