Re: High Context-Switches on Linux 8.1.4 Server

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: sumbry(at)revver(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: High Context-Switches on Linux 8.1.4 Server
Date: 2006-08-07 12:52:17
Message-ID: 19629.1154955137@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> We're seeing an average of 30,000 context-switches a sec. This problem
> was much worse w/8.0 and got bearable with 8.1 but slowly resurfaced.

Is this from LWLock or spinlock contention? strace'ing a few backends
could tell the difference: look to see how many select(0,...) you see
compared to semop()s. Also, how many of these compared to real work
(such as read/write calls)?

Do you have any long-running transactions, and if so does shutting
them down help? There's been some discussion about thrashing of the
pg_subtrans buffers being a problem, and that's mainly a function of
the age of the oldest open transaction.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Markus Schaber 2006-08-07 13:18:27 Re: PostgreSQL scalability on Sun UltraSparc T1
Previous Message Markus Schaber 2006-08-07 12:07:45 Re: Performance with 2 AMD/Opteron 2.6Ghz and 8gig