🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
6 messages
6 total messages Started by Karsten Thygesen Fri, 17 Aug 2001 06:02
expire problem on FreeBSD
#53814
Author: Karsten Thygesen
Date: Fri, 17 Aug 2001 06:02
43 lines
2029 bytes
Hi

I'm running INN-2.3.2 on FreeBSD-4.3-STABLE on a server with 3GB
memory and 4GB swap.

The expire process breaks with an error like:


su-2.05$ expire -v1
dbz.c:1283 Can't malloc 382418532 bytes: Cannot allocate memory

By monitoring the process, I can see, that it reaches more than 400Mb
memory before it tries to do this malloc.

I guess it's my datasize resourcelimit, which is hit:

su-2.05$ ulimit -a
core file size (blocks)     unlimited
data seg size (kbytes)      524288
file size (blocks)          unlimited
max locked memory (kbytes)  unlimited
max memory size (kbytes)    unlimited
open files                  4136
pipe size (512 bytes)       1
stack size (kbytes)         65536
cpu time (seconds)          unlimited
max user processes          2067
virtual memory (kbytes)     589824


According to /etc/login.conf, all limits is unlimitied, and I'm not
able to raise the limits as root either. The hardlimits is equal to
those above.

So - any suggestions on how to make expire use less memory or how to
raise the fixed datasize limit?

I'm getting desperate as I have not been able to expire for quite some
time now :-)

Karsten
Re: expire problem on FreeBSD
#53815
Author: Russ Allbery
Date: Fri, 17 Aug 2001 06:30
19 lines
1499 bytes
Karsten Thygesen <karthy@sonofon.dk> writes:

> I'm running INN-2.3.2 on FreeBSD-4.3-STABLE on a server with 3GB
> memory and 4GB swap.

> The expire process breaks with an error like:

> su-2.05$ expire -v1
> dbz.c:1283 Can't malloc 382418532 bytes: Cannot allocate memory

I'm guessing your history file is overflowing badly.  What's the contents
of db/history.dir?

-- 
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.
Re: expire problem on FreeBSD
#53816
Author: Karsten Thygesen
Date: Fri, 17 Aug 2001 07:21
41 lines
2520 bytes
Russ Allbery <rra@stanford.edu> writes:

> Karsten Thygesen <karthy@sonofon.dk> writes:
> 
> > I'm running INN-2.3.2 on FreeBSD-4.3-STABLE on a server with 3GB
> > memory and 4GB swap.
> 
> > The expire process breaks with an error like:
> 
> > su-2.05$ expire -v1
> > dbz.c:1283 Can't malloc 382418532 bytes: Cannot allocate memory
> 
> I'm guessing your history file is overflowing badly.  What's the contents
> of db/history.dir?

It's:

abnew01# ls -lL db
total 4578195
-rw-rw-r--  1 news  news          30 Aug 17 05:39 .news.daily
-rw-rw-r--  1 news  news     1018667 Aug 17 09:22 active
-rw-rw-r--  1 news  news     1018625 Aug 15 18:32 active.old
-rw-r--r--  1 news  news      492219 Aug 15 18:32 active.times
-rw-r-----  1 news  news     2408456 Aug 17 09:22 group.index
-rw-rw-r--  1 news  news  3621744162 Aug 17 09:22 history
-rw-rw-r--  1 news  news         120 Aug 17 09:22 history.dir
-rw-rw-r--  1 news  news   452835240 Aug 17 09:22 history.hash
-rw-rw-r--  1 news  news   603780320 Aug 17 09:22 history.index
-rw-rw-r--  1 news  news           0 Aug 17 07:53 history.n
-rw-rw-r--  1 news  news         113 Aug 17 07:53 history.n.dir
-rw-rw-r--  1 news  news           0 Aug 17 07:53 history.n.hash
-rw-rw-r--  1 news  news           0 Aug 17 07:53 history.n.index
-rw-r--r--  1 news  news     2377353 Aug 15 10:45 newsgroups
abnew01# cat db/history.dir 
dbz 6 37736283 14 66
42568069 25157522 24296029 23876066 23416430 23009932 22556503 22331509 21956184 21320213 21069163
abnew01# ./bin/inndf -n
47423668 overview data stored

