Re: Context switching

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-performance(at)postgresql(dot)org, carlos(dot)reimer(at)opendb(dot)com(dot)br
Subject: Re: Context switching
Date: 2006-11-07 17:42:26
Message-ID: 200611070942.26663.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Carlos,

> We've migrated one of our servers from pg 7.4 to 8.1 and from times to
> times (4 hours) the server start doing a lot of context switching and all
> transactions become very slow.
>
> The average context switching for this server as vmstat shows is 1 but when
> the problem occurs it goes to 250000.

Context Switching is a symptom rather than a cause. What's most likely
happening is that you have a combined heavy-CPU and heavy-IO workload, so you
have bursts of CPU activity stalled by iowaits.

Can you check the rate of iowaits during the "storm" periods?

Also, is this Xeon? And are you saying that you *didn't* have this issue
under 7.4?

--
Josh Berkus
PostgreSQL @ Sun
San Francisco

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Markus Schaber 2006-11-08 16:18:00 Re: Easy read-heavy benchmark kicking around?
Previous Message Dimitri Fontaine 2006-11-07 10:49:05 Re: Easy read-heavy benchmark kicking around?