INN expire problems

Bill Davidsen davidsen at tmr.com
Wed Sep 8 17:30:48 UTC 2004


Heiner Lante wrote:
> Hello,
> 
> I have a problem during expire sometimes. When the expire starts INN stops 
> working and some error messages can be found in the log files:
> 
> Syslog critical messages:
> Sep 6 01:00:02 news innd: SERVER can't open history 
> /usr/local/news/db/history: Cannot allocate memory
> ---------
> Error log:
> innd: dbz: getcore: mmap failed: Cannot allocate memory
> innd: openhashtable: getcore failure: Cannot allocate memory
> innd: can't dbzinit /usr/local/news/db/history Cannot allocate memory
> innd: dbzclose: not opened!
> innd: can't dbzclose /usr/local/news/db/history Cannot allocate memory
> innd: SERVER can't open history /usr/local/news/db/history: Cannot allocate 
> memory
> 
> Any idea what to do?
> 
> The server has 4 Gbyte of memory and has 4 Tbyte of disks.
> 
> top - 11:20:39 up 12 days, 20:01,  2 users,  load average: 1.19, 1.12, 1.17
> Tasks: 120 total,   1 running, 119 sleeping,   0 stopped,   0 zombie
> Cpu(s):  3.8% us, 15.8% sy,  0.0% ni, 47.1% id, 29.5% wa,  0.3% hi,  3.5% si
> Mem:   3894056k total,  3880200k used,    13856k free,    13136k buffers
> Swap:  5245212k total,    27584k used,  5217628k free,  3655076k cached
> 
> /news/overview/overview 108120440 Kbytes available (76.6%)
> /news/vol2/articles 1816896 Kbytes available (1.3%)
> /usr/local/news/db 108120440 Kbytes available (76.6%)

The "Cannot allocate memory" seems a clear indication that the sum of 
RAM and swap isn't enough for the execution of the program(s) you are 
trying to run. Perhaps the "free" or similar command will give you 
insight, but that's often the problem. You may also see huge swapping 
rates with vmstat, also caused by unrealistic memory usage.

The expire program is the worst memory hog I have ever seen, and may be 
the single limiting factor in scaling INN. Unless you can use huge 
physical memory it is just going to run forever, and there seems no 
workaround. The idea of putting everything in memory to make it fast 
eliminated the need to do complex design, or use a database for history 
and remove entries as the articles become unavailable, but it resulted 
in huge memory requirements.

You can look at the tagged hash feature, which makes the requirements 
for memory much smaller. I haven't used it in a while, and it may 
require a full rebuild from source and rebuild of the database with 
makehistory.

-- 
    -bill davidsen (davidsen at tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me


More information about the inn-workers mailing list