Hi,
I am using HTTP server based on Keil TCP/IP stack. It is very slow downloading my CSS, JS and HTML files.
I can see in Wireshark logs Keil stack is causing Retransmission of TCP packets that is why it is slow download files. some files are taking 3 seconds to download.
As compare Apache server. It very fast download only takes few milliseconds for same set of files.
Can we ask browser to cache some of the files.
Thanks, Naeem
I saw similar retransmission when I do multiple ajax calls without waiting for ajax call to finish.
I can guess browser is requesting multiple Get HTTP request simultaneous to fetch files.
I guess Keil TCP/IP Stack is not optimized to handle these situations as Apache have.
Any idea about lwIP stack comparison. Can we use lwIP stack with Keil RTOS.
I enabled Debug for Keil TCP. It is not starting and not coming into main function. I guess it requires more heap memory.
Of course you data needs to be split based on allowed packet sizes (MTU). But it's important how many packets that can be in flight waiting for acknowledge. If the stack has no buffers for receiving one more packet it must throw away incoming data. And with too few buffers it can't send out all required 1400-byte packets for the full files and instead need to stall the send until an acknowledge is received.
My files are 10k to about 50k. It will be transmit by Ethernet buffer which is max=1400 bytes into multiple packets similar to Apache server. I am trying to find why retransmission happens. I will enable the debugging feature to see more debug logs.
You have enough buffers so the server doesn't have to throw away data and handle later after a resend?
If you are using MDK v5.x with Middleware network component, you can enable the debugging feature to have more hints what caused the retransmissions. www.keil.com/.../network_create_app.html
View all questions in Keil forum