lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Improving LWIP performance


From: Karthik Vadambacheri Manian
Subject: [lwip-users] Improving LWIP performance
Date: Tue, 3 Aug 2010 19:20:25 -0400

Hi All,

I am trying to run a networking application(a simple pingpong) on a
light weight kernel named kitten. Kitten itself runs in a virtual
machine. The networking application uses LWIP for networking. This
pingpong application has a master and slave. Master application runs
in a separate kitten VM and slave application runs in a separate
kitten VM. Master sends some data of specific length to the slave. The
slave reads the data and sends the data back to master. The master
then reads that data. This constitutes one pingpong. I iterate this to
create a fixed number of pingpongs. I also calculate the time taken
for each pingpong and the mean time for the entire iteration.

I ran this application in Linux on a virtual machine and in kitten,
also in VM. When the iterations are less I get good performance
improvement in kitten using LWIP than tcpip. But when the iterations
are increased LWIP becomes very very slow than tcpip. I investigated
it using debug messages and found that the main reasons are:

   1) Discarding of packets due to checksum error
   2) Retransmissions of packets due to missing acknowledgement

for eg, The time taken for a pingpong without checksum issue is around
343 microsecs, while a pingpong with checksum issue causes around
1314067 microsecs. Also a pingpong with retransmissions due to missing
acknowledgement takes around 1107216 microsecs.

So my questions are:
1) Why do checksum errors occur even though I run everything in a
virtual machine and no hardware is involved? How can I reduce this?
         For a 1000 iterations of  pingpong I get around 5 checksum
issues in master and around 7 in slave. This badly affects the
performance.

2) How can I prevent acknowledgements from missing so that
retransmissions can be avoided?
         Also for 1000 iterations of pingpong I get around 10
retransmissions due to missing acknowledgement. This also leads to low
performance.

3) Some general tips on increasing performance with LWIP is much appreciated.

Note: Unfortunately I could do not know the LWIP version used in
kitten. I am trying to get it.

Thanks,
karthik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]