HTTPServer and Net::Poll through-put and performance

30 Dec 2010 . Edited: 30 Dec 2010

I am using a custom HTTPRequestHandler to serve files via HTTP from the LPC1768. I was very disappointed that I get download rates of only ~ 2.5 kB/s. Has anybody experienced similar issues? I'd also be very grateful for any suggestions of how to improve the performance?

Unfortunately, it seems I cannot modify (or even access?) the source code of the EtherNetIf library, so that I have no clue where possible improvements could be done.

Most of the time seems to be spent between calling writeData() and the next call of onWriteable(). I doubt that it takes so long to send out one TCP packet...

The rate also seems to depend strongly on the buffer size. If I am calling writeData() with a buffer size of 128 B, I get 256 B/s, if I am using 512 B, I get the 2.5 kB/s from above, with 1024 B I get 6.2 kB/s.