From owner-freebsd-hackers Mon Aug 28 8:25:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from biology.nmsu.edu (biology.NMSU.Edu [128.123.5.72]) by hub.freebsd.org (Postfix) with ESMTP id 90C8837B423 for ; Mon, 28 Aug 2000 08:25:23 -0700 (PDT) Received: (from brook@localhost) by biology.nmsu.edu (8.8.8/8.8.8) id JAA08118; Mon, 28 Aug 2000 09:24:00 -0600 (MDT) Date: Mon, 28 Aug 2000 09:24:00 -0600 (MDT) Message-Id: <200008281524.JAA08118@biology.nmsu.edu> X-Authentication-Warning: biology.nmsu.edu: brook set sender to brook@biology.nmsu.edu using -f From: Brook Milligan To: tgl@sss.pgh.pa.us Cc: scrappy@hub.org, freebsd-hackers@freebsd.org, pgsql-hackers@postgreSQL.org In-reply-to: <7481.967438652@sss.pgh.pa.us> (message from Tom Lane on Mon, 28 Aug 2000 00:57:32 -0400) Subject: Re: [HACKERS] Re: Too many open files (was Re: spinlock problems reported earlier) References: <7481.967438652@sss.pgh.pa.us> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The Hermit Hacker writes: > Okay, I just checked out Solaris 8/x86, and it confirms what HP/ux thinks: > _SC_OPEN_MAX OPEN_MAX Max open files per > process > I'm curious as to whether FreeBSD is the only one that doesn't follow this > "convention"? From part of the NetBSD manpage for sysconf(3): DESCRIPTION This interface is defined by IEEE Std1003.1-1988 (``POSIX''). A far more complete interface is available using sysctl(3). _SC_OPEN_MAX The maximum number of open files per user id. _SC_STREAM_MAX The minimum maximum number of streams that a process may have open at any one time. BUGS The value for _SC_STREAM_MAX is a minimum maximum, and required to be the same as ANSI C's FOPEN_MAX, so the returned value is a ridiculously small and misleading number. STANDARDS The sysconf() function conforms to IEEE Std1003.1-1990 (``POSIX''). HISTORY The sysconf function first appeared in 4.4BSD. This suggests that _SC_STREAM_MAX might be a better value to use. On one of my NetBSD boxes I have the following: _SC_OPEN_MAX: 64 _SC_STREAM_MAX: 20 In any case, if this really follows the POSIX standard, perhaps PostgreSQL code should assume these semantics and work around other cases that don't follow the standard (instead of work around the POSIX cases). Cheers, Brook To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message