Thomas Buschmann
|
RE: resource manager performance
|
Thomas Buschmann
11/02/2007 9:58 AM
post2412
|
RE: resource manager performance
Thanks for detailed response. Probably the only way to know what the
overhead is for a specific application is to time it, which is what I'll
do. Thanks again!
Thomas
Am Freitag, den 02.11.2007, 08:42 -0400 schrieb Thomas Fletcher:
>
> > -----Original Message-----
> > From: Thomas Buschmann [mailto:buschmann@amm.mw.tum.de]
> > Sent: October 31, 2007 5:42 PM
> > To: general-community
> > Subject: resource manager performance
> >
> > I am just porting some real-time control software to qnx. I
> > would like to use resource managers for interfacing the
> > actual controller code with hardware-io (driver) code.
> > However, performance is very important for my application.
> > That's why I'm wondering how using a resource manager
> > compares with using other IPC methods (e.g. message queues)
> > performance-wise.
> > Typical read/write sizes would be only a few bytes, but there
> > are several reads and writes every msec. I guess the question
> > is, how high is the overhead of using the resource manager
> > framework compared to native message passing?
> > Any help would be greatly appreciated.
>
> A resource manager is really just a (relatively) thin layer on
> top of the native messaging. It provides a bit of a handshaking
> and authentication framework on top of the standard messaging
> API as well as a set of standardized messages (ie read/write).
>
> Once you have established a connection to your resource manager,
> (via open) the fd you work with is the same as a coid that you
> would have received if you had done a ConnectAttach().
>
> When you read/write on that fd, it is equivalent to performing
> a MsgSend with a standard message header. You can see the read/write
> implementation here:
> http://community.qnx.com/integration/viewcvs/viewcvs.cgi/trunk/lib/c/1/read.
> c?root=coreos_pub&rev=153052&system=exsy1001&view=markup
>
> Depending on what else you are doing in your system, performing
> hundreds or thousands of single byte read/writes every second
> is really not very efficient. You can do it, and the limiting
> factor is going to be the speed of your CPU and the frequency
> of the operations, but you might want to look at different
> alternatives.
>
> One alternative is the mq library that uses the asynchronous
> messaging framework. There is also an mqueue service that uses
> standard message passing, but your own custom resource manager
> will be more efficient in that case.
>
> Alternatively to that, it might be more worthwhile for the
> application to create a shared memory area that the server and
> clients can all access. It depends on what is being done with
> the data.
>
> To get a feel for the overhead, you can use the instrumented kernel
> and the system profiler tooling to see what is going on in the
> system and measure some of the typical latencies.
>
> Hope this helps,
> Thomas
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post2408
>
--
Dipl.-Ing. Thomas Buschmann
Technische Universitaet Muenchen
Lehrstuhl fuer Angewandte Mechanik
Boltzmannstrasse 15, D-85747 Garching
Phone: +49 89/289-15221
Fax : +49 89/289-15213
eMail: buschmann@amm.mw.tum.de
WWW : http://www.amm.mw.tum.de/People/buschmann.html
|
|
|