Re: Question about LWLockAcquire's use of semaphores instead of spinlocks

From: "Luis Alberto Amigo Navarro" <lamigo(at)atc(dot)unican(dot)es>
To: <bruc(at)acm(dot)org>
Cc: <bruc(at)acm(dot)org>, <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Question about LWLockAcquire's use of semaphores instead of spinlocks
Date: 2002-07-29 09:50:42
Message-ID: 008a01c236e5$67731080$cab990c1@atc.unican.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


----- Original Message -----
From: "Robert E. Bruccoleri" <bruc(at)stone(dot)congenomics(dot)com>
To: "Luis Alberto Amigo Navarro" <lamigo(at)atc(dot)unican(dot)es>
Cc: <bruc(at)acm(dot)org>; <tgl(at)sss(dot)pgh(dot)pa(dot)us>; <pgsql-hackers(at)postgresql(dot)org>
Sent: Monday, July 29, 2002 2:48 AM
Subject: Re: [HACKERS] Question about LWLockAcquire's use of semaphores
instead of spinlocks

> Dear Luis,
> I would be very interested. Replacing the IPC shared memory
> with an arena make a lot of sense. --Bob
>
On old PowerChallenge postgres works really fine, but in new NUMA
architectures postgres works so badly, as we have known, forked backends
don't allow IRIX to manage memory as it would be desired. Leaving First
Touch placement algorithm means that almost every useful data is placed on
the first node the process is run. Trying to use more than one node with
this schema results in a false sharing, secondary cache hits ratio drops
below 85% due to latency on a second node is about 6 times bigger than in
the first node even worse if you have more than 4 nodes. All of this causes
that you're almost only working with a node (4 cpus in origin 3000).
Implementing Round-Robin placement algorithms causes that memory pages are
placed each one in one node, this causes that all nodes have the same chance
to work with some pages locally and some pages remotely. The more the number
of nodes, the more advantage you can take with round-robin.
You can enable round-robin recompiling postgres, setting before the
enviroment variable _DSM_ROUND_ROBIN=TRUE
it works fine with fork(), and it is not necessary using sprocs.
Changing IPC shared memory for a shared arena could improve performance
because it's the native shared segment on IRIX. it's something we're willing
to do, but by now it is only a project.
Hope it helps

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 2002-07-29 10:01:19 Re: Virus Emails
Previous Message Luis Alberto Amigo Navarro 2002-07-29 09:32:46 question on backends