Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A57B7635CD3 for ; Wed, 1 Apr 2009 09:22:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 05515-03-5 for ; Wed, 1 Apr 2009 09:22:47 -0300 (ADT) X-Greylist: delayed 13:25:00.083366 by SQLgrey-1.7.6 Received: from col0-omc2-s9.col0.hotmail.com (col0-omc2-s9.col0.hotmail.com [65.55.34.83]) by mail.postgresql.org (Postfix) with ESMTP id AF6736355C6 for ; Wed, 1 Apr 2009 09:22:35 -0300 (ADT) Received: from COL104-W61 ([65.55.34.71]) by col0-omc2-s9.col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 1 Apr 2009 05:22:33 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_f6c42436-2a53-4ff3-a17c-eaf7ed817687_" X-Originating-IP: [86.81.58.36] From: henk de wit To: Tom Lane CC: Subject: Re: How to get parallel restore in PG 8.4 to work? Date: Wed, 1 Apr 2009 14:22:33 +0200 Importance: Normal In-Reply-To: <20300.1238540913@sss.pgh.pa.us> References: <20300.1238540913@sss.pgh.pa.us> MIME-Version: 1.0 X-OriginalArrivalTime: 01 Apr 2009 12:22:33.0944 (UTC) FILETIME=[890D1580:01C9B2C4] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL=-0.000, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200904/4 X-Sequence-Number: 33371 --_f6c42436-2a53-4ff3-a17c-eaf7ed817687_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi=2C > henk de wit writes: >> For performance reasons (obviously =3B)) I'm experimenting with parallel= restore in PG 8.4. [...] I got this message however: >> [...] >> pg_restore: [archiver] WARNING: archive is compressed=2C but this >> installation does not support compression -- no data will be available > As far as one can tell from here=2C you built *without* zlib support. > This is unrelated to parallel restore as such. I see. Thanks for the confirmation. I would have sworn I built with zlib su= pport=2C but obviously I did something wrong. For some reason that I can't = remember now=2C I did omit support for readline. Could that have anything t= o do with it=2C or are those completely unrelated? To continue testing=2C I imported a PG 8.3 dump in the plain format into PG= 8.4=2C dumped this again in the custom format and imported that again into= PG 8.4 using the parallel restore feature. This proved to be very benefici= al. Top shows that all the cores are being used: ./pg_restore -p 5433 -h localhost -d db_test -j 8 -Fc /ssd/tmp/test_dump.custom top - 11:33:37 up 1 day=2C 18:07=2C 5 users=2C load average: 5.63=2C 2.12= =2C 0.97 Tasks: 187 total=2C 7 running=2C 180 sleeping=2C 0 stopped=2C 0 zombi= e Cpu0 : 91.7%us=2C 8.0%sy=2C 0.0%ni=2C 0.0%id=2C 0.0%wa=2C 0.0%hi=2C = 0.3%si=2C 0.0%st Cpu1 : 90.0%us=2C 9.3%sy=2C 0.0%ni=2C 0.7%id=2C 0.0%wa=2C 0.0%hi=2C = 0.0%si=2C 0.0%st Cpu2 : 81.5%us=2C 15.9%sy=2C 0.0%ni=2C 2.3%id=2C 0.0%wa=2C 0.0%hi=2C = 0.3%si=2C 0.0%st Cpu3 : 87.0%us=2C 10.3%sy=2C 0.0%ni=2C 2.3%id=2C 0.0%wa=2C 0.0%hi=2C = 0.3%si=2C 0.0%st Cpu4 : 91.4%us=2C 8.0%sy=2C 0.0%ni=2C 0.0%id=2C 0.0%wa=2C 0.3%hi=2C = 0.3%si=2C 0.0%st Cpu5 : 66.8%us=2C 16.3%sy=2C 0.0%ni=2C 4.3%id=2C 11.0%wa=2C 0.0%hi=2C = 1.7%si=2C 0.0%st Cpu6 : 76.0%us=2C 12.7%sy=2C 0.0%ni=2C 0.0%id=2C 10.7%wa=2C 0.0%hi=2C = 0.7%si=2C 0.0%st Cpu7 : 97.3%us=2C 2.3%sy=2C 0.0%ni=2C 0.0%id=2C 0.0%wa=2C 0.0%hi=2C = 0.3%si=2C 0.0%st Mem: 33021204k total=2C 32861900k used=2C 159304k free=2C 40k buff= ers Swap: 7811064k total=2C 2164k used=2C 7808900k free=2C 29166332k cach= ed The performance numbers are quite amazing. The dump is approximately 19GB i= n size and the filesystem I use is xfs on Debian Lenny. Using the normal re= store (with a single process) the time it takes to do a full restore is 45 = minutes=2C when using 8 processes this drops to just 14 minutes and 23 seco= nds. Using 16 processes it drops further to just 11 minutes and 46 seconds. I still have some work to do to find out why dumping in the custom format i= s so much slower. Unfortunately I forgot to time this exactly=2C but my fee= ling was that it was 'very slow'. I'll try to get some exact numbers though= . Kind regards=2CHenk _________________________________________________________________ What can you do with the new Windows Live? Find out http://www.microsoft.com/windows/windowslive/default.aspx= --_f6c42436-2a53-4ff3-a17c-eaf7ed817687_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi=2C

