Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDIrA-0005MQ-FX for pgsql-performance@arkaria.postgresql.org; Wed, 15 Jun 2016 22:00:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bDIr9-0008Tc-U8 for pgsql-performance@arkaria.postgresql.org; Wed, 15 Jun 2016 22:00:15 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDIr8-0008JF-Pa for pgsql-performance@postgresql.org; Wed, 15 Jun 2016 22:00:14 +0000 Received: from mail-yw0-x235.google.com ([2607:f8b0:4002:c05::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bDIr2-0007Ml-2c for pgsql-performance@postgresql.org; Wed, 15 Jun 2016 22:00:13 +0000 Received: by mail-yw0-x235.google.com with SMTP id g20so26672606ywb.0 for ; Wed, 15 Jun 2016 15:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=eUuiMrUQazqaZl4WYEMdCh/e2X42NUyvhNUSEqjEC3E=; b=AeDgSGriGc0ZnHDavecz22xOzuM7kCnJXkqTZadUuQnP/OHw/owpImurL3YqS2Kdmq cOoHeOhFPa4WZp6xNv70OHIplz0bQI24cbXv+4vtZHmBT65Zj/g3+0RL18GEc/6J0rfV iFjofXQHUGEOTYHxXv0elthbT8dbRPkEkFMjYYUtXf3pWoU7doGZPnmnaXUAjPeqvOKH 8AZxOsZOGndN0H0Yu0q5++IdABB5Fuqg8FC7S+bKmd2Lb0zf3KLIgSk6zp5nudPEyNBL Z4AxdIMGpUqT2WazYdAaFo+GW4Z9OU0nMxk70JH4qED3CFMJOkApeRuVfsbEiChfew81 irWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=eUuiMrUQazqaZl4WYEMdCh/e2X42NUyvhNUSEqjEC3E=; b=YrbsQBXbUYeAoYb2CNa4lmagqq7InktulXXLdkZpX8Yr8gv7mZCAXc3fZghzLxZXEe obUM+8D+mAsPpaRWIiidmXbfeqT0bxS6JwoEILEytm87K+9BPKrHpPtvQa5UbP+cETGS y9lQTM/UjscmMhqKLShDeu5vA2FaW18B6muTANO989BnRPzrukfM4u6s09gIxIeB3XMv m5R6qNDAqMs0k1EyLG+t9NSnrYZW1WZTaWF39mW+eXlCDS7Oa3C2qJwf8Y69y79JlDsp Iez0kA/g6M46aWE4Jffsxh+hAL78oCmqz+XWShTC5JG+tO3qUIpxLKIIydh2CXE7cxcU rL0w== X-Gm-Message-State: ALyK8tKYHwkPO2t2DxpjCBf5B/itQ7siwZQOnS9aWFj2kzrSRnygAzHEKAIjgI6cAlhInmpqi/cE24SAXFMO6A== X-Received: by 10.13.219.213 with SMTP id d204mr773872ywe.234.1466028007315; Wed, 15 Jun 2016 15:00:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.30.135 with HTTP; Wed, 15 Jun 2016 15:00:06 -0700 (PDT) From: Adrian Myers Date: Wed, 15 Jun 2016 18:00:06 -0400 Message-ID: Subject: pg_restore seems very slow To: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=001a114fad389b803c0535583e72 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --001a114fad389b803c0535583e72 Content-Type: text/plain; charset=UTF-8 This is my first post to the mailing list, so I apologize for any etiquette issues. I have a few databases that I am trying to move from one system to another. Both systems are running Windows 7 and Postgres 8.4, and they are pretty powerful machines (40-core Xeon workstations with decent hardware across the board). While the DBs vary in size, I'm working right now with one that is roughly 50 tables and probably 75M rows, and is about 300MB on disk when exported via pg_dump. I am exporting and restoring using these commands (on separate sytems): pg_dump -F c mydb > mydb.dump pg_restore -C -j 10 mydb.dump The dump process runs in about a minute and seems fine. The restore process has already been running for around 7 hours. Yesterday, I tried restoring a larger DB that is roughly triple the dimensions listed above, and it ran for over 16 hours without completing. I followed the advice given at http://www.databasesoup.com/2014/09/settings-for-fast-pgrestore.html and set the conf settings as directed and restarted the server. You can see in the command line that I am trying to use the -j parameter for parallelism, but I don't see much evidence of that in Task Manager. CPU load is consistently 1 or 2% and only a couple cores seem to be doing anything, there certainly aren't 10 cpu-bound cores. I'm not sure where to look for pg_restore's disk I/O, but there is an entry for pg_restore in Task Manager/Processes which shows almost no I/O Read Bytes and 0 I/O Write Bytes. Since that's just the parent process that might make sense but I don't see much activity elsewhere either. Is there something simple that I am missing here? Does the -j flag not work in 8.4 and I should use --jobs? It just seems like none of the CPU or RAM usage I'd expect from this process are evident, it's taking many times longer than I would expect, and I don't know how to verify if the things I'm trying are working or not. Any insight would be appreciated! Thanks, Adrian --001a114fad389b803c0535583e72 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
This is my first post to the mailing list, so I apologize = for any etiquette issues.

I have a few databases that I = am trying to move from one system to another.=C2=A0 Both systems are runnin= g Windows 7 and Postgres 8.4, and they are pretty powerful machines (40-cor= e Xeon workstations with decent hardware across the board). While the DBs v= ary in size, I'm working right now with one that is roughly 50 tables a= nd probably 75M rows, and is about 300MB on disk when exported via pg_dump.= =C2=A0

I am exporting and restoring using these co= mmands (on separate sytems):
pg_= dump -F c mydb > mydb.dump
pg_restore -C -j 10 mydb.dump

The du= mp process runs in about a minute and seems fine. The restore process has a= lready been running for around 7 hours.

Yeste= rday, I tried restoring a larger DB that is roughly triple the dimensions l= isted above, and it ran for over 16 hours without completing.
<= div>
I followed the advice given at http://www.databaseso= up.com/2014/09/settings-for-fast-pgrestore.html and set the conf settin= gs as directed and restarted the server.

You = can see in the command line that I am trying to use the -j parameter for pa= rallelism, but I don't see much evidence of that in Task Manager. CPU l= oad is consistently 1 or 2% and only a couple cores seem to be doing anythi= ng, there certainly aren't 10 cpu-bound cores. I'm not sure where t= o look for pg_restore's disk I/O, but there is an entry for pg_restore = in Task Manager/Processes which shows almost no I/O Read Bytes and 0 I/O Wr= ite Bytes. Since that's just the parent process that might make sense b= ut I don't see much activity elsewhere either.

Is there something simple that I am missing here? Does the -j flag no= t work in 8.4 and I should use --jobs? It just seems like none of the CPU o= r RAM usage I'd expect from this process are evident, it's taking m= any times longer than I would expect, and I don't know how to verify if= the things I'm trying are working or not.

Any insight would be appreciated!

Thanks,
Adrian
--001a114fad389b803c0535583e72--