From clamav-users-bounces@lists.clamav.net  Sat Jul 12 20:40:14 2008
Return-Path: <clamav-users-bounces@lists.clamav.net>
X-Original-To: list@tad.clamav.net
Delivered-To: list@tad.clamav.net
X-Virus-Scanned: Debian amavisd-new at tad.clamav.net
Received: from tad.clamav.net ([127.0.0.1])
	by localhost (tad.clamav.net [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id s1D0sdSrjkas; Sat, 12 Jul 2008 20:40:14 +0200 (CEST)
Received: from tad.clamav.net (localhost.localdomain [127.0.0.1])
	by tad.clamav.net (Postfix) with ESMTP id 7FFF616C0EB;
	Sat, 12 Jul 2008 20:40:10 +0200 (CEST)
X-Original-To: clamav-users@tad.clamav.net
Delivered-To: clamav-users@tad.clamav.net
X-Virus-Scanned: Debian amavisd-new at tad.clamav.net
Received: from tad.clamav.net ([127.0.0.1])
	by localhost (tad.clamav.net [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id LORpRgwMCg46 for <clamav-users@tad.clamav.net>;
	Sat, 12 Jul 2008 20:40:06 +0200 (CEST)
Received: from mail3.jubileegroup.co.uk (jubileegroup.co.uk [217.147.177.250])
	by tad.clamav.net (Postfix) with ESMTP id 10C0A16C041
	for <clamav-users@lists.clamav.net>;
	Sat, 12 Jul 2008 20:40:05 +0200 (CEST)
Received-SPF: pass (mail3.jubileegroup.co.uk: domain of ged@jubileegroup.co.uk
	designates 127.0.0.1 as permitted sender)
	receiver=mail3.jubileegroup.co.uk; client-ip=127.0.0.1;
	helo=mail3.jubileegroup.co.uk;
	envelope-from=ged@jubileegroup.co.uk;
	x-software=spfmilter 0.97 http://www.acme.com/software/spfmilter/ with
	libspf2-1.0.0; 
Received: from mail3.jubileegroup.co.uk (localhost [127.0.0.1])
	by mail3.jubileegroup.co.uk (8.13.8/8.13.8) with ESMTP id
	m6CIe3Rk015819
	for <clamav-users@lists.clamav.net>; Sat, 12 Jul 2008 19:40:03 +0100
X-Authentication-Warning: mail3.jubileegroup.co.uk: ged owned process doing -bs
Date: Sat, 12 Jul 2008 19:40:02 +0100 (BST)
From: "G.W. Haywood" <ged@jubileegroup.co.uk>
To: clamav-users@lists.clamav.net
In-Reply-To: <mailman.1.1215856805.27536.clamav-users@lists.clamav.net>
Message-ID: <Pine.LNX.4.58.0807121410470.12869@mail3.jubileegroup.co.uk>
References: <mailman.1.1215856805.27536.clamav-users@lists.clamav.net>
MIME-Version: 1.0
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6
	(mail3.jubileegroup.co.uk [0.0.0.0]);
	Sat, 12 Jul 2008 19:40:05 +0100 (BST)
X-Scanned-By: MIMEDefang 2.61 on 192.168.1.2
Subject: Re: [Clamav-users] 0.93.3 memory doubling problem
X-BeenThere: clamav-users@lists.clamav.net
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ClamAV users ML <clamav-users@lists.clamav.net>
List-Id: ClamAV users ML <clamav-users.lists.clamav.net>
List-Unsubscribe: <http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users>,
	<mailto:clamav-users-request@lists.clamav.net?subject=unsubscribe>
List-Post: <mailto:clamav-users@lists.clamav.net>
List-Help: <mailto:clamav-users-request@lists.clamav.net?subject=help>
List-Subscribe: <http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users>,
	<mailto:clamav-users-request@lists.clamav.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: clamav-users-bounces@lists.clamav.net
Errors-To: clamav-users-bounces@lists.clamav.net

Hi there,

On Fri, 11 Jul 2008 09:48:01 Russell Jones wrote:

> ... 0.93.3 on CentOS 5.2 64bit seems to have a memory doubling issue
> whenever the database is reloaded.
>
> On starting clamd, the ram usage is 70MB. But whenever it reloads ...
> .. the memory usage jumps to 131 megs and stays there. What is causing
> this, and how can I fix it?

I also see sudden large increases in memory consumption.

It isn't just CentOS because I run Linux, it isn't just 64-bit because
all my mailservers are 32 bit, and it isn't just ClamAV Version 0.93.3
because I haven't installed that one yet... :)

Sometimes people have seen this as a result of multiple copies of the
database being loaded.  That appears to have been a problem for quite
some time.  I think it's clamd which causes it by loading two database
copies into memory, so I don't think that looking at the sizes of the
databases on disc will help.

Here's a graph of the memory used by clamd on one of my servers:

http://www.jubileegroup.co.uk/JOS/misc/clamav-milter-0.9x.gif

The horizontal axis of the graph is number of five-minute intervals,
so the graph covers from early December 2007 until today.  The
discontinuities are restarts of clamd, usually after the compilation
of a new version.

   Date      ClamAV           approx x-axis pos. on graph

 8 Dec 2007   0.92                      0
14 Jan 2008   0.92 (recompiled)      8000
 6 Apr 2008   0.92 (restarted)      35000
14 May 2008   0.93                  46000
13 Jun 2008   0.93.1                54000

As you can see from the graph and the above installation record,
things do seem to have been getting better in fits and starts.
Versions 0.93 and 0.93.1 seemed to be give me the the best memory
usage for a long time, but on July 2, memory usage went from 104M
to almost 200M (and there it sits today).

2008/07/02 11:35:00 104
2008/07/02 11:39:59 145
...
2008/07/02 13:30:00 144
2008/07/02 13:35:01 155
2008/07/02 13:40:01 194
...
2008/07/12 13:35:01 197

This has been mentioned in the past, e.g. see the list archives

http://readlist.com/lists/lists.clamav.net/clamav-users/0/4976.html

mid-August last year.  It isn't a problem for me, as my machines have
plenty of memory, but it's definitely something that needs to be fixed.

--

73,
Ged.
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

