Re: About these IPC parameters - Mailing list pgsql-hackers

From Tom Lane
Subject Re: About these IPC parameters
Date
Msg-id 23639.964205966@sss.pgh.pa.us
Whole thread Raw
In response to Re: About these IPC parameters  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: About these IPC parameters  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> Other than shooting yourself in the foot by having SEMA or SHMEM be
>> 0 (OFF), it looks like the parameters that could need raising on this
>> platform would be SEMMAP, SEMMNI, SEMMNS, SHMMAX.

> Can you give me a couple of lines on how to change them (e.g., edit some
> file and reboot) and perhaps a comment whether some of these tend to be
> too low in the default configuration?

On HPUX the usual advice is "use SAM" (System Administration Manager).
It's a pretty decent point-and-drool tool.  You go into Kernel
Configuration / Configurable Parameters and double-click on the items
you don't like in the resulting list.  When you're done, hit Create
A New Kernel.  SAM used to have some memorable deficiencies (I still
recall that when I first used it, if you let it create a user's home
directory it would leave /users world-writable...) but it seems reliable
enough in HPUX 10.

If I've found the right file to look at, the factory defaults are

semmni              64          Number of Semaphore Identifiers       
semmns              128         Max Number of Semaphores           
shmmax              0x4000000   Max Shared Mem Segment (bytes) 
shmmni              200         Number of Shared Memory Identifiers 
shmseg              120         Shared Memory Segments per Process 

so you'd need to raise these to run a big installation (more than,
say, 100 backends) but not for a default-sized setup.

What I tend to want to raise are not the IPC parameters but

maxdsiz         0x04000000     Max Data Segment Size (bytes)        
maxssiz         0x00800000     Max Stack Segment Size (bytes)    
maxfiles        60             Soft File Limit per Process           
maxfiles_lim    1024           Hard File Limit per Process           
maxuprc         75             Max Number of User Processes (per user)
maxusers        32             Value of MAXUSERS macro
nfile           (16*(NPROC+16+MAXUSERS)/10+32+2*(NPTY+NSTRPTY))         Max Number of Open Files
ninode          ((NPROC+16+MAXUSERS)+32+(2*NPTY)+(10*NUM_CLIENTS))      Max Number of Open Inodes

In particular, the default maxuprc would definitely be a problem for
running a lot of backends, and you'd likely start running into nfile
or ninode limits too.
        regards, tom lane


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: Vaccuum allows read access?
Next
From: Tom Lane
Date:
Subject: Re: Vaccuum allows read access?