X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 160B854EE6 for ; Tue, 8 Mar 2005 18:17:48 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 52593-10 for ; Tue, 8 Mar 2005 18:17:39 +0000 (GMT) Received: from hogranch.com (hogranch.com [66.117.128.240]) by svr1.postgresql.org (Postfix) with ESMTP id D140252A5B for ; Tue, 8 Mar 2005 18:17:37 +0000 (GMT) Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id j28IHTE04962; Tue, 8 Mar 2005 10:17:29 -0800 Message-ID: <422DEC39.2010104@hogranch.com> Date: Tue, 08 Mar 2005 10:17:29 -0800 From: John R Pierce User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Prajakt Deolasee Cc: pgsql-jdbc@postgresql.org Subject: Re: Postgres is slow References: <6bf1b0a005030805495ec76763@mail.gmail.com> <422DE271.5010701@hogranch.com> <6bf1b0a0050308095142eef89b@mail.gmail.com> In-Reply-To: <6bf1b0a0050308095142eef89b@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/71 X-Sequence-Number: 12464 > John, do you have any idea which parameters to change? up the buffer size (I don't have the docs in front of me, I'm at a iinternet cafe on wifi at the moment), set WAL_SYNC_TYPE (or whatevr it is) to fdatasync, up the wal buffers some too, increase the sort buffer size significantly, yada yada. don't go overboard, just reasonable. I usually use about 10000 main buffers (80MB). > I tried similar tests also against PSQL 8.0 as well. But the results > are exactly same. > > My final usage is going to be exteremly high. I would need something > like 1000 inserts/updates per sec. Do you think PSQL will scale? watch your disk IO. `iostat -x sda -x sdb -x sdc 5` is your friend (replace the sda b c with whatever your physical drives are called). keep the await times under 100mS if you can. *never* use RAID5 for database volumes, use raid1 or 10 (striped mirrors). With postgres 8, you can split your tablespaces across several physical disk drives, this can help alot if you can balance your disk IO. doing this requires some finesse and careful analysis of your database usage patterns. postgres stats can help determine which tables are getting the most insert/update activity, you want to balance these across the available physical drives. good database administrators who understand all this sort of tuning are a rare breed, and in demand. I have a oracle DBA on staff who knows this stuff really well for oracle... the same principles apply to postgres, but are less well understood.