max msg size

bridged with qdn.public.qnxrtp.os
Post Reply
Mario Charest

max msg size

Post by Mario Charest » Tue Sep 26, 2000 2:32 pm

I could find anywhere in the doc the maximum size of a message, MsgSend()
Is there a difference if message is local or goes across network.

I know at one point there was a maximum of 4Megs for operation like
write(), I was told this limit would be removed, was it?

- Mario

Brian Stecher

Re: max msg size

Post by Brian Stecher » Wed Sep 27, 2000 2:18 pm

Mario Charest <mcz@videotron.ca> wrote:
I could find anywhere in the doc the maximum size of a message, MsgSend()
Is there a difference if message is local or goes across network.
There's no max size per say, but a MsgReceive*() from a remote client
will only return the first 8K of a message, no matter how big the original
message was. The remainder of the message can be obtained by using the
MsgRead*() functions (all in one fell swoop if you want). The rationale
for this is to prevent the OS from having to buffer a multi-megabyte
message until the server does a receive. It shouldn't cause too much
grief for people since most servers just do a MsgReceive*() to get the
message header and then a MsgRead*() to get any big data portion of
the message.
I know at one point there was a maximum of 4Megs for operation like
write(), I was told this limit would be removed, was it?
Yes it has been.

--
Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8

Steven Dufresne

Re: max msg size

Post by Steven Dufresne » Wed Sep 27, 2000 4:15 pm

Brian Stecher <bstecher@qnx.com> wrote:
Mario Charest <mcz@videotron.ca> wrote:

I could find anywhere in the doc the maximum size of a message, MsgSend()
Is there a difference if message is local or goes across network.

There's no max size per say, but a MsgReceive*() from a remote client
will only return the first 8K of a message, no matter how big the original
message was.
Note that this 8K thing is taken care of for you by the resource
manager library, provided you are writing a resource manager of course.
The library does MsgRead() to get at least the minimum of what the
sender is sending and what the receiver is asking for. You still
have to worry about your receive buffer being too small
for what the client is sending just as you do in the local case.
The remainder of the message can be obtained by using the
MsgRead*() functions (all in one fell swoop if you want). The rationale
for this is to prevent the OS from having to buffer a multi-megabyte
message until the server does a receive. It shouldn't cause too much
grief for people since most servers just do a MsgReceive*() to get the
message header and then a MsgRead*() to get any big data portion of
the message.

I know at one point there was a maximum of 4Megs for operation like
write(), I was told this limit would be removed, was it?

Yes it has been.

--
Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8

Mario Charest

Re: max msg size

Post by Mario Charest » Wed Sep 27, 2000 4:32 pm

"Brian Stecher" <bstecher@qnx.com> wrote in message
news:8qsvju$j5m$1@nntp.qnx.com...
Mario Charest <mcz@videotron.ca> wrote:

I could find anywhere in the doc the maximum size of a message,
MsgSend()
Is there a difference if message is local or goes across network.

There's no max size per say, but a MsgReceive*() from a remote client
will only return the first 8K of a message, no matter how big the original
message was. The remainder of the message can be obtained by using the
MsgRead*() functions (all in one fell swoop if you want). The rationale
for this is to prevent the OS from having to buffer a multi-megabyte
message until the server does a receive. It shouldn't cause too much
grief for people since most servers just do a MsgReceive*() to get the
message header and then a MsgRead*() to get any big data portion of
the message.
Ok, Mr documentation, are ya listening ;-)

One think isn't clear in my mind Brian, why would the OS need to buffer?

I know at one point there was a maximum of 4Megs for operation like
write(), I was told this limit would be removed, was it?

Yes it has been.

--
Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M
1W8

Donna Kinsman

Re: max msg size

Post by Donna Kinsman » Wed Sep 27, 2000 4:41 pm

Mario Charest <mcz@videotron.ca> wrote:
"Brian Stecher" <bstecher@qnx.com> wrote in message
news:8qsvju$j5m$1@nntp.qnx.com...
Mario Charest <mcz@videotron.ca> wrote:

I could find anywhere in the doc the maximum size of a message,
MsgSend()
Is there a difference if message is local or goes across network.

