Re: race on multi-processor solaris
From: David Butenhof (David.Butenhof_at_hp.com)
Date: 12/04/03
- Next message: Vikas Agnihotri: "Re: Diagnosing performance problems"
- Previous message: Graham Lee: "Re: top: 50% iowait, 900M swap in use"
- In reply to: David Schwartz: "Re: race on multi-processor solaris"
- Next in thread: Joe Seigh: "Re: race on multi-processor solaris"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 04 Dec 2003 09:28:39 -0500
David Schwartz wrote:
>> The bulk of the scalability in Solaris is from a focused effort to
>> reduce contention by improving the design of data structures and
>> locking strategies. Much of this work has been data-driven. (using
>> tools like lockstat(1m) to find actual contention points and fixing
>> them)
>
> And this is what I've been trying to say. Contention is bad.
> Algorithms
> based upon locks prevent contention by descheduling jobs that would
> contend with each other. Lock-free algorithms increase contention by
> allowing contending threads to continue to run concurrently.
This is even more true when you get beyond small-scale SMP systems to
large-scale NUMA memory systems. The single key to performance is to REMOVE
contention. That means careful strategies in data subsetting and alignment,
not in locking (or nonlocking) algorithms. And spinning on any memory is
unthinkably evil -- even kernel "spinlocks" need to do some creative
multi-level synchronization gymnastics (e.g., Mellor-Crummy/Scott
algorithms) so that non-local processors have a chance in heck of ever
making any progress at all. (SenderX's favorite lock-free guarantee that
"someone" is making progress is of no use at all unless the contenders are
100% symmetrical, and that's never the case for common OS shared resource
"choke points".)
Still, of course, some lock-free algorithms can also be decentralized based
on memory locality. (For example many [though not all] "queues" could be
transparently organized as local memory branches off a shared root.)
-- /--------------------[ David.Butenhof@hp.com ]--------------------\ | Hewlett-Packard Company Tru64 UNIX & VMS Thread Architect | | My book: http://www.awl.com/cseng/titles/0-201-63392-2/ | \----[ http://homepage.mac.com/dbutenhof/Threads/Threads.html ]---/
- Next message: Vikas Agnihotri: "Re: Diagnosing performance problems"
- Previous message: Graham Lee: "Re: top: 50% iowait, 900M swap in use"
- In reply to: David Schwartz: "Re: race on multi-processor solaris"
- Next in thread: Joe Seigh: "Re: race on multi-processor solaris"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|