Skip site navigation (1) Skip section navigation (2)

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

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?==?windows-1252?Q? ” storm problem ?
Date: 2010-04-12 21:27:15
Message-ID: i2jc3a7de1f1004121427kaed843d1w4f1b51244b8c480a@mail.gmail.com (view raw or flat)
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

In response to

pgsql-performance by date

Next:From: Kevin GrittnerDate: 2010-04-12 21:28:36
Subject: Re: significant slow down with various LIMIT
Previous:From: Kevin GrittnerDate: 2010-04-12 13:50:04
Subject: Re: How check execution plan of a function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group