From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jeffrey W(dot) Baker" <jwbaker(at)acm(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Thousands of semops for every i/o |
Date: | 2003-06-10 06:08:30 |
Message-ID: | 237.1055225310@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-patches |
"Jeffrey W. Baker" <jwbaker(at)acm(dot)org> writes:
> This is the strace of a process which is deleting rows from four tables,
> inside a transaction, one row at a time. There are a lot of semops for
> every i/o. There are about 30 connections to this database currently.
> I thought deletes in a transaction just flew along in Pg, because they
> simply wrote the deleted transaction ID on the record. It used to work
> fine in my previous locally-built 7.2 on Debian, but this is 7.2.2 on
> SuSE Enterprise Server 8.2.
The first thing that comes to mind is that the thing is using SysV
semaphores as a substitute for spinlocks. If this is on a hardware
platform that is supposed to have TAS() support in s_lock.h or s_lock.c,
then it's a configuration or build error. If it's on some heretofore
unknown platform, you need to write some TAS() code to get decent
performance.
One way to check is to see how many semaphores Postgres has created
("ipcs -s -a" should help here). If it's more than approx. one per
max_connection then you're using semas for spinlocks.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Féliciano Matias | 2003-06-10 06:21:32 | Re: psql and bytea |
Previous Message | culley harrelson | 2003-06-10 05:57:18 | tsearch v2 |
From | Date | Subject | |
---|---|---|---|
Next Message | Ased Mustafa | 2003-06-10 09:26:49 | Ant Delete |
Previous Message | Jeffrey W. Baker | 2003-06-09 17:27:58 | Thousands of semops for every i/o |