Unix Technical Forum

postgresql.conf basic analysis tool

This is a discussion on postgresql.conf basic analysis tool within the pgsql Hackers forums, part of the PostgreSQL category; --> Is there any interest in a basic perl script that would read through a postgresql.conf file and calculate approximate ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 03:23 AM
Andrew Hammond
 
Posts: n/a
Default postgresql.conf basic analysis tool

Is there any interest in a basic perl script that would read through a
postgresql.conf file and calculate approximate memory (and shared
memory) usage? Also, are there any other (simple for now) things I
should look at in the process? Asking because I'm getting annoyed with
doing this by hand so...

Drew

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 03:23 AM
Qingqing Zhou
 
Posts: n/a
Default Re: postgresql.conf basic analysis tool


"Andrew Hammond" <andrew.george.hammond@gmail.com> wrote
> Also, are there any other (simple for now) things I
> should look at in the process?
>


The shared memory estimiation logic is in
ipc/ipci.c/CreateSharedMemoryAndSemaphores(). If you want to get an accurate
number, you need to consider:
(1) different PostgreSQL versions;
(2) if EXEC_BACKEND is defined;
(3) other defines like BLCKSZ, NUM_SLRU_BUFFERS, etc.

So a better way IMHO is not to use perl script -- you have to reinvent the
shmem estimation logic. You can put the logic in a separate function in
backend and export it.

Regards,
Qingqing


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 03:24 AM
Dave Cramer
 
Posts: n/a
Default Re: postgresql.conf basic analysis tool

Andrew,

Josh did something like this and I wrote some java to do some of it.
It's in a project called pgconfigurator (I think)

dave
On 12-Jul-06, at 2:46 PM, Andrew Hammond wrote:

> Is there any interest in a basic perl script that would read through a
> postgresql.conf file and calculate approximate memory (and shared
> memory) usage? Also, are there any other (simple for now) things I
> should look at in the process? Asking because I'm getting annoyed with
> doing this by hand so...
>
> Drew
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>



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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-12-2008, 03:29 AM
Josh Berkus
 
Posts: n/a
Default Re: postgresql.conf basic analysis tool

Drew,

> Is there any interest in a basic perl script that would read through a
> postgresql.conf file and calculate approximate memory (and shared
> memory) usage? Also, are there any other (simple for now) things I
> should look at in the process? Asking because I'm getting annoyed with
> doing this by hand so...


I would really welcome your help with the Configurator project, which is
intended to do this (among other things).

--
Josh Berkus
PostgreSQL @ Sun
San Francisco

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:16 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com