From owner-freebsd-current@freebsd.org Wed Sep 27 10:53:58 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E81E3E30BEF for ; Wed, 27 Sep 2017 10:53:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F1F46D3F4; Wed, 27 Sep 2017 10:53:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 34F552600FD; Wed, 27 Sep 2017 12:53:55 +0200 (CEST) Subject: Re: net/asterisk13: memory leak under 12-CURRENT? To: Guido Falsi , "O. Hartmann" Cc: "O. Hartmann" , freebsd-current References: <20170926144522.21e59cfe@freyja.zeit4.iv.bundesimmobilien.de> <979b6cfe-0e38-5df3-7bb5-cdb8de6677bf@FreeBSD.org> <20170926154155.28deb2e1@freyja.zeit4.iv.bundesimmobilien.de> From: Hans Petter Selasky Message-ID: <31faf367-69e2-b7e3-dd14-67bf69a67ec2@selasky.org> Date: Wed, 27 Sep 2017 12:51:18 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Sep 2017 10:53:59 -0000 On 09/27/17 09:05, Guido Falsi wrote: > On 09/26/2017 15:41, O. Hartmann wrote: >> On Tue, 26 Sep 2017 15:06:23 +0200 >> Guido Falsi wrote: > >> Since I run net/asterisk with automatic module loading (I'm new to asterisk), >> this is very likely and might cause the problem somehow. >> > > You can exclude single modules from autoloading via modules.conf. > >>> Not sure, restarting the daemon should free any leaked memory the daemon >>> has. If a killed process leaves memory locked at the system level there >>> should be some other cause. >> >> Even with no runnidng asterisk, memory level drops after the last shutdown of >> asterisk and keeps that low. Even for weeks! My router never shows that high >> memory consumption, even under load. > > But while asterisk is running does the memory usage increase unbounded > till filling all available memory or does it stabilize at some point? > > Asterisk is relatively memory hungry, especially with all modules > enabled. It also caches and logs various information in RAM, even doing > "nothing" it will cache and log that "nothing" activity. If memory does > stabilize after some point it's not really a leak but it's standard > memory usage. To reduce it you should disable all unused modules. > >> >> The question would be: how to use vmstat to give hints for those familiar with >> memory subsystems to indicate a real bug? >> >> I tried to find some advices, but maybe my English isn't good enough to make >> google help. > > I'm not able to give you a correct indication, but if the memory usage > is not increasing indefinitely but is stabilizing I'd say it's not > really a leak. > Did you look at the output from "vmstat -m" and "vmstat -z" ? --HPS