On Fri, Oct 21, 2011 at 4:16 PM, Julien Vermillard <jvermill...@gmail.com>wrote:

> On Fri, Oct 21, 2011 at 2:31 PM, Alex Karasulu <akaras...@apache.org>
> wrote:
> > On Fri, Oct 21, 2011 at 2:12 PM, Emmanuel Lecharny <elecha...@gmail.com
> >wrote:
> >
> >> On 10/21/11 12:56 PM, Zigor Salvador wrote:
> >>
> >>> Comments after using Wireshark to sniff on the packets being sent:
> >>>
> >>> On 20 Oct 2011, at 16:10, Emmanuel Lecharny wrote:
> >>>
> >>>  Each message sent and received on ethernet will use 1500 bytes, even
> if
> >>>> you transmit only one byte of data.
> >>>>
> >>> This is not correct.
> >>>
> >>> Using MINA's "no delay" option and sending around 439 bytes of data the
> >>> Ethernet frame captured by Wireshark reports a total frame length of
> 505
> >>> bytes.
> >>>
> >>
> >> That does not change the fact that Ethernet frames are 1500 bytes
> long...
> >>
> >>
> >>> (505 = 6 (MAC) + 6 (MAC) + 2 (Type) + 20 (IP header) + 32 (TCP header)
> +
> >>> 439 (data))
> >>>
> >>> If I enable Nagle's algorithm, several messages get crammed into a
> single
> >>> ethernet frame (up to the aforementioned MTU value).
> >>>
> >> Nagle algorithm is not a good idea for small messages, as you will have
> a
> >> delay between each messages, the system waiting for some more bytes to
> fill
> >> the PDU as much as it can before sending it to the client.
> >>
> >> It's usefull when sending big data, though.
> >>
> >>
> > Wondering if MINA can get a little smarter. Just a brain dump here ....
> what
> > if you know according to the protocol that you're going to get a certain
> > train of responses. Maybe there's a way to buffer and dump to fill to MTU
> > capacity?
> >
> > --
> > Best Regards,
> > -- Alex
> >
> It's not a kernel level matter ? to fill the packet to MTU limit using
> Naggle ?
>

Yes it is however if MINA at higher levels can pump more into the buffer
WITHOUT Naggle then you have a greater chance at filling to MTU.

Was just wondering if anticipating in advance what a response would look
like might help devise smarter buffering that leads to filling to MTU. I
might be pulling this out of my arse here .. as I said it's just a brain
dump. Maybe we're already doing as much as we possibly can.

-- 
Best Regards,
-- Alex

Reply via email to