Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2001 23:25:07 -0400
From:      "Haapanen, Tom" <tomh@metrics.com>
To:        "'Sean Chittenden'" <sean@chittenden.org>
Cc:        Marcel Prisi <marcel-lists@virtua.ch>, Scott Gerhardt <scott@gerhardt-it.com>, freebsd-isp@FreeBSD.ORG
Subject:   RE: PostgreSQL & shared memory
Message-ID:  <6B3C6B6F7AA2D511A35E0080C8699343597B@syncro.metrics.com>

next in thread | raw e-mail | index | archive | help
Sean Chittenden wrote:
> Ack!  Okay, real quick: this isn't a PostgreSQL problem.  It's a RAM
> management problem.  Follow this through and hopefully everyone will 
> realize that making PostgreSQL go faster isn't going to buy anyone as 
> much performance/ram savings as a reverse proxy server.
> 
> A) Apache + mod_perl + mod_php4 = ~12-25MB processes
> B) Apache + mod_backhand = ~500KB (300KB shared!)
> [...]
> 	When you say this box is loaded, are we talking .5M hits?  
> That's not too much for a box of this caliper if the architecture is
> done right.  If you're pushing 5-6M over a single system.. then you're
> getting a tad gutsy and I'd think about getting another box, but I doubt
> that's the case and you'd probably be having disk IO issues before you
> had CPU or RAM issues (logging and DB at the same time don't play
> friendly).

Our Apache/Apache::ASP/DBI/MySQL web server handles about 7M hits in a
typical month, and some fairly heavy database traffic.  We split onto two
systems: a web server (everything but MySQL) and a database server (MySQL
only)
- Web server: Alpha 164SX/533, 320 MB, NetBSD 1.4
- Database server: P3/700, 512 MB, FreeBSD 4.3

We haven't been clever about doing network buffering, but the web server
does quite nicely, in spite of the 10 MB httpd processes.  Only if the
database server is not reachable does it start running out of memory.

On the database side, I think MySQL is lighter that PostgreSQL -- and it's
threaded.  I have a hard time getting it to use all the memory on the
server.  :-) 

Our CPU utilization is low -- as long as you design your database and your
SQL queries right.  And this can really make a huge difference.  Our front
page (the most complex page on the site) takes about 1.5s to process, due to
more than a dozen SQL queries.  But before tuning it might have taken 10-20
seconds ...

Memory is cheap.  And servers aren't much more expensive ... but even the
best hardware will bog down if your software sucks up all the power!

-----
Tom Haapanen
tomh@motorsport.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6B3C6B6F7AA2D511A35E0080C8699343597B>