🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #81671

Re: INN's expire program and memory usage:

#81671
From: Russ Allbery
Date: Tue, 28 Jul 2009 01:44
46 lines
2948 bytes
"D. Stussy" <spam@bde-arc.ampr.org> writes:

> Can we do something about the memory usage, or is there a leak?  INN 2.5.0.
>
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
> newsserv   334    3.1 12.9 833880 131564 ?       Ds   Jul03 1124:23
> /var/lib/news/bin/innd
> newsserv 32433  4.7 62.5 703848 638188 ?       D    Jul27  12:31
> /var/lib/news/bin/expire
> newsserv  4388   0.0  0.1 109580  1492 ?         SN   00:17   0:00 - nnrpd:
> (reader tasks)
> ...etc.
>
> Memory image just for these two main programs is 1.466GB.  The machine only
> has 1GB of physical RAM (Obviously, some part of the programs aren't
> loaded).

I'm fairly sure the programs are entirely loaded into memory.  The numbers
reported by ps are essentially meaningless since they include
memory-mapped files.

In fact, we know for certain that the programs are entirely loaded in
memory because your system has no swap:

> # free -t
>              total       used       free     shared    buffers     cached
> Mem:       1019724     995528      24196          0       7704      62524
> -/+ buffers/cache:     925300      94424
> Swap:            0          0          0
> Total:     1019724     995528      24196

which is, incidentally, a poor configuration choice.  Give your system
some swap so that it can kick stuff out of memory that isn't currently
running.

Anyway, while it's possible this is a memory leak, it's probably just the
standard problem that our history backend makes space versus time
tradeoffs that involve memory mapping a very large index and hence
consuming quite a bit of mmap space.  It's not fixable without writing a
new history backend that makes different tradeoffs.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <873a8hh98m.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news2.euro.net!newsfeed.news2me.com!headwall.stanford.edu!news.stanford.edu!not-for-mail
References: <h4lj94$4c8$1@snarked.org>

Show Full Headers
Complete Article Headers
Message-ID: <873a8hh98m.fsf@windlord.stanford.edu>
Subject: Re: INN's expire program and memory usage:
Date: Mon, 27 Jul 2009 18:44:25 -0700
From: Russ Allbery <rra@stanford.edu>
References: <h4lj94$4c8$1@snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news2.euro.net!newsfeed.news2me.com!headwall.stanford.edu!news.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 46
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.stanford.edu 1248745465 22639 171.67.225.134 (28 Jul 2009
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)
Cancel-Lock: sha1:/y4oM/exMMZ7wSATv0urQKRIk7Q=