#10904 NORM Future : reduce txqueuelen

Zarro Boogs per Child bugtracker at laptop.org
Mon May 23 20:22:59 EDT 2011


#10904: reduce txqueuelen
--------------------------+-------------------------------------------------
 Reporter:  Quozl         |                 Owner:                                   
     Type:  defect        |                Status:  new                              
 Priority:  normal        |             Milestone:  Future Release                   
Component:  not assigned  |               Version:  Development build as of this date
 Keywords:                |           Next_action:  test in build                    
 Verified:  0             |   Deployment_affected:                                   
Blockedby:                |              Blocking:                                   
--------------------------+-------------------------------------------------
 All current builds leave txqueuelen set to the Linux default for gigabit
 ethernet; 1000 packets.  This leads to excessive transmit buffering when a
 TCP connection sends data from the laptop to a school server or another
 laptop.  This further leads to TCP not detecting available bandwidth, and
 overloading nearby infrastructure to the point that packets are dropped
 and network latency increases.

 Reported by Jim Gettys.

 Test procedure:
  * fs-update two laptops with os19,
  * configure a server and an access point, or use ad-hoc,
  * disable power management,
  * use ''ssh-keygen'' to create a local key, copy it to a server host, and
 place it in .ssh/authorized_keys,
  * obtain a 250 MB test file consisting of psuedo-random data or gzip
 output,
  * load the file into the cache of the laptops, such as by using ''time
 md5sum testfile'' two or three times, until the elapsed time does not
 improve,
  * use ''scp'' to copy the test file to the server, or the other laptop,
  * in another terminal tab, measure latency using ping, on both laptops,
 such as with ''ping -c 50'', and record the return trip time result line,
  * interrupt the ''scp'',
  * change txqueuelen for eth0 from 1000 to 1, repeat the previous three
 steps,
  * repeat the test for other interesting values of txqueuelen,
  * tabulate the results.

 Test 1: Access point with two associated laptops, copying a file to a
 server, measuring latency on both laptops to another server.

 ||''os build hardware''||''test''||''latency''||
 ||11.2.0 os19 xo-1.5||idle network||min 2.6ms avg 3.3ms max 23ms mdev
 2.9ms n 50||
 ||11.2.0 os19 xo-1.5||scp with txqueuelen 1000||min 3ms avg 931ms max
 1581ms mdev 338ms n 50||
 ||11.2.0 os19 xo-1.5||scp with txqueuelen 10||min 17ms avg 75ms max 227ms
 mdev 55ms n 50||
 ||11.2.0 os19 xo-1.5||scp with txqueuelen 1||min 2.6ms avg 3.0ms max 4.9ms
 mdev 0.5ms n 50||

 Latency impacts both laptops equally.  That is, when one laptop is sending
 data, all other laptops on the access point suffer high latency to the
 same extent.  The impact is almost immediate, and occurs for small test
 files as well.

 Test 2: Ad-hoc network with two laptops in close proximity, copying file
 between laptops, latency measured between laptops.

 ||''os build hardware''||''test''||''latency''||
 ||11.2.0 os19 xo-1.5||cat over ssh to /dev/null with txqueuelen 1000||min
 7.8ms avg 15.5ms max 136ms mdev 23 ms||
 ||11.2.0 os19 xo-1.5||cat over ssh to /dev/null with txqueuelen 1||min
 2.2ms avg 2.5ms max 3.8ms mdev 0.4ms||

 Conclusion: latency is greatly improved by removing transmit queue.  There
 was no significant effect on the time taken to copy the file.

 Recommendation: reduce txqueuelen and test collaboration performance.
 Especially in a school access point scenario.

-- 
Ticket URL: <http://dev.laptop.org/ticket/10904>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list