Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Local (Unix domain) socket performance on QNX: (4 Items)
   
Local (Unix domain) socket performance on QNX  
I have been working on porting DBUS to the QNX Neutrino platform. Since QNX does not support abstract domain sockets, 
I've opted to use local (Unix domain) sockets which is also supported by DBUS. I have heard that QNX local domain 
sockets are very inefficient and perform poorly on many targets. Fortunately, DBUS does provide minimal hooks to 
abstract the transport mechanism and I was considering using the native QNX messaging API (MsgSend/MsgReceive, etc..) as
 the transport for DBUS on QNX. 

Before I undertake this effort, I want to be sure the local domain socket performance on QNX is indeed dismal. Have any 
QNX veterans had any experiences with it (either pro or con)? Can I realistically expect to see a significant 
performance improvement using the native QNX services as a transport vs. local sockets? Part of my reluctance in 
attempting this effort is the fact that it will effectively cause me to "fork" the DBUS code from the development branch
 which makes it much more difficult to maintain this code with new releases from Freedesktop.org.
Re: Local (Unix domain) socket performance on QNX  
> 
> I have been working on porting DBUS to the QNX Neutrino platform. Since QNX 
> does not support abstract domain sockets, I've opted to use local (Unix domain
> ) sockets which is also supported by DBUS. I have heard that QNX local domain 
> sockets are very inefficient and perform poorly on many targets. Fortunately, 
> DBUS does provide minimal hooks to abstract the transport mechanism and I was 
> considering using the native QNX messaging API (MsgSend/MsgReceive, etc..) as 
> the transport for DBUS on QNX. 
> 
> Before I undertake this effort, I want to be sure the local domain socket 
> performance on QNX is indeed dismal. Have any QNX veterans had any experiences
>  with it (either pro or con)? Can I realistically expect to see a significant 
> performance improvement using the native QNX services as a transport vs. local
>  sockets? Part of my reluctance in attempting this effort is the fact that it 
> will effectively cause me to "fork" the DBUS code from the development branch 
> which makes it much more difficult to maintain this code with new releases 
> from Freedesktop.org.

AF_LOCAL performance shouldn't be that bad.  They
share a lot of the same codepath as AF_INET which
we're able to get good performance out of.  Having
said that though local they aren't currently exercised
a lot as they're generally considered more of a
porting aid. Native message passing may be faster
depending on what you're doing.

-seanb

Re: Local (Unix domain) socket performance on QNX  
Would there be any advantage (from a performance perspective) of using the mq server to implement an asynchronous 
messaging facility instead of local domain sockets? Inherently, DBUS is a messaging protocol that supports (typically) 
two message buses - the system and session buses. These "buses" appear as mount points in the Linux file system and are 
typically specified in an environment variable so programs can find them. Ideally, I'd like to use an analogous 
mechanism in QNX that appears as a path in the file system. It seems that the mq server might offer this facility in a 
more efficient manner than the local domain socket approach. Is it possible for more than one process to send/receive to
 a mq or is a single producer/consumer model expected? I guess with local sockets a server (the bus daemon) can listen 
and handle multiple connections. I wasn't sure if the mq provides a similar facility.
Re: Local (Unix domain) socket performance on QNX  
On Tue, Nov 04, 2008 at 01:53:31PM -0500, Glenn Schmottlach wrote:
> Would there be any advantage (from a performance perspective) of using the mq server to implement an asynchronous 
messaging facility instead of local domain sockets? Inherently, DBUS is a messaging protocol that supports (typically) 
two message buses - the system and session buses. These "buses" appear as mount points in the Linux file system and are 
typically specified in an environment variable so programs can find them. Ideally, I'd like to use an analogous 
mechanism in QNX that appears as a path in the file system. It seems that the mq server might offer this facility in a 
more efficient manner than the local domain socket approach. Is it possible for more than one process to send/receive to
 a mq or is a single producer/consumer model expected? I guess with local sockets a server (the bus daemon) can listen 
and handle multiple connections. I wasn't sure if the mq provides a similar facility.

You can have multiple senders / receivers on a message queue.
Personally I'd do whatever is easiest since this whole dbus
thing seems a lot like the qnx message bus: attaching to the
namespace to receive messages.  The 'correct' port may be to
look at resmgr_attach() and native messaging which mqueue and
AF_LOCAL are based on.

-seanb