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

From Bruce Momjian
Subject Re: About these IPC parameters
Date
Msg-id 200007271834.OAA25872@candle.pha.pa.us
Whole thread Raw
In response to Re: About these IPC parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
The IPC killer is that different OS's have different methods for
changing kernel parameters, and some have different kernel parameter
names.

> 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
> 


--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: "Henry B. Hotz"
Date:
Subject: Re: Installation Report for powerpc-apple-netbsdelf1.5
Next
From: Bruce Momjian
Date:
Subject: Re: TODO updates