psql is slow and it does not take much resources

Поиск
Список
Период
Сортировка
От Javier de la Torre
Тема psql is slow and it does not take much resources
Дата
Msg-id a0174d240605030700y26de1b6aj3eb512e3fae1b734@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hi all,

I've been searching around for an answer to this, but I coulnd't find
anything. So here we go.

I am running PostgreSQL 8.1.3 on Red Hat on an Intel server with 2GB
of RAM and lot of free HD space.

I have a very large dump file, more then 4GB, to recreate a database.
When I run:

psql -Uuser -q -dmydatabase <mydump.sql &

It works, but is slow, it inserts about 1.000 record in 10 seconds.
But the curious thing is that if I check the resources of the server
it seems that psql is not using them much. "top" says that postgres is
using around 2% of the processor and psql around 1% so that server is
only 3% used. "top" also says that more or less 48% idle and
50%waiting...

In the other hand the memory seems to be very high...

What could be the problem? Is that the server is just slow reading
from the file? It has a 300GB SCSI drive.

Is there any way to make this work faster? I would like to recreate
the db at least once a month, but this taked too much time...

Thanks in advance for any advice.

Javier.

В списке pgsql-general по дате отправления:

Предыдущее
От: Erik Myllymaki
Дата:
Сообщение: Re: logfiles filling up
Следующее
От: "Larry Rosenman"
Дата:
Сообщение: Re: psql is slow and it does not take much resources