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

Re: commit so slow program looks frozen

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Scott Marlowe" <smarlowe(at)g2switchworks(dot)com>,"Carlo Stonebanks" <stonec(dot)register(at)sympatico(dot)ca>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: commit so slow program looks frozen
Date: 2006-10-26 11:49:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
> > > You may try to figure out what's the process doing (the backend 
> > > obviously, not the frontend (Tcl) process) by attaching 
> to it with 
> > > strace.
> > 
> > It's so sad when us poor Windows guys get helpful hints from people 
> > assume that we're smart enough to run *NIX... ;-)
> You should try a google search on strace and NT or windows or 
> XP...  I was surprised how many various implementations of it I found.

Let me know if you find one that's stable, I've been wanting that. I've
tried one or two, but it's always been just a matter of time before the
inevitable BSOD.

> > > Maybe it's swamped by a context switch storm (but in that case, 
> > > probably the other processes would be affected as well).
> > 
> > What is a context switch storm? (and what a great name for a heavy 
> > metal rock band!)
> I can just see the postgresql group getting together at the 
> next O'Reilley's conference and creating that band.  And it 
> will all be your fault.


> A context switch storm is when your machine spends more time 
> trying to figure out what to do than actually doing anything. 
>  The CPU spends most it's time switching between programs 
> than running them.

I can see Windows benig more sucepitble to this than say Linux, because
switching between processes there is a lot more expensive than on Linux.

> Seeing as PostgreSQL runs one thread / process per 
> connection, it's pretty unlikely that the problem here is one 
> "hungry" thread.  Do all four CPUs show busy, or just one?  
> Do you have a way of measuring how much time is spent waiting 
> on I/O on a windows machine like top / vmstat does in unix?

There are plenty of counters in the Performance Monitor. Specificall,
look at "disk queue counters" - they indicate when the I/O subsystem is
backed up.


In response to

pgsql-performance by date

Next:From: Rocco AltierDate: 2006-10-26 11:59:24
Subject: Re: commit so slow program looks frozen
Previous:From: Gavin HamillDate: 2006-10-26 08:58:27
Subject: VACUUMs take twice as long across all nodes

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