Re: [NOVICE] Fwd: Process scheduling in postgres

From: Sameer Kumar <sameer(dot)kumar(at)ashnik(dot)com>
To: raghu vineel <raghuvineel(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: [NOVICE] Fwd: Process scheduling in postgres
Date: 2016-04-23 05:51:56
Message-ID: CADp-Sm6pD33H7O4k+qv9amT_5V8tp3bC15fmhCWgV3p3_=2VBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On Fri, Apr 22, 2016 at 5:21 PM raghu vineel <raghuvineel(at)gmail(dot)com> wrote:

>
> Hi,
>
> I have a 4 core CPU for postgres and I have submitted 6 queries parallely
> in 6 different sessions. But I am seeing only 1 query per CPU and the
> remainig queries are queued. I am not sure why is it happening. Do you have
> any special scheduler for postgres? I can see that CPU has been shared with
> other non postgres processes but postgres processes are not sharing any CPU
> within a core. The following is the process states.
>
>
> *lms 2868 2209 98 07:20 ? 00:02:30 postgres: lms controller
> [local] SELECTlms 2869 2209 98 07:20 ? 00:02:30 postgres: lms
> controller [local] SELECT*
> lms 2870 2209 0 07:20 ? 00:00:00 postgres: lms controller
> [local] SELECT
> lms 2871 2209 0 07:20 ? 00:00:00 postgres: lms controller
> [local] SELECT
> lms 2872 2209 0 07:20 ? 00:00:00 postgres: lms controller
> [local] SELECT
> *lms 2873 2209 98 07:20 ? 00:02:30 postgres: lms controller
> [local] SELECT*
>
> If you see above, three Select queries have been queued. They are
> acquiring CPU only when there is a core without any postgres query running
> on it.
>
> I know the postgres limitation of one query using only one core. But is
> there any limitation of one CPU running only one query at a time?
>
>
Are all the queries related to the same table(s)?
Which version of PostgreSQL? What's the version of OS?

Check out the locks which are not granted yet - pg_locks.granted

> Your help is appreciated.
>
> Thanks and regards,
> Vineel.
>
> --
--
Best Regards
Sameer Kumar | DB Solution Architect
*ASHNIK PTE. LTD.*

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Manuel Gómez 2016-04-23 06:08:41 Re: Proper relational database?
Previous Message Shulgin, Oleksandr 2016-04-23 05:03:45 Re: Add relcreated (timestamp) column to pg_class catalog to record the time an object was created

Browse pgsql-novice by date

  From Date Subject
Next Message raghu vineel 2016-04-25 07:40:02 Re: [NOVICE] Fwd: Process scheduling in postgres
Previous Message John R Pierce 2016-04-22 22:21:17 Re: Fwd: Process scheduling in postgres