From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | RD黄永卫 <yongwei_huang(at)temp(dot)gtmc(dot)com(dot)cn> |
Cc: | pgsql-performance(at)postgresql(dot)org, pgsql-bugs-owner(at)postgresql(dot)org |
Subject: | Re: [PERFORM] How to diagnose a “context-switching ” storm problem ? |
Date: | 2010-04-12 21:27:15 |
Message-ID: | i2jc3a7de1f1004121427kaed843d1w4f1b51244b8c480a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
2010/4/12 RD黄永卫 <yongwei_huang(at)temp(dot)gtmc(dot)com(dot)cn>:
> I donnt know what make the "context-switching" storm ?
>
> How should I investigate the real reason ?
>
> Could you please give me some advice ?
It might be because of cascading locks so try to monitor them when it happens.
You may find this query useful:
SELECT
granted,
count(1) AS locks,
pid,
now() - xact_start AS xact_age,
now() - query_start AS query_age,
current_query
FROM
pg_locks AS l
LEFT JOIN pg_stat_activity AS a ON
pid = procpid
GROUP BY 1, 3, 4, 5, 6
ORDER BY 1 DESC, 2 DESC
-- ORDER BY 4 DESC
LIMIT 100;
--
Sergey Konoplev
Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: gray(dot)ru(at)gmail(dot)com / Skype: gray-hemp / ICQ: 29353802
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2010-04-12 21:28:36 | Re: significant slow down with various LIMIT |
Previous Message | Kevin Grittner | 2010-04-12 13:50:04 | Re: How check execution plan of a function |