Re: Not a PG question: SCSI question - Mailing list pgsql-general

From Per-Olof Pettersson
Subject Re: Not a PG question: SCSI question
Date
Msg-id 20010516.3404039@mis.configured.host
Whole thread Raw
In response to Re: Not a PG question: SCSI question  ("John Clark L. Naldoza" <njclark@ntsp.nec.co.jp>)
Responses Re: Re: Not a PG question: SCSI question  (GH <grasshacker@over-yonder.net>)
List pgsql-general
Hi

Just a little miss I think John did.
With PHP you dont have to start a new connection everytime.
You can use the good ole pg_pconnect. It is a persistant connection to
the server.
The server keeps a pool of connections open for fast access.

There has been some problems with this so I recommend PHP 4.0.5.
It is, among other things, a matter of issuing a rollback at the end of
the request on each page.

Best regards
Per-Olof Pettersson

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 2001-05-16, 03:06:36, njclark@ntsp.nec.co.jp ("John Clark L. Naldoza")
wrote regarding Re: Not a PG question: SCSI question:


> Hi,


> Let me get this straight...;-)

> The IDE server is running Linux 2.0.36 with PHP and Apache.

> The SCSI server is running with PostgreSQL 7.0.3 ??

> And you're talking about speed in inserts?

> Try to use a kernel after 2.2.16 or the current 2.4.4 series, they
> handle memory management rather well..   You should also optimize your
> kernel depending upon your system's needs... like increasing the total
> number of process, the amount of memory one application can use..  The
> maximum number of files.. etc...  Most of these are runtime tweaks found
> at the /proc/sys directory...;-)

> On the PostgreSQL side, you also need to optimize it a little bit...
> Kindly read the fine manual for this...;-)

> Apache and PHP...  well, here's a sort of bottleneck in itself...  You
> may need to increase your PHP (PHP4) scripts performance via Zend's
> Cache, Zend Optimizer, APC, and/or the PHP Smarty Template...

> You can also further increase performance if you have all your compiled
> PHP scripts under a RAM Disk System...;-)

> But one of the greatest bottlenecks that may not be so obvious...  Is a
> rather simple one...;-)  Each time you try to do an insert to your
> PostgreSQL database from your PHP application, you have to initialize a
> new connection...;-)

> I don't know how you accessed your server...  Via psql?  or from an
> application...;-)  And how did you do you INSERTS?  Did you use
> Transactions?  Did you enable -F so that PostgreSQL doesn't write to
> your HDD often???

> Cheers,


> John Clark

> Jean-Arthur Silve wrote:
> >
> > Hi !
> >
> > I have 2 servers running apache, php and PG 7.0.3 running under Linux
> >
> > The first one uses IDE disks, and everything run fine and fast. (uses
linux
> > 2.0.36)
> >
> > The second one uses SCSI drives with a Adaptec adapter. (uses Linux
2.2.14)
> >
> > My problem is that acces to the DB on this server are very very slow (I
> > guess that it s particulary slow when i do INSERTs)
> > It s so slow that even the keyboard and the display slow down ! The HD
> > write or read a lot...
> > When I do a "ps" or "top", I don't see any process taking all the
ressources...
> >
> > So, I guess there is something whith the SCSI...
> >
> > Is anybody has a clue ??
> >
> > thanks !
> >
> > jean-arthur
> > PS : I did a vacuum analyze, and the table are not so big (max tuples are
> > 5000 )
> >

> --
>      /) John Clark Naldoza y Lopez                           (\
>     / )    Software Design Engineer II                       ( \
>   _( (_    _  Web-Application Development                    _) )_
>  (((\ \>  /_>    Cable Modem Network Management System <_\  </ /)))
>  (\\\\ \_/ /         NEC Telecom Software Phils., Inc.  \ \_/ ////)
>   \       /                                              \       /
>    \    _/  phone: (+63 32) 233-9142 loc. 3112            \_    /
>    /   /  cellphone: (+63 919) 399-4742                     \   \
>   /   / email: njclark@ntsp.nec.co.jp                        \   \

> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

pgsql-general by date:

Previous
From: Scott Holmes
Date:
Subject: I need a jump start
Next
From: Alex Hochberger
Date:
Subject: SQL help...