Re: Troubles with performances - Mailing list pgsql-general

From Lamar Owen
Subject Re: Troubles with performances
Date
Msg-id 3A675AC7.4D166BB9@wgcr.org
Whole thread Raw
In response to RE: Troubles with performances  (Warren Vanichuk <pyber@street-light.com>)
Responses Re: Troubles with performances
List pgsql-general
Warren Vanichuk wrote:
> IpcMemoryCreate: shmget failed (Invalid argument) key=5432001, size=143193088, permission=600

> -o -F -B 2048 -N 512 -S 4096

Ok, you have 2048 8K buffers, and up to 512 backends.  If you're trying
to set SortSize to 4096, you need quotes around it and a -o, AFAIK, asx
the -S postmaster option sets silent mode.

Further along,

According to the shmget man page:

       The  followings  are  limits  on  shared  memory   segment
       resources affecting a shmget call:

       SHMALL     System  wide  maximum  of  shared memory pages:
                  policy dependent.

       SHMMAX     Maximum size in bytes for a shared memory  seg­
                  ment:  implementation dependent (currently 4M).

       SHMMIN     Minimum size in bytes for a shared memory  seg­
                  ment:  implementation  dependent  (currently  1
                  byte, though PAGE_SIZE is the effective minimum
                  size).

       SHMMNI     System  wide  maximum  number  of shared memory
                  segments: implementation  dependent  (currently
                  4096).

       The implementation has no specific limits for the per pro­
       cess maximum number of shared memory segments (SHMSEG).

And from the linux kernel source, includes/asm-i386/shmparam.h:
/*
 * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
 * there is a static array of size SHMMNI.
 */
#define _SHM_ID_BITS    9
#define SHM_ID_MASK     ((1<<_SHM_ID_BITS)-1)

#define SHM_IDX_SHIFT   (_SHM_ID_BITS)
#define _SHM_IDX_BITS   15
#define SHM_IDX_MASK    ((1<<_SHM_IDX_BITS)-1)

/*
 * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
 * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
 */

#define SHMMAX 0x2000000                /* max shared seg size (bytes)
*/
/* Try not to change the default shipped SHMMAX - people rely on it */

-------

Hmmmm....

Looks pretty difficult to change.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

pgsql-general by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: Problem with starting my db with Postmaster
Next
From: "Oliver Elphick"
Date:
Subject: Re: Troubles with performances