Karsten
Re: expire problem on FreeBSD
#53818
Author: Russ Allbery
Date: Fri, 17 Aug 2001 08:09
34 lines
2408 bytes
Karsten Thygesen <karthy@sonofon.dk> writes:
> Russ Allbery <rra@stanford.edu> writes:

>> I'm guessing your history file is overflowing badly.  What's the
>> contents of db/history.dir?

> It's:

> -rw-rw-r--  1 news  news  3621744162 Aug 17 09:22 history
> -rw-rw-r--  1 news  news         120 Aug 17 09:22 history.dir
> -rw-rw-r--  1 news  news   452835240 Aug 17 09:22 history.hash
> -rw-rw-r--  1 news  news   603780320 Aug 17 09:22 history.index

> abnew01# cat db/history.dir 
> dbz 6 37736283 14 66
> 42568069 25157522 24296029 23876066 23416430 23009932 22556503 22331509 21956184 21320213 21069163

Hm.  No, that's just incredibly huge.  I'm not sure *what* to do about
that.  expire wants to build the index file in memory.  I suppose one
thing you could do is instead have expire build the index memory-mapped,
which will take considerably longer but shouldn't run out of memory
(assuming the data limit doesn't also apply to memory-mapped files...).

Unfortunately, this requires code changes.  Edit inn/expire/expire.c and
change opt.pag_incore to INCORE_MMAP on about line 939 and recompile
expire and see if that will give you an expire that can run given the
memory limits.

-- 
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.
Re: expire problem on FreeBSD
#53819
Author: Karsten Thygesen
Date: Fri, 17 Aug 2001 08:15
47 lines
2880 bytes
Russ Allbery <rra@stanford.edu> writes:

> Karsten Thygesen <karthy@sonofon.dk> writes:
> > Russ Allbery <rra@stanford.edu> writes:
> 
> >> I'm guessing your history file is overflowing badly.  What's the
> >> contents of db/history.dir?
> 
> > It's:
> 
> > -rw-rw-r--  1 news  news  3621744162 Aug 17 09:22 history
> > -rw-rw-r--  1 news  news         120 Aug 17 09:22 history.dir
> > -rw-rw-r--  1 news  news   452835240 Aug 17 09:22 history.hash
> > -rw-rw-r--  1 news  news   603780320 Aug 17 09:22 history.index
> 
> > abnew01# cat db/history.dir 
> > dbz 6 37736283 14 66
> > 42568069 25157522 24296029 23876066 23416430 23009932 22556503 22331509 21956184 21320213 21069163
> 
> Hm.  No, that's just incredibly huge.  I'm not sure *what* to do about
> that.  expire wants to build the index file in memory.  I suppose one
> thing you could do is instead have expire build the index memory-mapped,
> which will take considerably longer but shouldn't run out of memory
> (assuming the data limit doesn't also apply to memory-mapped files...).
> 
> Unfortunately, this requires code changes.  Edit inn/expire/expire.c and
> change opt.pag_incore to INCORE_MMAP on about line 939 and recompile
> expire and see if that will give you an expire that can run given the
> memory limits.

I think I have found another solution - I finally discovered, that I
can increase the fixed max datasegment size by modifying 

options         MAXDSIZ="(1024*1024*1024)"
options         DFLDSIZ="(512*1024*1024)"

in the kernel config file (FreeBSD-4.3-STABLE)

So now I have increased the size to 1Gb and expire seems to run - at
least, it's rebuilding the history file right now. If that works, then
I will just leave it like that (and keep on monitor the process) -
otherwise, I will try your solution...

Thanks for the suggestion, Russ!

Karsten
Re: expire problem on FreeBSD
#53820
Author: Karsten Thygesen
Date: Fri, 17 Aug 2001 08:28
17 lines
1631 bytes
Karsten Thygesen <karthy@sonofon.dk> writes:

> So now I have increased the size to 1Gb and expire seems to run - at
> least, it's rebuilding the history file right now. If that works, then
> I will just leave it like that (and keep on monitor the process) -
> otherwise, I will try your solution...

Yes - expire did run just fine. The new history.dir file contains:

abnew01% cat history.dir 
dbz 6 63895299 14 66
33801582 42596866 25157522 24296029 23876066 23416430 23009932 22556503 22331509 21956184 21320213

Still huge, but it's a pretty big server anyway (1.8TB spool)

Karsten
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads