X
X
xandr0s2013-11-09 14:55:29
FreeBSD
xandr0s, 2013-11-09 14:55:29

Tuning freebsd?

HaProxy balancer is up on FreeBSD, sometimes messages appear in the logs

Proxy *** reached system memory limit at 67 sockets. Please check system tunables.

After a short period of time after a series of such messages, the server loses contact with the outside world until it is rebooted. Here is the output of netstat -m :
2004/2991/4995 mbufs in use (current/cache/total)
2001/1803/3804/32768 mbuf clusters in use (current/cache/total/max)
/cache)
0/135/135/12800 4k (page size) jumbo clusters in use (current/cache/total/max)
0/0/0/6400 9k jumbo clusters in use (current/cache/total/max)
0 /0/0/3200 16k jumbo clusters in use (current/cache/total/max)
4503K/4893K/9396K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/ mbuf+clusters)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
0/0/0 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed
0 requests for I/O initiated by
sendfile

If I found how to increase the number of mbufs, sockets and clusters using sysctl, then I can’t find variables under memory allocation (highlighted in bold). Tell me, in which direction to dig? There are thoughts that this is the problem.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav, 2013-11-09
@xandr0s

More

kern.ipc.nmbclusters=400000
kern.ipc.maxsockbuf=83886080

I have here:
21502/10887/32389 mbufs in use (current/cache/total)
20464/7831/28295/400000 mbuf clusters in use (current/cache/total/max)
20464/7823 mbuf+clusters out of packet secondary zone in use (current/cache)
0/0/0/253036 4k (page size) jumbo clusters in use (current/cache/total/max)
0/0/0/74973 9k jumbo clusters in use (current/cache/total/max)
0/0/0/42172 16k jumbo clusters in use (current/cache/total/max)
92607K/36767K/129374K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for mbufs delayed (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters delayed (4k/9k/16k)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
0/0/0 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed
0 requests for I/O initiated by sendfile
0 calls to protocol drain routines

N
nochkin, 2013-11-09
@nochkin

ipf is being used? If so, then you need to raise the limits there too.
For example:
net.inet.ipf.fr_statemax
net.inet.ipf.fr_statesize

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question