Re: Not a PG question: SCSI question

From: "John Clark L(dot) Naldoza" <njclark(at)ntsp(dot)nec(dot)co(dot)jp>
To: Jean-Arthur Silve <jeanarthur(at)eurovox(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Not a PG question: SCSI question
Date: 2001-05-16 00:44:16
Message-ID: 3B01CD60.7438D2BF@ntsp.nec.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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(at)ntsp(dot)nec(dot)co(dot)jp \ \

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lincoln Yeoh 2001-05-16 01:41:47 Re: index ops for _int4 and trees?
Previous Message Alex Pilosov 2001-05-16 00:42:22 Re: Re: index doesn't work for null?

Browse pgsql-hackers by date

  From Date Subject
Next Message Lincoln Yeoh 2001-05-16 01:41:47 Re: index ops for _int4 and trees?
Previous Message Nathan Myers 2001-05-15 22:42:06 Re: Configurable path to look up dynamic libraries