Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 1AD609FBD4E for ; Wed, 1 Aug 2007 15:11:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 76927-03-5 for ; Wed, 1 Aug 2007 15:11:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from exprod6og55.obsmtp.com (exprod6og55.obsmtp.com [64.18.1.191]) by postgresql.org (Postfix) with SMTP id 579E69FBD4D for ; Wed, 1 Aug 2007 15:11:37 -0300 (ADT) Received: from source ([63.240.6.46]) (using TLSv1) by exprod6ob55.postini.com ([64.18.5.12]) with SMTP; Wed, 01 Aug 2007 11:11:26 PDT Received: from 172.16.1.243 by mail.mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D2)); Wed, 01 Aug 2007 14:11:05 -0400 X-Server-Uuid: 7829E76E-BB9E-4995-8473-3C0929DF7DD1 Received: from MI8NYCMAIL08.Mi8.com ([172.16.1.164]) by D01SMTP04.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 1 Aug 2007 14:10:41 -0400 Received: from 63.164.47.227 ([63.164.47.227]) by MI8NYCMAIL08.Mi8.com ( [172.16.1.190]) via Exchange Front-End Server mi8owa.mi8.com ( [172.16.1.108]) with Microsoft Exchange Server HTTP-DAV ; Wed, 1 Aug 2007 18:10:18 +0000 User-Agent: Microsoft-Entourage/11.3.6.070618 Date: Wed, 01 Aug 2007 11:10:14 -0700 Subject: Re: Postgres configuration for 64 CPUs, 128 GB RAM... From: "Luke Lonergan" To: "Marc Mamin" , pgsql-performance@postgresql.org Message-ID: Thread-Topic: [PERFORM] Postgres configuration for 64 CPUs, 128 GB RAM... Thread-Index: AcfInLm5e1Otj3TJQ1qXpkYkIWnkoAFYvTsgAZnhmWk= In-Reply-To: MIME-Version: 1.0 X-OriginalArrivalTime: 01 Aug 2007 18:10:41.0646 (UTC) FILETIME=[4585B8E0:01C7D467] X-WSS-ID: 6AAE132A1NW8731913-16-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/8 X-Sequence-Number: 26138 Marc, You should expect that for the kind of OLAP workload you describe in steps 2 and 3 you will have exactly one CPU working for you in Postgres. If you want to accelerate the speed of this processing by a factor of 100 or more on this machine, you should try Greenplum DB which is Postgres 8.2 compatible. Based on the overall setup you describe, you may have a hybrid installation with GPDB doing the reporting / OLAP workload and the other Postgres databases handling the customer workloads. - Luke On 7/24/07 7:38 AM, "Marc Mamin" wrote: > > Hello, > > thank you for all your comments and recommendations. > > I'm aware that the conditions for this benchmark are not ideal, mostly > due to the lack of time to prepare it. We will also need an additional > benchmark on a less powerful - more realistic - server to better > understand the scability of our application. > > > Our application is based on java and is generating dynamic reports from > log files content. Dynamic means here that a repor will be calculated > from the postgres data the first time it is requested (it will then be > cached). Java is used to drive the data preparation and to > handle/generate the reports requests. > > This is much more an OLAP system then an OLTP, at least for our > performance concern. > > > > > Data preparation: > > 1) parsing the log files with a heavy use of perl (regular expressions) > to generate csv files. Prepared statements also maintain reference > tables in the DB. Postgres performance is not an issue for this first > step. > > 2) loading the csv files with COPY. As around 70% of the data to load > come in a single daily table, we don't allow concurrent jobs for this > step. We have between a few and a few hundreds files to load into a > single table; they are processed one after the other. A primary key is > always defined; for the case when the required indexes are alreay built > and when the new data are above a given size, we are using a "shadow" > table instead (without the indexes) , build the index after the import > and then replace the live table with the shadow one. > For example, we a have a table of 13 GB + 11 GB indexes (5 pieces). > > Performances : > > a) is there an "ideal" size to consider for our csv files (100 x 10 > MB or better 1 x 1GB ?) > b) maintenance_work_mem: I'll use around 1 GB as recommended by > Stefan > > 3) Data agggregation. This is the heaviest part for Postgres. On our > current system some queries need above one hour, with phases of around > 100% cpu use, alterning with times of heavy i/o load when temporary > results are written/read to the plate (pgsql_tmp). During the > aggregation, other postgres activities are low (at least should be) as > this should take place at night. Currently we have a locking mechanism > to avoid having more than one of such queries running concurently. This > may be to strict for the benchmark server but better reflect our current > hardware capabilities. > > Performances : Here we should favorise a single huge transaction and > consider a low probability to have another transaction requiring large > sort space. Considering this, is it reasonable to define work_mem being > 3GB (I guess I should raise this parameter dynamically before running > the aggregation queries) > > 4) Queries (report generation) > > We have only few requests which are not satisfying while requiring large > sort operations. The data are structured in different aggregation levels > (minutes, hours, days) with logical time based partitions in oder to > limit the data size to compute for a given report. Moreover we can scale > our infrastrucure while using different or dedicated Postgres servers > for different customers. Smaller customers may share a same instance, > each of them having its own schema (The lock mechanism for large > aggregations apply to a whole Postgres instance, not to a single > customer) . The benchmark will help us to plan such distribution. > > During the benchmark, we will probably not have more than 50 not idle > connections simultaneously. It is a bit too early for us to fine tune > this part. The benchmark will mainly focus on the steps 1 to 3 > > During the benchmark, the Db will reach a size of about 400 GB, > simulating 3 different customers, also with data quite equally splitted > in 3 scheemas. > > > > I will post our configuration(s) later on. > > > > Thanks again for all your valuable input. > > Marc Mamin > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings