Thread: [Re] Need help with postgresql/apache/php optimisation

[Re] Need help with postgresql/apache/php optimisation

From
"Froggy / Froggy Corp."
Date:
First thx for your quick answer :)

iostat dont return bad load average. I never grow up to 1Mb/s and the
IDE drive can go faster.

I really can't change the server, its a locative server which i own
(only me on the server, no cooperative, but i dont have physically
access to it). So the configuration is ... not the best :). And at this
time, i dont have money for server-hosting.

My personnal computer is better than my server, but cant do nothing :/

There is a lot of SELECT and very few UPDATE/INSERT, so fsync will not
really increase performance (or im in wrong about fsync).

Regards,

"scott.marlowe" wrote:
>
> On Wed, 18 Feb 2004, Froggy / Froggy Corp. wrote:
>
> >       The problem is that on "fire time", the load go to > 1 and stay long
> > time. But with top (i use top -d 1 to have "real" load average) i can
> > see that the CPU is more than 50% idling.
> >
> > For exemple, i have this kind of stat :
> >
> > 0s - load 1.5 - cpu idling 0%
> > 5s - load 1.6 - cpu ilding 50%
> > 6s -> 60s - load around 1.2 - cpu idling around 50%-100%
>
> sounds to me like you're starving for bandwidth on your I/O subsystem.
> any chance you can get a faster set of drives under it or go with a SCSI
> RAID controller with battery backed cache?
>
> also, turning off fsync may increase speed at the cost of data security in
> the event of a kernel crash or power failure.
>
> Are you doing a lot of writing or mostly just reading?  If mostly reading,
> then you might do well with more memory in the machine.  256 meg is kinda
> puny.  You'd do better with my old PIII750 machine that had 1.5 gig in it
> than a celeron with only 256 meg, no matter how fast the celeron.

Re: [Re] Need help with postgresql/apache/php optimisation

From
"scott.marlowe"
Date:
On Wed, 18 Feb 2004, Froggy / Froggy Corp. wrote:

> First thx for your quick answer :)
>
> iostat dont return bad load average. I never grow up to 1Mb/s and the
> IDE drive can go faster.

Well, that's for a sequential read.  It's likely your heads are racing all
over the drive to get the data they need, so don't expect 15 megs a second
on a drive with the heads moving around a bunch.

> I really can't change the server, its a locative server which i own
> (only me on the server, no cooperative, but i dont have physically
> access to it). So the configuration is ... not the best :). And at this
> time, i dont have money for server-hosting.

If you could just get them to add some more memory you'd probably be ok.
256 meg would be ok if it was nothing but a pgsql server, but having to
host apache and whatever else it's really slim pickins.

Plus if you could get another IDE drive put in and mirror the first one it
might help, especially for parallel access.

> My personnal computer is better than my server, but cant do nothing :/

Heh, that was true for me for almost a year last year...  I feel your
pain.

> There is a lot of SELECT and very few UPDATE/INSERT, so fsync will not
> really increase performance (or im in wrong about fsync).

Nope, you're right.


Re: [Re] Need help with postgresql/apache/php optimisation

From
Richard Huxton
Date:
On Wednesday 18 February 2004 21:53, scott.marlowe wrote:
>
> If you could just get them to add some more memory you'd probably be ok.
> 256 meg would be ok if it was nothing but a pgsql server, but having to
> host apache and whatever else it's really slim pickins.
>
> Plus if you could get another IDE drive put in and mirror the first one it
> might help, especially for parallel access.

You're all spoilt - why when I was a lad we had 1 floppy disk between 12 of
us, and we were happy...

Seriously though Scott, he's only handling 3000 hits per day, with a target of
5000. I'm not saying it's a speed machine, but we should be good for that in
256MB.

--
  Richard Huxton
  Archonet Ltd

Re: [Re] Need help with postgresql/apache/php optimisation

From
"scott.marlowe"
Date:
On Wed, 18 Feb 2004, Richard Huxton wrote:

> On Wednesday 18 February 2004 21:53, scott.marlowe wrote:
> >
> > If you could just get them to add some more memory you'd probably be ok.
> > 256 meg would be ok if it was nothing but a pgsql server, but having to
> > host apache and whatever else it's really slim pickins.
> >
> > Plus if you could get another IDE drive put in and mirror the first one it
> > might help, especially for parallel access.
>
> You're all spoilt - why when I was a lad we had 1 floppy disk between 12 of
> us, and we were happy...
>
> Seriously though Scott, he's only handling 3000 hits per day, with a target of
> 5000. I'm not saying it's a speed machine, but we should be good for that in
> 256MB.

Oh my god, I just saw that.  I thought it was like 5000 an hour or maybe a
minute.

I am spoilt.  our newest server, which is a LAPP server, can do something
like 1,000,000 transactions an hour under pgbench, and it's not heavily
tuned, and is running 7.2.4.

I wonder how complex the queries must be to be that slow...