Re: Fwd: Process scheduling in postgres
От | John R Pierce |
---|---|
Тема | Re: Fwd: Process scheduling in postgres |
Дата | |
Msg-id | 6e123c08-2b79-055f-efb4-1a6b6a0c1868@hogranch.com обсуждение исходный текст |
Ответ на | Fwd: Process scheduling in postgres (raghu vineel <raghuvineel@gmail.com>) |
Список | pgsql-general |
On 4/22/2016 1:30 AM, raghu vineel wrote:
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] SELECT
lms 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] SELECTIf 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?
no such limitation. any chance there's locking involved here? take a look at pg_locks and pg_stat_activity the next time you run such a test.
-- john r pierce, recycling bits in santa cruz
В списке pgsql-general по дате отправления: