Thread: db restore eats too much memory

db restore eats too much memory

From
Tsirkin Evgeny
Date:
Hi!
I am trying to copy my db from one machine to another .
However since my dump file is pretty big while trying to restore on the
target one
the machine just "hangs up" - we got an empty black console and no ssh
response.
We think that this is caused by postmaster eating too much memory the
last top
screenshot is:

top - 12:07:46 up  1:06,  2 users,  load average: 0.99, 0.93, 0.57
Tasks:  52 total,   3 running,  49 sleeping,   0 stopped,   0 zombie
Cpu(s): 99.7% us,  0.3% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:   1035532k total,   364012k used,   671520k free,    31292k buffers
Swap:  2096472k total,        0k used,  2096472k free,   282468k cached

this is not there but while machine is steel up i can see postmaster
got 1.6 mem and 99.7% cpu.you can see also that the swap is realy big.

This is pgsql 7.4.7 suse 9.
We had the same problems with rh 7.3 with pgsql 7.3 bug just managed ...
The memory on the machine was checked with memchack and is fine.
I know that i can limit the memory usage for postmaster but wouldn't
it make to crash ?
Thanks.
Evgeny.



Re: db restore eats too much memory

From
Tom Lane
Date:
Tsirkin Evgeny <tsurkin@mail.jct.ac.il> writes:
> top - 12:07:46 up  1:06,  2 users,  load average: 0.99, 0.93, 0.57
> Tasks:  52 total,   3 running,  49 sleeping,   0 stopped,   0 zombie
> Cpu(s): 99.7% us,  0.3% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
> Mem:   1035532k total,   364012k used,   671520k free,    31292k buffers
> Swap:  2096472k total,        0k used,  2096472k free,   282468k cached

> this is not there but while machine is steel up i can see postmaster
> got 1.6 mem and 99.7% cpu.you can see also that the swap is realy big.

No, I can see that the swap isn't being touched at all ... and main
memory seems to have a lot of slop too.  Whatever problem you may be
having here, it doesn't seem to be out-of-memory.

            regards, tom lane