Re: Postgres refusing to use >1 core - Mailing list pgsql-performance

From Vitalii Tymchyshyn
Subject Re: Postgres refusing to use >1 core
Date
Msg-id 4DCB8C31.2000606@gmail.com
Whole thread Raw
In response to Re: Postgres refusing to use >1 core  (Aren Cambre <aren@arencambre.com>)
List pgsql-performance
12.05.11 06:18, Aren Cambre написав(ла):
> Using one thread, the app can do about 111 rows per second, and it's
> only exercising 1.5 of 8 CPU cores while doing this. 12,000,000 rows /
> 111 rows per second ~= 30 hours.

I don't know how I missed that. You ARE maxing out one cpu core, so
you're quite right that you need more threads unless you can make your
single worker more efficient.

And the problem is my app already has between 20 and 30 threads. Something about C#'s PLINQ may not be working as intended...

Have you checked that you are really doing fetch and processing in parallel? Dunno about C#, but under Java you have to make specific settings (e.g. setFetchSize) or driver will fetch all the data on query run. Check time needed to fetch first row from the query.

Best regards, Vitalii Tymchyshyn

pgsql-performance by date:

Previous
From: Sethu Prasad
Date:
Subject: Re: DBT-5 & Postgres 9.0.3
Next
From: Michael Graham
Date:
Subject: Re: Postgres refusing to use >1 core