Re: [PERFORM] How to diagnose a “context-switching ” storm problem ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/4/12 RD黄永卫 <yongwei_huang@xxxxxxxxxxxxxxxx>:
> 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.ru@xxxxxxxxx / Skype: gray-hemp / ICQ: 29353802

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux