Re: MacOS X Shared Buffers (SHMMAX)?

From: "Command Prompt, Inc(dot)" <pgsql-general(at)commandprompt(dot)com>
To: Steve Lane <slane(at)fmpro(dot)com>
Cc: <jlx(at)commandprompt(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: MacOS X Shared Buffers (SHMMAX)?
Date: 2002-05-22 17:30:00
Message-ID: Pine.LNX.4.30.0205220939590.14696-100000@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On Mon, 20 May 2002, Steve Lane wrote:
>Actually --- :-> I'm no expert on this topic, but Darwin is BSD and I do
>recall a post on this very topic, to the effect that the poster believed
>some flavors of BSD, possibly MOSX included, do require rebuilding the
>kernel to change this value.
>
>As a MOSX user I'd certainly love to be found wrong.

Well, after doing some digging in the OS X Darwin Developer archives, it
definitely appears that at this stage in Darwin's design it DOES require a
re-build of the Kernel -- thanks to those of you who pointed me in that
direction. ;)

Fortunately it's a fairly painless process I've found; you just need to
sign up with the Apple Open Source site, and you have instant CVS access.

I was able to pull down the source for the Kernel, and increased the
SHMMAX by a factor of 16. Upgraded to the new Kernel and I am now able to
get safely 512 connections, even up around 900, but bumping it up to 1024,
I run into the following error:

PGSTATBUFF: recvfrom(2): Resource temporarily unavailable
DEBUG: statistics collector process (pid 1988) exited with exit code 1

...which then repeats itself infinitely until the calling process is
stopped. ;)

I've upped the limit on the number of open files with ulimit, but I was
wondering if anyone knows what specifically invokes this "resource
temporarily unavailable" message from PGSTATBUFF? I don't see it in the
source casually grepping around, so is it I take it the result of the
recvfrom() function?

[...actually, a minute later of looking at the source...]

Okay, so it appears to be when it's checking sockets for data in
src/backend/postmaster/pgstat.c, line 1579...I just tried re-building the
kernel with a higher value for kern.ipc.maxsockets but that didn't have
any effect, still get that error.

Anyone have any ideas on what specifically would cause this part of pgstat
to fail?

Best regards,
Jw.
--
jlx(at)commandprompt(dot)com
by way of pgsql-general(at)commandprompt(dot)com
http://www.postgresql.info/
http://www.commandprompt.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Eckermann 2002-05-22 17:33:39 Re: Question about numeric
Previous Message Gregory Seidman 2002-05-22 17:24:55 ODBC and JDBC

Browse pgsql-sql by date

  From Date Subject
Next Message Command Prompt, Inc. 2002-05-22 18:57:43 Re: MacOS X Shared Buffers (SHMMAX)?
Previous Message Christoph Haller 2002-05-22 17:25:50 Speeding up SELECT MAX(),... GROUP BY ... ?