From owner-freebsd-net@FreeBSD.ORG Thu Jan 5 13:49:04 2012 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BE7E106568C; Thu, 5 Jan 2012 13:49:04 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id DC7508FC14; Thu, 5 Jan 2012 13:49:03 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q05Dn2Wa057994; Thu, 5 Jan 2012 17:49:02 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q05Dn2YM057993; Thu, 5 Jan 2012 17:49:02 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 5 Jan 2012 17:49:02 +0400 From: Gleb Smirnoff To: Sami Halabi Message-ID: <20120105134902.GP34721@glebius.int.ru> References: <20111227044754.GK8035@FreeBSD.org> <20111227083503.GP8035@glebius.int.ru> <20120105095855.GI34721@glebius.int.ru> <20120105110116.GK34721@glebius.int.ru> <20120105113427.GL34721@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@FreeBSD.org, Alexander Motin Subject: Re: ng_mppc_decompress: too many (4094) packets dropped, disabling node X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2012 13:49:04 -0000 On Thu, Jan 05, 2012 at 03:43:45PM +0200, Sami Halabi wrote: S> Hmm.. S> S> Somthing strange, i did: S> net.graph.recvspace=8388608 S> net.graph.maxdgram=8388608 S> S> S> and i suddenly got disconnections and logs like: S> Jan 5 16:10:01 mpd2 mpd: L2TP: ppp_l2tp_ctrl_create: No buffer space S> available S> Jan 5 16:10:11 mpd2 mpd: PPTP: NgMkSockNode: No buffer space available S> S> the mpd as follows: S> S> Jan 5 16:10:01 mpd2 mpd: Incoming L2TP packet from 172.25.229.3 1701 S> Jan 5 16:10:01 mpd2 mpd: L2TP: ppp_l2tp_ctrl_create: No buffer space S> available S> Jan 5 16:10:01 mpd2 mpd: Incoming L2TP packet from 172.27.173.112 1701 S> Jan 5 16:10:01 mpd2 mpd: L2TP: ppp_l2tp_ctrl_create: No buffer space S> available S> Jan 5 16:10:03 mpd2 mpd: Incoming L2TP packet from 172.19.246.206 1701 S> Jan 5 16:10:03 mpd2 mpd: L2TP: ppp_l2tp_ctrl_create: No buffer space S> available S> Jan 5 16:10:06 mpd2 mpd: Incoming L2TP packet from 172.27.173.112 1701 S> Jan 5 16:10:06 mpd2 mpd: L2TP: ppp_l2tp_ctrl_create: No buffer space S> available S> Jan 5 16:10:11 mpd2 mpd: [L-14] Accepting PPTP connection S> Jan 5 16:10:11 mpd2 mpd: [L-14] Link: OPEN event S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: Open event S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: state change Initial --> Starting S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: LayerStart S> Jan 5 16:10:11 mpd2 mpd: [L-14] PPTP: attaching to peer's outgoing call S> Jan 5 16:10:11 mpd2 mpd: PPTP: NgMkSockNode: No buffer space available S> Jan 5 16:10:11 mpd2 mpd: [L-14] PPTP call cancelled in state CONNECTING S> Jan 5 16:10:11 mpd2 mpd: [L-14] Link: DOWN event S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: Close event S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: state change Starting --> Initial S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: LayerFinish S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: Down event S> Jan 5 16:10:11 mpd2 mpd: [L-14] Link: SHUTDOWN event S> Jan 5 16:10:11 mpd2 mpd: [L-14] Link: Shutdown S> Jan 5 16:10:11 mpd2 mpd: [L-14] Accepting PPTP connection S> Jan 5 16:10:11 mpd2 mpd: [L-14] Link: OPEN event S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: Open event S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: state change Initial --> Starting S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: LayerStart S> Jan 5 16:10:11 mpd2 mpd: [L-14] PPTP: attaching to peer's outgoing call S> Jan 5 16:10:11 mpd2 mpd: PPTP: NgMkSockNode: No buffer space available S> Jan 5 16:10:11 mpd2 mpd: [L-14] PPTP call cancelled in state CONNECTING S> Jan 5 16:10:11 mpd2 mpd: [L-14] Link: DOWN event S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: Close event S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: state change Starting --> Initial S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: LayerFinish S> Jan 5 16:10:11 mpd2 mpd: [L-14] LCP: Down event S> Jan 5 16:10:11 mpd2 mpd: [L-14] Link: SHUTDOWN event S> Jan 5 16:10:11 mpd2 mpd: [L-14] Link: Shutdown S> Jan 5 16:10:16 mpd2 mpd: Incoming L2TP packet from 172.27.173.112 1701 S> Jan 5 16:10:16 mpd2 mpd: L2TP: ppp_l2tp_ctrl_create: No buffer space S> available S> Jan 5 16:10:21 mpd2 mpd: Incoming L2TP packet from 172.25.229.3 1701 S> Jan 5 16:10:21 mpd2 mpd: L2TP: ppp_l2tp_ctrl_create: No buffer space S> available S> Jan 5 16:10:23 mpd2 mpd: Incoming L2TP packet from 172.19.246.206 1701 S> Jan 5 16:10:23 mpd2 mpd: L2TP: ppp_l2tp_ctrl_create: No buffer space S> available S> S> S> Now i just returned to my original sysctl: S> net.graph.recvspace=40960 S> net.graph.maxdgram=40960 S> S> and everything seems fine S> S> any ideas? mpd has many open sockets, and each socket allocates that much recvspace and sendspace. Since there are a lot of them, it hits per-user resource limits, I suppose. We need to: 1) Change mpd to use one control socket with many hooks. This also requires improving ng_socket, to have a fast hook lookup method. 2) Implement SO_SNDBUF/SO_RCVBUF for AF_NETGRAPH socket, and utilize it in ngctl, so there would be no need to bump global tunables. Eventually I may do this, but I need brave testers, since my mpd installation is very small. -- Totus tuus, Glebius.