pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedlocking/performance, Solaris performance discovery
3+ messages / 2 participants
[nested] [flat]
* locking/performance, Solaris performance discovery
@ 2003-10-06 13:33 Jeff <threshar@torgo.978.org>
2003-10-06 14:30 ` Re: locking/performance, Solaris performance discovery Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Jeff @ 2003-10-06 13:33 UTC (permalink / raw)
To: Andrew Sullivan <andrew@libertyrms.info>; +Cc: pgsql-performance
On Mon, 6 Oct 2003, Andrew Sullivan wrote:
> There's plenty of academic work which purports to show that LRU is
> far from the best choice. Just in principle, it seems obvious that a
> single-case seqscan-type operation (such as vacuum does) is a good
> way to lose your cache for no real gain.
>
Logically bypassing caches for a seq scan also makes sense.
> Interestingly, we're contemplating ditching Solaris because of the
> terrible reliability we're getting from the hardware.
>
The reason ops likes solaris / sun is twofold. 1. we have a pile of big
sun machines around. 2. Solaris / Sun is quite a bit more graceful in the
egvent of a hardware failure. We've burned out our fair share of cpu's
etc and solaris has been rather graceful about it.
I've started profiling and running tests... currently it is leaning
towards the sysv semaphores. I see in src/backend/port/ that pg_sema.c is
linked to the sysv implementation. So what I did was create a
semaphore set, and then fired off 5 copies of a program that attaches
to that semaphore and then locks/unlocks it 1M times.
2xP2-450, Linux 2.4.18: 1 process: 221680 / sec, 5 process: 98039 / sec
4xUltraSparc II-400Mhz, Solaris 2.6: 1 proc: 142857 / sec, 5 process:
23809
So I'm guessing that is where a LOT of the suck is coming from.
What I plan to do next is looking to see if there are other interprocess
locking mechanisms on solaris (perhaps pthread_mutex with that
inter-process flag or something) to see if I can get those numbers a
little closer.
--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: locking/performance, Solaris performance discovery
2003-10-06 13:33 locking/performance, Solaris performance discovery Jeff <threshar@torgo.978.org>
@ 2003-10-06 14:30 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-10-06 15:16 ` Re: locking/performance, Solaris performance discovery Jeff <threshar@torgo.978.org>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2003-10-06 14:30 UTC (permalink / raw)
To: Jeff <threshar@torgo.978.org>; +Cc: Andrew Sullivan <andrew@libertyrms.info>; pgsql-performance
Jeff <threshar@torgo.978.org> writes:
> I've started profiling and running tests... currently it is leaning
> towards the sysv semaphores. I see in src/backend/port/ that pg_sema.c is
> linked to the sysv implementation.
Does Solaris have Posix semaphores? You could try using those instead.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: locking/performance, Solaris performance discovery
2003-10-06 13:33 locking/performance, Solaris performance discovery Jeff <threshar@torgo.978.org>
2003-10-06 14:30 ` Re: locking/performance, Solaris performance discovery Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-10-06 15:16 ` Jeff <threshar@torgo.978.org>
0 siblings, 0 replies; 3+ messages in thread
From: Jeff @ 2003-10-06 15:16 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrew Sullivan <andrew@libertyrms.info>; pgsql-performance
On Mon, 6 Oct 2003, Tom Lane wrote:
>
> Does Solaris have Posix semaphores? You could try using those instead.
>
> regards, tom lane
Yep. It does.
I learned them quick enough (using posix_sema.c as a guide)
and found out that at least on Sol 2.6 they are slower than sysv - with 5
processes it went to about 16k lock/unlock a second.
I'm going to try to find a box around here I can get sol(8|9) on that has
sufficient disk space and see. I'm guessing sun has likely made
improvements...
Another odd thing I'm trying to work out is why my profiles come out so
radically different on the linux box and the sun box.
Sun:
31.17 18.90 18.90 internal_mcount
19.10 30.48 11.58 8075381 0.00 0.00 _bt_checkkeys
5.66 33.91 3.43 24375253 0.00 0.00 FunctionCall2
4.82 36.83 2.92 8073010 0.00 0.00 _bt_step
3.51 38.96 2.13 14198 0.15 0.15 _read
2.77 40.64 1.68 8069040 0.00 0.00 varchareq
2.59 42.21 1.57 28454 0.06 0.23 _bt_next
2.29 43.60 1.39 1003 1.39 1.40 AtEOXact_Buffers
1.86 44.73 1.13 16281197 0.00 0.00 pg_detoast_datum
1.81 45.83 1.10 _mcount
1.68 46.85 1.02 2181 0.47 0.47 pglz_decompress
Linux:
11.14 0.62 0.62 1879 0.00 0.00 pglz_decompress
6.71 0.99 0.37 1004 0.00 0.00 AtEOXact_Buffers
3.80 1.20 0.21 1103045 0.00 0.00 AllocSetAlloc
3.23 1.38 0.18 174871 0.00 0.00 nocachegetattr
2.92 1.54 0.16 1634957 0.00 0.00 AllocSetFreeIndex
2.50 1.68 0.14 20303 0.00 0.00 heapgettup
1.93 1.79 0.11 1003 0.00 0.00 AtEOXact_CatCache
1.76 1.89 0.10 128442 0.00 0.00 hash_any
1.72 1.98 0.10 90312 0.00 0.00 FunctionCall3
1.69 2.08 0.09 50632 0.00 0.00 ExecTargetList
1.60 2.17 0.09 51647 0.00 0.00 heap_formtuple
1.55 2.25 0.09 406162 0.00 0.00 newNode
1.46 2.33 0.08 133044 0.00 0.00 hash_search
It is the same query with slightly different data (The Sun has probably..
20-40k more rows in the table the query hits).
I'll be digging up more info later today.
--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-10-06 15:16 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-06 13:33 locking/performance, Solaris performance discovery Jeff <threshar@torgo.978.org>
2003-10-06 14:30 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-10-06 15:16 ` Jeff <threshar@torgo.978.org>
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