[libdispatch-dev] GCD MPM for Apache

Robert N. M. Watson robert at fledge.watson.org
Wed May 19 12:05:44 PDT 2010

On 19 May 2010, at 14:49, Bobby Powers wrote:

> yes, that is excellent!  any word on performance?

I've not attempted to characterize Mac OS X performance. On FreeBSD at a rough hand-wave on two quad-core systems linked by 10gbps ethernet, I'm seeing slightly lower mean performance with much higher variance, which may be a property of using the GCD userspace thread parts as opposed to the Mac OS X workqueue parts. I hope to have a chance to take a closer look at this in the next couple of weeks, including seeing how Stacey's pthread workqueue stuff works out. This is with no attempts at performance optimization, however.


> bobby
> On Tue, May 11, 2010 at 11:58 AM, David Leimbach <leimy2k at gmail.com> wrote:
>> That's just great!
>> On Tue, May 11, 2010 at 11:48 AM, Robert N. M. Watson
>> <robert at fledge.watson.org> wrote:
>>> Dear all:
>>> I'm pleased to announce a new GCD-related software project, a GCD MPM for
>>> Apache. Apache Multi-Processing Modules (MPMs) allow operating systems to
>>> provide execution and concurrency structure to Apache: processes, threads,
>>> event management primitives, etc.  It is intended to illustrate both GCD's
>>> programming model and programmability benefits, as well as how GCD can be
>>> integrated into a existing large-scale and thread-aware application. A quick
>>> skim of the code will bring to light some of its key benefits: a work model
>>> integrated with the GCD concurrency framework avoids complex utility
>>> libraries to distribute work and manage concurrency, and the integration of
>>> C Blocks into the programming language avoids the complexity-overhead of a
>>> message passing model. The GCD MPM is experimental and illustrative, but we
>>> hope it will also be useful in the future!
>>> The patch and instructions for applying it can be found on the Mac OS X
>>> forge web page:
>>>  http://libdispatch.macosforge.org/trac/wiki/apache
>>> In the GCD MPM, connections are associated with dispatch queues, which
>>> enforce ordered processing of a connection, but allows connections to float
>>> across actual OS-provided threads via GCD. The web page says more about the
>>> approach, but one interesting observation is that the implementation is
>>> around 950 lines of code, vs. the threaded models which come in 1.6x-3x the
>>> number of lines.
>>> Thanks to Apple for their support of this project!
>>> Robert Watson
>>> University of Cambridge
>>> Computer Laboratory
>>> _______________________________________________
>>> libdispatch-dev mailing list
>>> libdispatch-dev at lists.macosforge.org
>>> http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev
>> _______________________________________________
>> libdispatch-dev mailing list
>> libdispatch-dev at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev

More information about the libdispatch-dev mailing list