Re: Context switch storm

From: "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com>
To: <creimer(at)brturbo(dot)com(dot)br>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Context switch storm
Date: 2006-11-03 12:50:37
Message-ID: 71E37EF6B7DCC1499CEA0316A256832802B3E801@loki.wc.globexplorer.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Based on what other people have posted, hyperthreading seems not to be beneficial for postgres -- try searching through the archives of this list. (And then turn it off and see if it helps.)

You might also post a few details:

config settings (shared_buffers, work_mem, maintenance_work_mem, wal and checkpoint settings, etc.)

are you using autovacuum ?

all tables are vacuumed and analyzed regularly ? How big are they ? Do they and indexes fit in RAM ?

any particular queries that running and might be related (explain analyze results of them would be useful)

disk configuration

Other processes on this box ?

# of connections to it (I've seen this alone push servers over the edge)

HTH,

Greg Williamson
DBA
GlobeXplorer LLC

-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org on behalf of creimer(at)brturbo(dot)com(dot)br
Sent: Fri 11/3/2006 2:32 AM
To: pgsql-performance(at)postgresql(dot)org
Cc:
Subject: [PERFORM] Context switch storm

Hi,

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.

CPU and memory usage are ok.

What is producing this context switching storms?

It is a box with 16GB RAM and 4 XEON processors running RedHat Enterprise Linux AS.

Should I disable Hyperthreading?

Thank you in advance!

Reimer

-------------------------------------------------------
Click link below if it is SPAM gsw(at)globexplorer(dot)com
"https://mailscanner.globexplorer.com/dspam/dspam.cgi?signatureID=454b34ac206028992556831&user=gsw(at)globexplorer(dot)com&retrain=spam&template=history&history_page=1"
!DSPAM:454b34ac206028992556831!
-------------------------------------------------------

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Richard Huxton 2006-11-03 12:52:05 Re: Context switch storm
Previous Message Richard Huxton 2006-11-03 12:07:58 Re: profiling PL/pgSQL?