Re: [GENERAL] Increasing the shared memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In response to "Sorin N. Ciolofan" <ciolofan@xxxxxxxxxxxx>:
> 
>             I've a value of 1000 set for shared_buffers, does this means
> that I use 8kbX1000=8Mb of Shared Mem?
> 
>             
> 
> The definition from the manual is quite confusing:
> 
>  
> 
> shared_buffers (integer) 
> 
> Sets the amount of memory the database server uses for shared memory
> buffers. The default is typically 32 megabytes (32MB), but may be less if
> your kernel settings will not support it (as determined during initdb). This
> setting must be at least 128 kilobytes and at least 16 kilobytes times
> max_connections
> <http://www.postgresql.org/docs/current/static/runtime-config-connection.htm
> l#GUC-MAX-CONNECTIONS> . 
> 
>  
> 
> What does the integer number represent? Number of shared buffers? If yes,
> what size does each shared buffer have?
> 
> "The default is typically 32 megabytes" suggests that this integer could
> also represent the number of megabytes?!?
> 
> In the postgresql.conf file is an ambiguous comment that could induce the
> idea that each shared buffer has 8 kb.
> 
> So, which is the meaning of this integer?

Older versions of PostgreSQL, the number was the _number_ of shared buffers.
Each buffer is typically 8K, but this can be altered at compile time (I
believe) and the PGDG has no way to know for sure if whatever packaged version
you installed might have done so.

However, on more recent versions of Postgres (although I don't know exactly
what version first included this) you can specify this value as "M" or "G"
to specify a number of megabytes or gigabytes.  Internally, this is still
converted to a number of 8K buffers, but it makes the config file easier to
read and understand.

-- 
Bill Moran
http://www.potentialtech.com


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux