The strace for one of the clients is a lot of data. However, it certainly doesn't seem right that, out of the 33038 commands I captured in the strace, 31037 of them were semop().
BTW, after watching stats a bit closer, the number of context switches is "only" about 1000/sec with just one client attached; attaching more than one client makes the number jump up to the 30000/sec mark. On Sat, 2 Mar 2002, Helge Bahmann wrote: > On Sat, 2 Mar 2002, Ben wrote: > > I've checked all the sql commands I use, and all the lookups and updates > > are using indices. The system isn't swapping, and posgres is using its > > 400MB of shared buffers to good effect. I have noticed that context > > switches seem rediculously high - about 30,000/sec, give or take 10k - but > > This is ridiculously high; can you attach "strace" to one of the postgres > processes while stressing the system and send a snippet of the output? > (strace -p <pid>) > > I suspect Postgres locking code may be responsible for this huge amount of > ctx switches; if you see huge amount of pointless select() statements > in the trace, this would prove my theory and it would be time to > rethink the current locking strategy. > > Regards > -- > Helge Bahmann <[EMAIL PROTECTED]> /| \__ > Network admin, systems programmer /_|____\ > _/\ | __) > $ ./configure \\ \|__/__| > checking whether build environment is sane... yes \\/___/ | > checking for AIX... no (we already did this) | > > > ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
