Re: Re: Too many open files (was Re: spinlock problems reported earlier)

Поиск
Список
Период
Сортировка
От The Hermit Hacker
Тема Re: Re: Too many open files (was Re: spinlock problems reported earlier)
Дата
Msg-id Pine.BSF.4.21.0008281544490.564-100000@thelab.hub.org
обсуждение исходный текст
Ответ на Re: Re: Too many open files (was Re: spinlock problems reported earlier)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Re: Too many open files (was Re: spinlock problems reported earlier)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 28 Aug 2000, Tom Lane wrote:

> The Hermit Hacker <scrappy@hub.org> writes:
> >> cat t.c
> > #include <stdio.h>
> > #include <unistd.h>
> 
> > main()
> > {
> >   printf("%ld\n", sysconf(_SC_OPEN_MAX));
> > }
> 
> >> ./t
> > 4136
> 
> Yup, there's our problem.  Each backend will feel entitled to open up to
> about 4100 files, assuming it manages to hit that many distinct tables/
> indexes during its run.  You probably haven't got that many, but even
> several hundred files times a couple dozen backends would start pushing
> your (previous) kernel FD limit.
> 
> So, at least on FreeBSD, we can't trust sysconf(_SC_OPEN_MAX) to tell us
> the number we need.
> 
> An explicit parameter to the postmaster, setting the installation-wide
> open file count (with default maybe about 50 * MaxBackends) is starting
> to look like a good answer to me.  Comments?

Okay, if I understand correctly, this would just result in more I/O as far
as having to close off "unused files" once that 50 limit is reached?

Would it be installation-wide, or per-process?  Ie. if I have 100 as
maxbackends, and set it to 1000, could one backend suck up all 1000, or
would each max out at 10?  (note. I'm running with 192 backends right now,
and have actually pushed it to run 188 simultaneously *grin*) ...





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: Too many open files (was Re: spinlock problems reported earlier)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: Too many open files (was Re: spinlock problems reported earlier)