Re: About these IPC parameters

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: About these IPC parameters
Date: 2000-07-21 18:59:26
Message-ID: 23639.964205966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-07-21 19:15:27 Re: Vaccuum allows read access?
Previous Message Bruce Momjian 2000-07-21 18:58:01 Re: Vaccuum allows read access?