Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jul 2011 02:14:51 +0700
From:      Eugene Grosbein <egrosbein@rdtc.ru>
To:        Adrian Minta <gygy@stsnet.ro>
Cc:        freebsd-net@freebsd.org
Subject:   Re: FreeBSD 8.2 and MPD5 stability issues - update
Message-ID:  <20110704191451.GA12372@rdtc.ru>
In-Reply-To: <813678a855c90c49bf66c7084f88b45d.squirrel@mail.stsnet.ro>
References:  <813678a855c90c49bf66c7084f88b45d.squirrel@mail.stsnet.ro>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110704191451.GA12372>