Re: Shared memory usage calculations - Mailing list pgsql-docs

From Tom Lane
Subject Re: Shared memory usage calculations
Date
Msg-id 17239.1255199978@sss.pgh.pa.us
Whole thread Raw
In response to Re: Shared memory usage calculations  (Thom Brown <thombrown@gmail.com>)
Responses Re: Shared memory usage calculations
List pgsql-docs
Thom Brown <thombrown@gmail.com> writes:
> 2009/10/10 Tom Lane <tgl@sss.pgh.pa.us>
>> Clearly wrong compared to what --- ie, what's the actual size of your
>> shared memory segment?  (See ipcs)

> I don't actually know the size of my shared memory segment.  "sysctl -a |
> grep -i shmseg" doesn't return anything as it hasn't been set, and not sure
> how to find out the default value.

There is no "default value", we are talking about the actual size of an
actual memory object.  Which you find out with ipcs, not sysctl.
For instance

$ ipcs -a

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00530201 3080195    tgl       600        37904384   4

------ Semaphore Arrays --------
key        semid      owner      perms      nsems
0x00530201 20873216   tgl       600        17
0x00530202 20905985   tgl       600        17
0x00530203 20938754   tgl       600        17
0x00530204 20971523   tgl       600        17
0x00530205 21004292   tgl       600        17
0x00530206 21037061   tgl       600        17
0x00530207 21069830   tgl       600        17

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages

(I'm running this postmaster as "tgl", not the more usual "postgres".
On some platforms you might need to be the postgres user or root to see
shared objects belonging to postgres.)

            regards, tom lane

pgsql-docs by date:

Previous
From: Thom Brown
Date:
Subject: Re: Shared memory usage calculations
Next
From: Thom Brown
Date:
Subject: Re: Shared memory usage calculations