size of units in postgresql.conf

Started by Vincent Stoesselalmost 24 years ago11 messagesgeneral
Jump to latest
#1Vincent Stoessel
vincent@xaymaca.com

Hello,
Quick question: what is the unit of memory size used in postgresql.conf?
bytes? kilobytes?
Is the base unit consistent for every field ?
Thanks.
--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com

#2Neil Conway
neilc@samurai.com
In reply to: Vincent Stoessel (#1)
Re: size of units in postgresql.conf

On Wed, 29 May 2002 16:12:51 -0400
"Vincent Stoessel" <vincent@xaymaca.com> wrote:

Hello,
Quick question: what is the unit of memory size used in postgresql.conf?
bytes? kilobytes?
Is the base unit consistent for every field ?

No, it depends on the specific configuration directive. The
documentation describes what each variable controls and the unit
is is specified in:

http://developer.postgresql.org/docs/postgres/runtime-config.html

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

#3Vincent Stoessel
vincent@xaymaca.com
In reply to: Vincent Stoessel (#1)
Re: size of units in postgresql.conf

Why is it different for different directives?
It seems like it would make maintenance a lot easier if
we knew all the unit were bytes or kbytes by default.
Are human readable variables supported (ie 12M , 11K) ?
If not, can that be my feature request?
Thanks.

Neil Conway wrote:

On Wed, 29 May 2002 16:12:51 -0400
"Vincent Stoessel" <vincent@xaymaca.com> wrote:

Hello,
Quick question: what is the unit of memory size used in postgresql.conf?
bytes? kilobytes?
Is the base unit consistent for every field ?

No, it depends on the specific configuration directive. The
documentation describes what each variable controls and the unit
is is specified in:

http://developer.postgresql.org/docs/postgres/runtime-config.html

Cheers,

Neil

--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com

#4Curt Sampson
cjs@cynic.net
In reply to: Vincent Stoessel (#3)
Re: size of units in postgresql.conf

On Mon, 10 Jun 2002, Vincent Stoessel wrote:

Neil Conway wrote:

On Wed, 29 May 2002 16:12:51 -0400
"Vincent Stoessel" <vincent@xaymaca.com> wrote:

Quick question: what is the unit of memory size used in postgresql.conf?
bytes? kilobytes?
Is the base unit consistent for every field ?

No, it depends on the specific configuration directive.

Why is it different for different directives?

Some directives can be changed only in specific increments. For
example, buffers are always 8K, so specifying 68K of buffers can't
work; you'd need to specify 64K or 72K. It's a bit easier, perhaps,
and possibly less mistake-prone, just to say "7" or "8".

cjs
--
Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

#5Bruce Momjian
bruce@momjian.us
In reply to: Vincent Stoessel (#3)
Re: size of units in postgresql.conf

Here is the 7.3 postgresql.conf file, where I have added units to the
file.

---------------------------------------------------------------------------

Vincent Stoessel wrote:

Why is it different for different directives?
It seems like it would make maintenance a lot easier if
we knew all the unit were bytes or kbytes by default.
Are human readable variables supported (ie 12M , 11K) ?
If not, can that be my feature request?
Thanks.

Neil Conway wrote:

On Wed, 29 May 2002 16:12:51 -0400
"Vincent Stoessel" <vincent@xaymaca.com> wrote:

Hello,
Quick question: what is the unit of memory size used in postgresql.conf?
bytes? kilobytes?
Is the base unit consistent for every field ?

No, it depends on the specific configuration directive. The
documentation describes what each variable controls and the unit
is is specified in:

http://developer.postgresql.org/docs/postgres/runtime-config.html

Cheers,

Neil

--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/pg/backend/utils/misc/postgresql.conf.sampletext/plainDownload
#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#5)
Re: size of units in postgresql.conf

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Here is the 7.3 postgresql.conf file, where I have added units to the
file.

Aren't these misleading if one is using nonstandard BLCKSZ?

#shared_buffers = 64 # 2*max_connections, min 16, 8K each
#wal_buffers = 8 # min 4, 8K each
#effective_cache_size = 1000 # 8K each

These could usefully be labeled as "unit is cost of a sequential page
fetch":

#random_page_cost = 4
#cpu_tuple_cost = 0.01
#cpu_index_tuple_cost = 0.001
#cpu_operator_cost = 0.0025

regards, tom lane

#7Alvaro Herrera
alvherre@atentus.com
In reply to: Bruce Momjian (#5)
Re: size of units in postgresql.conf

En Mon, 26 Aug 2002 18:23:50 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us> escribi�:

Here is the 7.3 postgresql.conf file, where I have added units to the
file.

It'd be nice to detail the meaning of the FSM entries also...

--
Alvaro Herrera (<alvherre[a]atentus.com>)
Hi! I'm a .signature virus!
cp me into your .signature file to help me spread!

#8Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#6)
Re: size of units in postgresql.conf

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Here is the 7.3 postgresql.conf file, where I have added units to the
file.

Aren't these misleading if one is using nonstandard BLCKSZ?

Yep, I remembered it but forgot later. I added "typically" to the 8k
mention in all places.

#shared_buffers = 64 # 2*max_connections, min 16, 8K each
#wal_buffers = 8 # min 4, 8K each
#effective_cache_size = 1000 # 8K each

These could usefully be labeled as "unit is cost of a sequential page
fetch":

#random_page_cost = 4
#cpu_tuple_cost = 0.01
#cpu_index_tuple_cost = 0.001
#cpu_operator_cost = 0.0025

Nice, it is now:

#random_page_cost = 4 # units are one sequential page fetch cost
#cpu_tuple_cost = 0.01 # (same)
#cpu_index_tuple_cost = 0.001 # (same)
#cpu_operator_cost = 0.0025 # (same)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#9Bruce Momjian
bruce@momjian.us
In reply to: Alvaro Herrera (#7)
Re: size of units in postgresql.conf

Alvaro Herrera wrote:

En Mon, 26 Aug 2002 18:23:50 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us> escribi?:

Here is the 7.3 postgresql.conf file, where I have added units to the
file.

It'd be nice to detail the meaning of the FSM entries also...

Would someone explain the rough size of each entry. The meaning has to
be gotten from the documentation.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#10Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#9)
Re: size of units in postgresql.conf

Bruce Momjian <pgman@candle.pha.pa.us> writes:

It'd be nice to detail the meaning of the FSM entries also...

Would someone explain the rough size of each entry.

fsm_relations look to be about 40 bytes each (52 on a machine
where pointers are 8 bytes).

fsm_pages are ~6 bytes each.

regards, tom lane

#11Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#10)
Re: size of units in postgresql.conf

Thanks. Added.

---------------------------------------------------------------------------

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

It'd be nice to detail the meaning of the FSM entries also...

Would someone explain the rough size of each entry.

fsm_relations look to be about 40 bytes each (52 on a machine
where pointers are 8 bytes).

fsm_pages are ~6 bytes each.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073