How can I make use of both CPUs in a dual processor machine

Поиск
Список
Период
Сортировка
От Alex
Тема How can I make use of both CPUs in a dual processor machine
Дата
Msg-id 420A1D9B.1040801@meerkatsoft.com
обсуждение исходный текст
Ответы Re: How can I make use of both CPUs in a dual processor  (John A Meinel <john@arbash-meinel.com>)
Список pgsql-performance
Hi,
we just got a new dual processor machine and I wonder if there is a way
to utilize both processors.

Our DB server is basically fully dedicated to postgres. (its a dual amd
with 4gb mem.)

I have a batch job that periodically loads about 8 million records into
a table.
for this I drop the indices, truncate the table, use the copy to insert
the data, recreate the indices (4 indices), vacuum the table.

That is all done through a perl batch job.

While I am doing this, I noticed that only one CPU is really used.

So here are my questions:

Is there a way to utilize both CPUs

Is it possible to split up the import file and run 2 copy processes

Is it possible to create 2 indices at the same time

Would I actually gain anything from that, or is the bottleneck somewhere
else ?

(perl is a given here for the batch job)

If anyone has some experience or ideas... any hints or help on this
would be appreciated.

Thanks
Alex


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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: query produces 1 GB temp file
Следующее
От: John A Meinel
Дата:
Сообщение: Re: How can I make use of both CPUs in a dual processor