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

Поиск
Список
Период
Сортировка
От Alfred Perlstein
Тема Re: Re: Too many open files (was Re: spinlock problems reported earlier)
Дата
Msg-id 20001223162416.V19572@fw.wintelcom.net
обсуждение исходный текст
Ответ на Re: Re: Too many open files (was Re: spinlock problems reported earlier)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
* Tom Lane <tgl@sss.pgh.pa.us> [001223 14:16] wrote:
> Department of Things that Fell Through the Cracks:
> 
> Back in August we had concluded that it is a bad idea to trust
> "sysconf(_SC_OPEN_MAX)" as an indicator of how many files each backend
> can safely open.  FreeBSD was reported to return 4136, and I have
> since noticed that LinuxPPC returns 1024.  Both of those are
> unreasonably large fractions of the actual kernel file table size.
> A few dozen backends opening hundreds of files apiece will fill the
> kernel file table on most Unix platforms.

getdtablesize(2) on BSD should tell you the per-process limit.
sysconf on FreeBSD shouldn't lie to you.

getdtablesize should take into account limits in place.

later versions of FreeBSD have a sysctl 'kern.openfiles' which
can be checked to see if the system is approaching the systemwide
limit.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


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

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