This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: TCP/IP write() buffering question


On Thu, Sep 21, 2000 at 03:09:00PM +0200, Andrew Lunn wrote:

> > The problem is that each JavaScript write() causes a write() on
> > the socket, and the web page data is sent as a large number of
> > Ethernet packets containing a small number of bytes of data
> > each:

[...]

> > Is there a way to get the stack to do more buffering of write()
> > data so that the page goes out as fewer packets?
> 
> Is this a TCP stream of UDP? I know HTTP can use both. 

TCP

> For UDP you cannot do anything. Check if the push bit is set on
> the TCP packet.

It isn't

> See if the server is doing a setsockopt with TCP_NODELAY.

It doesn't seem to be.

It's possible that it isn't the fragmentation that's causing
the delays.  There may more overhead in the JavaScript
mechanism than I expected, but taking 2 seconds to generate a
15x3 table seems way too long for a 33MHz ARM that's not doing
anything else concurrently.

It looks like the delays between successive write() calls (a
few tens of milliseconds) is long enough that the stack is
shoving data out in small chunks. I need to spend some more
time trying to profile the server and figuring out where the
delays are coming from.

Thanks for the pointers.

-- 
Grant Edwards
grante@visi.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]