> henk de wit <=3Bhenk53602@hotmail.com> writes:
>= > For performance reasons (obviously =3B)) I'm experimenting with parallel = restore in PG 8.4. [...] I got this message however:
>> [...]
>> pg_r= estore: [archiver] WARNING: archive is compressed=2C but this
>> install= ation does not support compression -- no data will be available

> As= far as one can tell from here=2C you built *without* zlib support.
> Th= is is unrelated to parallel restore as such.

I see. Thanks for = the confirmation. I would have sworn I built with zlib support=2C but obvio= usly I did something wrong. For some reason that I can't remember now=2C I = did omit support for readline. Could that have anything to do with it=2C or= are those completely unrelated?

To continue testi= ng=2C I imported a PG 8.3 dump in the plain format into PG 8.4=2C dumped th= is again in the custom format and imported that again into PG 8.4 using the= parallel restore feature. This proved to be very=A0beneficial. Top shows t= hat all the cores are being used:

./pg_restore -p 5433 -h localhost -= d db_test -j 8 -Fc
/ssd/tmp/test_dump.custom

top - 11:33:37 up 1 = day=2C 18:07=2C =A05 users=2C =A0load average: 5.63=2C 2.12=2C 0.97
Task= s: 187 total=2C =A0=A07 running=2C 180 sleeping=2C =A0=A00 stopped=2C =A0= =A00 zombie
Cpu0 =A0: 91.7%us=2C =A08.0%sy=2C =A00.0%ni=2C =A00.0%id=2C = =A00.0%wa=2C =A00.0%hi=2C =A00.3%si=2C=A00.0%st
Cpu1 =A0: 90.0%us=2C =A0= 9.3%sy=2C =A00.0%ni=2C =A00.7%id=2C =A00.0%wa=2C =A00.0%hi=2C =A00.0%si=2C= =A00.0%st
Cpu2 =A0: 81.5%us=2C 15.9%sy=2C =A00.0%ni=2C =A02.3%id=2C =A00= .0%wa=2C =A00.0%hi=2C =A00.3%si=2C=A00.0%st
Cpu3 =A0: 87.0%us=2C 10.3%sy= =2C =A00.0%ni=2C =A02.3%id=2C =A00.0%wa=2C =A00.0%hi=2C =A00.3%si=2C=A00.0%= st
Cpu4 =A0: 91.4%us=2C =A08.0%sy=2C =A00.0%ni=2C =A00.0%id=2C =A00.0%wa= =2C =A00.3%hi=2C =A00.3%si=2C=A00.0%st
Cpu5 =A0: 66.8%us=2C 16.3%sy=2C = =A00.0%ni=2C =A04.3%id=2C 11.0%wa=2C =A00.0%hi=2C =A01.7%si=2C=A00.0%st
= Cpu6 =A0: 76.0%us=2C 12.7%sy=2C =A00.0%ni=2C =A00.0%id=2C 10.7%wa=2C =A00.0= %hi=2C =A00.7%si=2C=A00.0%st
Cpu7 =A0: 97.3%us=2C =A02.3%sy=2C =A00.0%ni= =2C =A00.0%id=2C =A00.0%wa=2C =A00.0%hi=2C =A00.3%si=2C=A00.0%st
Mem: = =A033021204k total=2C 32861900k used=2C =A0=A0159304k free=2C =A0=A0=A0=A0= =A0=A040k buffers
Swap: =A07811064k total=2C =A0=A0=A0=A02164k used=2C = =A07808900k free=2C 29166332k cached

The performance numbers are quite amazing. The dump is=A0approx= imately 19GB in size and the filesystem I use is xfs on Debian Lenny. Using= the normal restore (with a single process) the time it takes to do a full = restore is 45 minutes=2C when using 8 processes this drops to just 14 minut= es and 23 seconds. Using 16 processes it drops further to just 11 minutes a= nd 46 seconds.

I still have some work to do to fin= d out why dumping in the custom format is so much slower. Unfortunately I f= orgot to time this exactly=2C but my feeling was that it was 'very slow'. I= 'll try to get some exact numbers though.

Kind reg= ards=2C
Henk




What can you do with the new Windows Live? Find out = --_f6c42436-2a53-4ff3-a17c-eaf7ed817687_--