Re: [HACKERS] postgresql.conf basic analysis tool

2006-07-15 Thread Josh Berkus
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


[HACKERS] postgresql.conf basic analysis tool

2006-07-13 Thread Andrew Hammond
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


Re: [HACKERS] postgresql.conf basic analysis tool

2006-07-13 Thread Dave Cramer

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


Re: [HACKERS] postgresql.conf basic analysis tool

2006-07-12 Thread Qingqing Zhou

Andrew Hammond [EMAIL PROTECTED] 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



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq