pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Backup/Restore too slow
5+ messages / 5 participants
[nested] [flat]

* Backup/Restore too slow
@ 2006-12-22 14:32  Sebastián Baioni <sebastianbaioni@yahoo.com.ar>
  0 siblings, 1 reply; 5+ messages in thread

From: Sebastián Baioni @ 2006-12-22 14:32 UTC (permalink / raw)
  To: pgsql-performance

Hi,
We have a database with one table of 10,000,000 tuples and 4 tables with 5,000,000 tuples.
While in SQL Server it takes 3 minutes to restore this complete database, in PostgreSQL it takes more than 2 hours.
The Backup takes 6 minutes in SQLServer and 13 minutes (which is not a problem)

We are running PostgreSQL 8.1 for Windows and we are using:
C:\pg_dump.exe -i -h localhost -p 5432 -U usuario -F c -b -v -f "C:\BK\file.backup" base
and 
C:\pg_restore.exe  -i -h localhost -p 5432 -U usuario -d base -O -v "C:\BK\file.backup"

We use those parameters because we copied them  from PGAdminIII.

Is there any way to make it faster?

Tanks
     Sebastián
 __________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Backup/Restore too slow
@ 2006-12-29 17:28  Rod Taylor <rod.taylor@gmail.com>
  parent: Sebastián Baioni <sebastianbaioni@yahoo.com.ar>
  0 siblings, 1 reply; 5+ messages in thread

From: Rod Taylor @ 2006-12-29 17:28 UTC (permalink / raw)
  To: Sebastián Baioni <sebastianbaioni@yahoo.com.ar>; +Cc: pgsql-performance

Rebuilding the indexes or integrity confirmations are probably taking  
most of the time.

What is your work_mem setting?

On 22-Dec-06, at 9:32 AM, Sebastián Baioni wrote:

> Hi,
> We have a database with one table of 10,000,000 tuples and 4 tables  
> with 5,000,000 tuples.
> While in SQL Server it takes 3 minutes to restore this complete  
> database, in PostgreSQL it takes more than 2 hours.
> The Backup takes 6 minutes in SQLServer and 13 minutes (which is  
> not a problem)
>
> We are running PostgreSQL 8.1 for Windows and we are using:
> C:\pg_dump.exe -i -h localhost -p 5432 -U usuario -F c -b -v -f "C: 
> \BK\file.backup" base
> and
> C:\pg_restore.exe  -i -h localhost -p 5432 -U usuario -d base -O -v  
> "C:\BK\file.backup"
>
> We use those parameters because we copied them  from PGAdminIII.
>
> Is there any way to make it faster?
>
> Tanks
>      Sebastián
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
> ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Backup/Restore too slow
@ 2006-12-29 17:44  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Rod Taylor <rod.taylor@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2006-12-29 17:44 UTC (permalink / raw)
  To: Rod Taylor <rod.taylor@gmail.com>; +Cc: Sebastián Baioni <sebastianbaioni@yahoo.com.ar>; pgsql-performance

Rod Taylor <rod.taylor@gmail.com> writes:
> Rebuilding the indexes or integrity confirmations are probably taking
> most of the time.

> What is your work_mem setting?

maintenance_work_mem is the thing to look at, actually.  I concur that
bumping it up might help.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Backup/Restore too slow
@ 2006-12-29 18:03  Sebastián Baioni <sebaioni-postgresql@yahoo.com.ar>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Sebastián Baioni @ 2006-12-29 18:03 UTC (permalink / raw)
  To: pgsql-performance

Thanks for answering.
This is my configuration:
# - Memory -

shared_buffers = 1000        # min 16, at least max_connections*2, 8KB each
#work_mem = 1024        # min 64, size in KB
#maintenance_work_mem = 16384    # min 1024, size in KB
#max_stack_depth = 2048        # min 100, size in KB

The PC where we are runing PostgreSQL server is:
AMD Athlon(tm) 64 Processor
3000+
1.79 GHz, 1.93 GB RAM
with WindowsXP Proffesional, Version 2002 Service Pack 2.

How should we set it?

Thanks a lot!
     Sebastián

Tom Lane <tgl@sss.pgh.pa.us> escribió: Rod Taylor  writes:
> Rebuilding the indexes or integrity confirmations are probably taking
> most of the time.

> What is your work_mem setting?

maintenance_work_mem is the thing to look at, actually.  I concur that
bumping it up might help.

   regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
 __________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Backup/Restore too slow
@ 2006-12-29 21:25  Russell Smith <mr-russ@pws.com.au>
  parent: Sebastián Baioni <sebaioni-postgresql@yahoo.com.ar>
  0 siblings, 0 replies; 5+ messages in thread

From: Russell Smith @ 2006-12-29 21:25 UTC (permalink / raw)
  To: sebaioni-postgresql@yahoo.com.ar; +Cc: pgsql-performance

Sebastián Baioni wrote:
> Thanks for answering.
> This is my configuration:
> # - Memory -
>
> shared_buffers = 1000        # min 16, at least max_connections*2, 8KB 
> each
> #work_mem = 1024        # min 64, size in KB
> #maintenance_work_mem = 16384    # min 1024, size in KB
> #max_stack_depth = 2048        # min 100, size in KB
>
> The PC where we are runing PostgreSQL server is:
> AMD Athlon(tm) 64 Processor
> 3000+
> 1.79 GHz, 1.93 GB RAM
> with WindowsXP Proffesional, Version 2002 Service Pack 2.
>
> How should we set it?
Shared buffers even on a workstation should be higher than 1000 if you 
want some performance.  It depends how much memory you have spare to use 
for PostgreSQL.  But something like
shared_buffers = 20000
maintenance_work_mem = 256000

Will certainly give you a performance boost.  You will have to adjust 
those figures based on whatever else you are doing on the machine.

Russell Smith.
>
> Thanks a lot!
>      Sebastián
>
> */Tom Lane <tgl@sss.pgh.pa.us>/* escribió:
>
>     Rod Taylor writes:
>     > Rebuilding the indexes or integrity confirmations are probably
>     taking
>     > most of the time.
>
>     > What is your work_mem setting?
>
>     maintenance_work_mem is the thing to look at, actually. I concur that
>     bumping it up might help.
>
>     regards, tom lane
>
>     ---------------------------(end of
>     broadcast)---------------------------
>     TIP 2: Don't 'kill -9' the postmaster
>
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
> ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2006-12-29 21:25 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-12-22 14:32 Backup/Restore too slow Sebastián Baioni <sebastianbaioni@yahoo.com.ar>
2006-12-29 17:28 ` Rod Taylor <rod.taylor@gmail.com>
2006-12-29 17:44   ` Tom Lane <tgl@sss.pgh.pa.us>
2006-12-29 18:03     ` Sebastián Baioni <sebaioni-postgresql@yahoo.com.ar>
2006-12-29 21:25       ` Russell Smith <mr-russ@pws.com.au>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox