DragonFly users List (threaded) for 2005-01
Re: Messaging performance
:I currently have an application that uses SYSV Shared Memory to communicate
:between processes (1 server, many clients). How would this compare to the
:DragonflyBSD model of messaging I have been reading about on the website?
:Are there specific scenarios that would favour one or the other?
Well, what you are doing is communicating between two user processes.
What DragonFly is doing is kernel-internal messaging.
From a user process perspective, however, rolling your own (as you
seem to have done) is almost guarenteed to be faster then using a
kernel mechanism. I just committed two new system calls to DragonFly
to support user process blocking/wakeup operations, but I haven't
documented them yet.
Shared memory is definitely the way to go for message passing. Note
that you do not have to use SYSV shared memory... you can use mmap()
to share memory more easily. You can use mmap() coupled with
madvise()'s MADV_NOSYNC to tell the system not to periodically flush
the data to its backing store and it will be just as fast as SYSV
shared memory, and a whole lot easier to manage.