Re: Calculation of a shared memory - Mailing list pgsql-hackers

From Hiroshi Saito
Subject Re: Calculation of a shared memory
Date
Msg-id 0b0b01c81cee$ff698a00$c601a8c0@HP22720319231
Whole thread Raw
In response to Calculation of a shared memory  ("Hiroshi Saito" <z-saito@guitar.ocn.ne.jp>)
Responses Re: Calculation of a shared memory
List pgsql-hackers
Hi.

From: "Tom Lane" <tgl@sss.pgh.pa.us>


> "Hiroshi Saito" <z-saito@guitar.ocn.ne.jp> writes:
>> inet% ipcs -b -m
>> Shared Memory:
>> T           ID          KEY MODE        OWNER    GROUP           SEGSZ
>> m       917504      5432001 --rw-------    saito    wheel     32571392
> 
>> 40*(400+270*64)=  707200
>>  5*(600+270*64)=   89400
>>            28MB= 29360128
>>            64kB=   65536
>>         1000*70=   70000
>>        179200*6= 1075200
> 
>> Total  :31367464
>> ipcs-m:32571392
>>       -1203928 (difference is large: why?)
> 
> Hmm, those numbers never got updated for 8.2.  The per-backend
> multiplier is particularly off, since it's not accounting for
> the in-memory pg_stat_activity array (PgBackendStatus is 1208
> bytes on my machine...)  Also, you neglected to add the fixed space,
> which was claimed to be 500K as of 8.1, but seems to have bloated
> to about 700K in 8.2 and 770K in HEAD.

Sent: Friday, November 02, 2007 4:11 AM
Subject: [COMMITTERS] pgsql: Update shared-memory-size info for 8.2 branch.

Great, taken into consideration.

40*(1800+270*64)=  763200 5*(700+270*64)=   89900           28MB=29360128           64kB=   65536        1000*70=
70000      179200*6= 1075200          700kB=  716800
 

Total  :32140764
ipcs-m:32571392      -430628

I think it is a permissible range. Thanks!

Regards,
Hiroshi Saito




pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Close previously open holes for invalidly encoded data to enter
Next
From: Tom Lane
Date:
Subject: Re: Calculation of a shared memory