There's no max size per say, but a MsgReceive*() from a remote client
will only return the first 8K of a message, no matter how big the original
message was. The remainder of the message can be obtained by using the
MsgRead*() functions (all in one fell swoop if you want). The rationale
for this is to prevent the OS from having to buffer a multi-megabyte
message until the server does a receive. It shouldn't cause too much
grief for people since most servers just do a MsgReceive*() to get the
message header and then a MsgRead*() to get any big data portion of
the message.

Ok, Mr documentation, are ya listening ;-)
Actually, it's Mrs., Ms. whatever ;-)

Yep. Just reading it now (there seems to be a higher
volume of news to read through today!)
-Donna

One think isn't clear in my mind Brian, why would the OS need to buffer?
I know at one point there was a maximum of 4Megs for operation like
write(), I was told this limit would be removed, was it?

Yes it has been.

--
Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M
1W8

Mario Charest

Re: max msg size

Post by Mario Charest » Wed Sep 27, 2000 5:35 pm

"Donna Kinsman" <dkinsman@qnx.com> wrote in message
news:8qt80n$n91$1@nntp.qnx.com...
Mario Charest <mcz@videotron.ca> wrote:

"Brian Stecher" <bstecher@qnx.com> wrote in message
news:8qsvju$j5m$1@nntp.qnx.com...
Mario Charest <mcz@videotron.ca> wrote:

I could find anywhere in the doc the maximum size of a message,
MsgSend()
Is there a difference if message is local or goes across network.

There's no max size per say, but a MsgReceive*() from a remote client
will only return the first 8K of a message, no matter how big the
original
message was. The remainder of the message can be obtained by using the
MsgRead*() functions (all in one fell swoop if you want). The rationale
for this is to prevent the OS from having to buffer a multi-megabyte
message until the server does a receive. It shouldn't cause too much
grief for people since most servers just do a MsgReceive*() to get the
message header and then a MsgRead*() to get any big data portion of
the message.

Ok, Mr documentation, are ya listening ;-)


Actually, it's Mrs., Ms. whatever ;-)

French brain cells are trying to resurface ;-)
Yep. Just reading it now (there seems to be a higher
volume of news to read through today!)
Notice that to, lol!
-Donna


One think isn't clear in my mind Brian, why would the OS need to buffer?



I know at one point there was a maximum of 4Megs for operation like
write(), I was told this limit would be removed, was it?

Yes it has been.

--
Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M
1W8

David Gibbs

Re: max msg size

Post by David Gibbs » Wed Sep 27, 2000 9:48 pm

Mario Charest <mcz@videotron.ca> wrote:
"Brian Stecher" <bstecher@qnx.com> wrote in message
news:8qsvju$j5m$1@nntp.qnx.com...
Mario Charest <mcz@videotron.ca> wrote:

I could find anywhere in the doc the maximum size of a message,
MsgSend()
Is there a difference if message is local or goes across network.

There's no max size per say, but a MsgReceive*() from a remote client
will only return the first 8K of a message, no matter how big the original
message was. The remainder of the message can be obtained by using the
MsgRead*() functions (all in one fell swoop if you want). The rationale
for this is to prevent the OS from having to buffer a multi-megabyte
message until the server does a receive. It shouldn't cause too much
grief for people since most servers just do a MsgReceive*() to get the
message header and then a MsgRead*() to get any big data portion of
the message.

Ok, Mr documentation, are ya listening ;-)

One think isn't clear in my mind Brian, why would the OS need to buffer?
Locally, of course, the kernel doesn't need to -- it can know the state
and size of the buffers involved -- and a memory to memory copy is cheap
and fast.

But, accross the network, moving data is slow. Often someone will do
a MsgSend() before the receiving side has done a MsgReceive(). So,
we have a few choices:

-- only send notification that a status has changed, then wait until
receiver calls MsgReceive() and start copying the data accross the
network

-- starting sending the whole message at the time of the MsgSend() and
buffer it on the receiving side (the OS doing the buffering, or, well,
qnet in io-net)... of course, the data requirements for qnet could
very big. (This is what QNX4 does -- but the message is limitted to
(just under) 64k in size, limiting the amount of buffer that needs
to be created.)

-- starting sending the message immediately, but only send the first
(limitted amount) of the message. This limits the latency -- if
you pick your buffer size right, most messages will fit in it. It
limits your buffering overhead -- no message will take more than
a certain size.

-David

Post Reply

Return to “qdn.public.qnxrtp.os”