From owner-freebsd-net@FreeBSD.ORG Tue Jun 24 15:40:21 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CB391FB for ; Tue, 24 Jun 2014 15:40:21 +0000 (UTC) Received: from mail-we0-x231.google.com (mail-we0-x231.google.com [IPv6:2a00:1450:400c:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D788D27BC for ; Tue, 24 Jun 2014 15:40:20 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id u56so576446wes.22 for ; Tue, 24 Jun 2014 08:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Sll2UzaL97CeN7f/wB94NdWa3+FJRdFv0uyH8NVO6p4=; b=SAQtjdU8tjLchrwiCpRVvf53d/4P2MQOehhYQ7fR0Pbu8xnNdEZbocW7aHOzmpT0ya 7GK0lV+13ptdnOoYKadV7hcP9AVRXofO4wF3TuotNIiNyJadQUKpGRDnaa0lokh+zOCE cwnh76Cw5rhE0D9FiqyRAVBUUkvpzHBtGJgGGDxZfAoO8JjrKxrhZnT2YS5C4SHrEsV+ JyzPBmTDYK+Hvb210qRN8sGo/rebId3zozdGun5EwQqQRB9zoe6Nk7xCwZyvSUCRdDHv cd0PNus+Hp201LX3uuV6DVLcBnODDy69ym3Aoedylgv3AqJG3T7XPMTjL+JDfu9R5O5x AMaA== MIME-Version: 1.0 X-Received: by 10.180.149.175 with SMTP id ub15mr3258567wib.53.1403624415605; Tue, 24 Jun 2014 08:40:15 -0700 (PDT) Sender: asomers@gmail.com Received: by 10.194.168.202 with HTTP; Tue, 24 Jun 2014 08:40:15 -0700 (PDT) In-Reply-To: <1403600001.74170.YahooMailNeo@web162506.mail.bf1.yahoo.com> References: <1403600001.74170.YahooMailNeo@web162506.mail.bf1.yahoo.com> Date: Tue, 24 Jun 2014 09:40:15 -0600 X-Google-Sender-Auth: cfYs_iQ8kXuaopTLrFBBKv9XorQ Message-ID: Subject: Re: [zone: Mbuf_cluster] kern.ipc.nmbclusters limit reached in Virtual machine causes downtime From: Alan Somers To: Stefan Stere Content-Type: multipart/mixed; boundary=001a11c38118b10b7204fc96c60f Cc: "freebsd-net@freebsd.org" , Alon Ronen X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 15:40:21 -0000 --001a11c38118b10b7204fc96c60f Content-Type: text/plain; charset=UTF-8 On Tue, Jun 24, 2014 at 2:53 AM, Stefan Stere wrote: > Hi, > > I have a vmware virtual server running FreeBSD 10.0 STABLE > The virtual server has 100mbps port. > > It is running a Tor router, consuming an average of 6-7 TB of monthly traffic. Its the only purpose of the server. > > Last night it went down, and vmware console log was saying: > [zone: Mbuf_cluster] kern.ipc.nmbclusters limit reached > > > I don't know what this means - the traffic of the server is unlimited and nothing is capped in any way. What can I do to fix this? I have read on freebsd wiki that I might need to add some lines to sysctl ? can you please confirm? Thank you in advance. This might be related to a problem that Alon Ronen discovered. The kernel can leak mbufs when experiencing memory pressure, if you're using SOCK_DGRAM or SOCK_SEQPACKET Unix domain sockets (or even SOCK_STREAM if sending ancillary data). You could try the attached patch that Alon and I are working on. Even if the patch doesn't fix your problem, it would be interesting to see the output of "vmstat -z". -Alan --001a11c38118b10b7204fc96c60f Content-Type: text/plain; charset=US-ASCII; name="uipc_send.diff" Content-Disposition: attachment; filename="uipc_send.diff" Content-Transfer-Encoding: base64 X-Attachment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