Subject: Re: kernel options
To: webmaster@datazap.net <webmaster@datazap.net>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: netbsd-help
Date: 04/25/2002 11:49:55
webmaster@datazap.net writes:
> You many be right, I have no problem mmap() one large file, it is just
> when I try to mapp() a large number of small files that I have the
> problem. Why would this happen?

There is both a per-process file limit and a system-wide limit. 

    $ ulimit -a

    core file size (blocks)     0
    data seg size (kbytes)      131072
    file size (blocks)          unlimited
    max locked memory (kbytes)  254757
    max memory size (kbytes)    764272
    open files                  64
    pipe size (512 bytes)       1
    stack size (kbytes)         4336
    cpu time (seconds)          unlimited
    max user processes          160
    virtual memory (kbytes)     135408

    $ sysctl -a
    ...
    kern.maxfiles = 1772
    ...

You might need to either raise the user limit, or gdb thttpd and see
why it is trying to keep so many files open at once.  It makes no
sense for thttpd to try to keep too many files open.

-wolfgang
-- 
Wolfgang Rupprecht    <wolfgang@wsrcc.com>     http://www.wsrcc.com/wolfgang/
Coming soon: GPS mapping tools for Open Systems. http://www.gnomad-mapping.com/