From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marinos Yannikos <mjy@geizhals.at>
Cc: Oleg Bartunov <oleg@sai.msu.su>
Cc: pgsql-performance@postgresql.org
Subject: Re: GiST indexes and concurrency (tsearch2)
Date: Sat, 05 Feb 2005 14:01:32 -0500
Message-ID: <24848.1107630092@sss.pgh.pa.us> (raw)
In-Reply-To: <4204C3B4.1050209@geizhals.at>
References: <4201AEB1.4000504@geizhals.at>
<Pine.GSO.4.62.0502031255350.20328@ra.sai.msu.su>
<4202053B.10207@geizhals.at>
<Pine.GSO.4.62.0502031514090.20328@ra.sai.msu.su>
<4204C3B4.1050209@geizhals.at>
Marinos Yannikos <mjy@geizhals.at> writes:
> This is really baffling me, it looks like a kernel issue of some sort
> (I'm only guessing though). I found this old posting:
> http://archives.postgresql.org/pgsql-general/2001-12/msg00836.php - is
> this still applicable?
That seems to be an early report of what we now recognize as the
"context swap storm" problem, and no we don't have a solution yet.
I'm not completely convinced that you're seeing the same thing,
but if you're seeing a whole lot of semops then it could well be.
I set up a test case consisting of two backends running the same
tsearch2 query over and over --- nothing fancy, just one of the ones
from the tsearch2 regression test:
SELECT count(*) FROM test_tsvector WHERE a @@ to_tsquery('345&qwerty');
I used gdb to set breakpoints at PGSemaphoreLock and PGSemaphoreTryLock,
which are the only two functions that can possibly block on a semop
call. On a single-processor machine, I saw maybe one hit every couple
of seconds, all coming from contention for the BufMgrLock or sometimes
the LockMgrLock. So unless I've missed something, there's not anything
in tsearch2 or gist per se that is causing lock conflicts. You said
you're testing a quad-processor machine, so it could be that you're
seeing the same lock contention issues that we've been trying to figure
out for the past year ...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, mjy@geizhals.at, oleg@sai.msu.su
Subject: Re: GiST indexes and concurrency (tsearch2)
In-Reply-To: <24848.1107630092@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox