FreeBSD 8.2 and MPD5 stability issues - update

Eugene Grosbein egrosbein at rdtc.ru
Mon Jul 4 19:15:01 UTC 2011


On Mon, Jul 04, 2011 at 08:16:19PM +0300, Adrian Minta wrote:

> >It seems, enough. But, are you sure your L2TP client will wait
> >for overloaded daemon to complete connection? The change will
> >proportionally increase responsiveness of mpd - it has not enough CPU
> >horsepower to process requests timely.
> >
> >Eugene Grosbein
> 
> Actually something else is happening.
> 
> I increased the queue in msg.c
> #define       MSG_QUEUE_LEN   65536

You can't do this blindly, without other changes.
For example, there is MSG_QUEUE_MASK in the next line
that must be equal to MSG_QUEUE_LEN-1 and effectively
limits usage of this queue.

> ... and in the ppp.h:
> #define SETOVERLOAD(q)        do {                                    \
>                                     int t = (q);                        \
>                                     if (t > 600) {                      \
>                                         gOverload = 100;                \
>                                     } else if (t > 100) {               \
>                                         gOverload = (t - 100) * 2;      \
>                                     } else {                            \
>                                         gOverload = 0;                  \
>                                     }                                   \
>                                 } while (0)
> 
> Now the overload message is very rare, but the behaviour is the same.
> Around 5500 sessions the number don't grow anymore, but instead begin to
> decrease.

You should study why existing connections break,
do clients disconnect themselves or server disconnect them?
You'll need turn off detailed logs, read mpd's documentation.

Also, there are system-wide queues for NETGRAPH messages that can overflow
and that's bad thing. Check them out with command:

vmstat -z | egrep 'ITEM|NetGraph'

FAILURES column shows how many times NETGRAPH queues have been overflowed.
One may increase their LIMIT (second column in vmstat's output)
with /boot/loader.conf:

net.graph.maxdata=65536
net.graph.maxalloc=65536

Eugene Grosbein


More information about the freebsd-net mailing list