From owner-freebsd-isp Fri Oct 12 20:30:27 2001 Delivered-To: freebsd-isp@freebsd.org Received: from omega.metrics.com (omega.metrics.com [204.138.110.1]) by hub.freebsd.org (Postfix) with ESMTP id 67D8437B405 for ; Fri, 12 Oct 2001 20:30:24 -0700 (PDT) Received: from syncro.metrics.com (syncro.metrics.com [204.138.110.20]) by omega.metrics.com (8.9.3/8.9.3) with ESMTP id XAA25548; Fri, 12 Oct 2001 23:28:41 -0400 (EDT) Received: by syncro.metrics.com with Internet Mail Service (5.5.2653.19) id <4TAC843A>; Fri, 12 Oct 2001 23:25:12 -0400 Message-ID: <6B3C6B6F7AA2D511A35E0080C8699343597B@syncro.metrics.com> From: "Haapanen, Tom" To: "'Sean Chittenden'" Cc: Marcel Prisi , Scott Gerhardt , freebsd-isp@FreeBSD.ORG Subject: RE: PostgreSQL & shared memory Date: Fri, 12 Oct 2001 23:25:07 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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