X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 325A1D1B4EF for ; Wed, 5 Nov 2003 15:23:19 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 54157-10 for ; Wed, 5 Nov 2003 11:22:50 -0400 (AST) Received: from mail.tpi.pl (mail.tpi.pl [193.110.121.18]) by svr1.postgresql.org (Postfix) with ESMTP id 308ADD1B583 for ; Wed, 5 Nov 2003 11:22:46 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by mail.tpi.pl (Postfix) with ESMTP id 37DBF46E1F; Wed, 5 Nov 2003 16:22:49 +0100 (CET) Received: from mail.tpi.pl ([127.0.0.1]) by localhost (silver [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16054-15; Wed, 5 Nov 2003 16:22:48 +0100 (CET) Received: from [10.5.3.38] (lan-out [193.110.121.17]) by mail.tpi.pl (Postfix) with ESMTP id 138F547001; Wed, 5 Nov 2003 16:22:48 +0100 (CET) Subject: Re: performance problem - 10.000 databases From: Marek Florianczyk To: Jeff Cc: pgsql-admin@postgresql.org In-Reply-To: <20031105084852.04d6cfb9.threshar@torgo.978.org> References: <1067594647.22286.57.camel@franki-laptop.tpi.pl> <9643.1067610219@sss.pgh.pa.us> <1068039213.28814.116.camel@franki-laptop.tpi.pl> <20031105084852.04d6cfb9.threshar@torgo.978.org> Content-Type: text/plain; charset=ISO-8859-2 Organization: Message-Id: <1068045299.28825.132.camel@franki-laptop.tpi.pl> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 05 Nov 2003 16:14:59 +0100 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at TP Internet X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/54 X-Sequence-Number: 11042 W li¶cie z ¶ro, 05-11-2003, godz. 14:48, Jeff pisze: > On 05 Nov 2003 14:33:33 +0100 > Marek Florianczyk wrote: > > > > > During this test I was changing some parameters in postgres, and send > > kill -HUP ( pg_ctl reload ). I still don't know what settings will be > > best for me, except "shared buffers", and some kernel and shell > > settings. > > > > as far as I know, -HUP won't make things like shared buffer changes > take. you need a full restart of PG. > .. > but your numbers are different... I guess it did take. huh. Well, I'm not sure, but I only did pg_ctl reload > .. > > how much disk IO is going on during these tests? (vmstat 1) > Any swapping (also shown in vmstat) I was watching iostat 1, and it shows about 600 tps, so it's not much, and when we do raid(1+0) on production machine, disk will go fine. > > Where any of these tables analyze'd? > I see you used no indexes, so on each of your tables it must do a seq > scan. Try adding an index to your test tables and rerun.. No they weren't analyzed, and I did not indexes specially. I'm testing postgres to work as sql engine for a hosting environment, these databases will be used by users=lamers, so many of them will not do any indexes. I wanted to make a test really close to reality, and see how many databases I can take on single machine. One database with 3.000 schemas works better than 3.000 databases, but there is REAL, BIG problem, and I won't be able to use this solution: Every query, like "\d table" "\di" takes veeeeeeery long time. Users have to have phpPgAdmin wich I modified to suit our needs, but now it doesn't work, not even log-in. If I rewrite phpPgAdmin to log users without checking all schemas, and tables within schemas, none of users will be able to examine structure of table. Query like "\d table" from psql monitor takes about 2-5 MINUTES :( I see that only option is to create one database for every user, and monitor traffic, and machine load to see when we need another PC and another PostgreSQL... Marek