Re: Solaris excesive semaphores usage.

Lists: pgsql-hackers
From: Pedro Baldanta <pjbs39(at)tid(dot)es>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Solaris excesive semaphores usage.
Date: 2006-12-14 09:07:40
Message-ID: 4581145C.9010709@tid.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi all:

Versions:

PostgreSQL 8.0.1
SunOS relayprod02 5.9 Generic_118558-19 sun4u sparc SUNW,Sun-Fire-V440
-> Solaris 9 on Sparc processor.

We are running java app over PostgreSQL. Everything works fine but we
detected high semaphore usage during a heavy query process.

This is result of "sar -m" command.

Time msg/s sema/s
16:59:00 0.00 39.68
16:59:05 0.00 93.01
16:59:10 0.00 40.48
16:59:15 0.00 26.80
16:59:20 0.00 179.20
16:59:25 0.00 184.40
16:59:30 0.00 108.58
16:59:35 0.00 218.84
16:59:40 0.00 124.40
16:59:45 0.00 1328.14
16:59:50 0.00 1335.47
16:59:55 0.00 1289.60
17:00:00 0.00 1466.40
17:00:05 0.00 21004.59
17:00:10 0.00 24332.60
17:00:15 0.00 18206.81
17:00:20 0.00 29127.46
17:00:25 0.00 26930.94
17:00:30 0.00 5771.20
17:00:35 0.00 4503.60
17:00:40 0.00 4282.80
17:00:45 0.00 18480.80
17:00:50 0.00 24908.40
17:00:55 0.00 28279.20
17:01:00 0.00 30194.81
17:01:05 0.00 9260.12
17:01:10 0.00 1604.00
17:01:15 0.00 1378.84
17:01:20 0.00 1310.62
17:01:25 0.00 133.20
17:01:30 0.00 66.60
17:01:35 0.00 42.51
17:01:40 0.00 120.00
17:01:45 0.00 38.08
17:01:50 0.00 49.90
17:01:55 0.00 51.30
17:02:00 0.00 72.65
17:02:05 0.00 44.89

During this time, java app launch several thousands of select sentences.

Why is happening this amount of semaphore usage if we are not writing,
only reading???

Thank you.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pedro Baldanta <pjbs39(at)tid(dot)es>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Solaris excesive semaphores usage.
Date: 2006-12-14 15:41:16
Message-ID: 20800.1166110876@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Pedro Baldanta <pjbs39(at)tid(dot)es> writes:
> PostgreSQL 8.0.1
> SunOS relayprod02 5.9 Generic_118558-19 sun4u sparc SUNW,Sun-Fire-V440
> -> Solaris 9 on Sparc processor.
> We are running java app over PostgreSQL. Everything works fine but we
> detected high semaphore usage during a heavy query process.

This sounds like a context swap storm ... search the archives for that
phrase, and then consider moving onto a more recent PG release.

regards, tom lane