Difference between revisions of "BLT"

From Second Life Wiki
Jump to navigation Jump to search
Line 11: Line 11:
If you confirm a bug under one of the test scenarios listed below, the following format should be used in the reproduction in a Jira comment:
If you confirm a bug under one of the test scenarios listed below, the following format should be used in the reproduction in a Jira comment:


BLT#
Incoming Latency:
Percentage reproduction ##%
Outgoing Latency:
Packet Loss Parameters:


Followed by the step-by-step reproduction of the bug, under the BLT conditions listed.
Followed by the step-by-step reproduction of the bug, under the BLT conditions listed.


== Rules ==
== Rules ==
* If the reproduction percentage is less than 100%, you should try other BLT scenarios.  If none are 100%, list all scenarios that reproduced the bug with the percentage for each. 
* When testing a patch for the bug, every scenario listed on the bug as a reproduction scenario must be tested, and all should be 0% reproduction. 


* A partial fix should be noted as such in the Jira comments, along with which scenarios still fail.
* A partial fix should be noted as such in the Jira comments, along with which scenarios still fail.
* If you can create a new scenario to reproduce the bug 100%, add that scenario to this page and assign it a BLT number.


* High percentage reproductions of a bug justify placing that bug on the upcoming triage schedule, if it is not already imported into private Jira.
* High percentage reproductions of a bug justify placing that bug on the upcoming triage schedule, if it is not already imported into private Jira.
Line 52: Line 47:
== BLT Scenarios ==
== BLT Scenarios ==


NOTE: wherever it says "change dev" below replace that with "add dev" if it is your first scenario.
NOTE: wherever it says "change dev" below replace that with "add dev" if it is your first scenario. Change eth0 to reflect whatever interface you use.  


=== BLT0 ===


Insane unrealistic latency.
# Asymmetric Latency
 
<pre>
tc qdisc change dev eth0 root netem delay 500ms
tc qdisc change dev ifb0 root netem delay 500ms
</pre>
 
This is good for reproducing a bug when all else fails.  Try this one first, then try the lesser scenarios.  If the lesser scenarios still repro it, use them instead.
 
=== BLT1 ===
 
300ms asymmetric latency


<pre>
<pre>
tc qdisc change dev eth0 root netem delay 300ms
tc qdisc change dev eth0 root netem delay 300ms
</pre>
</pre>
Change eth0 to reflect whatever interface you use. This adds 300ms of latency on top of whatever was already there.  This is an asymmetric latency, it is only on outgoing packets.
  This adds 300ms of latency on top of whatever was already there.  This is an asymmetric latency, it is only on outgoing packets.


=== BLT2 ===


Symmetric 150ms latency. (300ms ping)
# Symmetric latency.


<pre>
<pre>
tc qdisc change dev eth0 root netem delay 150ms
tc qdisc change dev eth0 root netem delay 500ms
tc qdisc change dev ifb0 root netem delay 150ms
tc qdisc change dev ifb0 root netem delay 500ms
</pre>
This scenario is similar to some far-flung international user's connections.  Note that due to bandwidth*delay product, this scenario also constrains TCP bandwidth in nearly all cases.  MS Vista, with dynamic window sizing up to 8megs, and linux, with generally better window settings, may perform better than other OS (especially old windows, which had terrible window settings) on this scenario, so beware.
 
=== BLT3 ===
 
Symmetric 75ms latency. (150ms ping)
<pre>
tc qdisc change dev eth0 root netem delay 75ms
tc qdisc change dev ifb0 root netem delay 75ms
</pre>
</pre>
Watered down version of BLT2.  Simulates most of Europe.


=== BLT4 ===
This is good for reproducing a bug when all else fails.  Try this one first, then try the lesser scenarios.  If the lesser scenarios still repro it, mention them instead.


Symmetric 40ms latency. (80ms ping)
150ms symmetric is similar to some far-flung international user's connections. Note that due to bandwidth*delay product, this scenario also constrains TCP bandwidth in nearly all casesMS Vista, with dynamic window sizing up to 8megs, and linux, with generally better window settings, may perform better than other OS (especially old windows, which had terrible window settings) on this scenario, so beware.
<pre>
tc qdisc change dev eth0 root netem delay 40ms
tc qdisc change dev ifb0 root netem delay 40ms
</pre>
Watered down version of BLT3Simulates East Coast if you are on the West Coast.


=== BLT5 ===
Symmetric 75ms latency is similar to europe (or SF to East Coast), symmetric 40ms latency is similar to East Coast to TX.


Variable Latency
# Variable Latency
<pre>
<pre>
tc qdisc change dev eth0 root netem delay 200ms 200ms 50%
tc qdisc change dev eth0 root netem delay 200ms 200ms 50%
Line 111: Line 78:
This adds variable round trip latency from 0-400ms.
This adds variable round trip latency from 0-400ms.


 
# Emulated Satellite internet
=== BLT6 ===
 
Satellite internet
<pre>
<pre>
tc qdisc change dev eth0 root netem delay 350ms 50ms 50%
tc qdisc change dev eth0 root netem delay 350ms 50ms 50%
Line 123: Line 87:
In reality, satellite internet isn't THIS bad, because they do use TCP acceleration which converts TCP into a sort of UDP-esqe stream to avoid bandwidth-delay product problems that severely constrain bandwidth in this scenario.  The latency and loss figures, are however accurate.
In reality, satellite internet isn't THIS bad, because they do use TCP acceleration which converts TCP into a sort of UDP-esqe stream to avoid bandwidth-delay product problems that severely constrain bandwidth in this scenario.  The latency and loss figures, are however accurate.


=== BLT7 ===
#Packet Loss


Low bursty packet loss
Low bursty packet loss
Line 130: Line 94:
tc qdisc change dev ifb0 root netem loss 0.3% 33.33%
tc qdisc change dev ifb0 root netem loss 0.3% 33.33%
</pre>
</pre>
=== BLT8 ===


High bursty packet loss
High bursty packet loss
Line 137: Line 100:
tc qdisc change dev ifb0 root netem loss 3.0% 33.33%
tc qdisc change dev ifb0 root netem loss 3.0% 33.33%
</pre>
</pre>
=== BLT9 ===


Insane packet loss
Insane packet loss

Revision as of 19:49, 1 August 2007

Bandwidth and Latency Testing (BLT) Protocol

Latency, packet loss, and low bandwidth related bugs are a major problem in Second Life. One huge barrier to fixing these bugs is a lack of testing protocol to reproduce these bugs that will rarely show up for someone who lives in San Francisco, or even in America. The BLT Protocol aims to create a standardized set of test conditions that can be referred to in reproductions, and tested against during QA.

This meta-bug contains all bugs that might be related to latency, bandwidth, or packet loss: MISC-506


Reproducing a bug

If you confirm a bug under one of the test scenarios listed below, the following format should be used in the reproduction in a Jira comment:

Incoming Latency: Outgoing Latency: Packet Loss Parameters:

Followed by the step-by-step reproduction of the bug, under the BLT conditions listed.

Rules

  • A partial fix should be noted as such in the Jira comments, along with which scenarios still fail.
  • High percentage reproductions of a bug justify placing that bug on the upcoming triage schedule, if it is not already imported into private Jira.

Test Setup

Testing is done with the linux kernel traffic shaping and WAN emulation modules.

http://linux-net.osdl.org/index.php/Netem

Note that you will be missing the "tc" module on Ubuntu boxes, unless you get the Gutsy beta release. They just screwed up and forgot to compile it for several versions, it's a standard kernel module that should be compiled on most distros.

For scanarios that require incoming packet adjustments:

modprobe ifb
ip link set dev ifb0 up
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: \ 
  protocol ip u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb0

Replace eth0 with your interface. This is required for any scenario that mentions "ifb0"

NOTE: wherever it says "add dev" replace that with "change dev" if you are already running one scenario.

BLT Scenarios

NOTE: wherever it says "change dev" below replace that with "add dev" if it is your first scenario. Change eth0 to reflect whatever interface you use.


  1. Asymmetric Latency
tc qdisc change dev eth0 root netem delay 300ms
This adds 300ms of latency on top of whatever was already there.  This is an asymmetric latency, it is only on outgoing packets.


  1. Symmetric latency.
tc qdisc change dev eth0 root netem delay 500ms
tc qdisc change dev ifb0 root netem delay 500ms

This is good for reproducing a bug when all else fails. Try this one first, then try the lesser scenarios. If the lesser scenarios still repro it, mention them instead.

150ms symmetric is similar to some far-flung international user's connections. Note that due to bandwidth*delay product, this scenario also constrains TCP bandwidth in nearly all cases. MS Vista, with dynamic window sizing up to 8megs, and linux, with generally better window settings, may perform better than other OS (especially old windows, which had terrible window settings) on this scenario, so beware.

Symmetric 75ms latency is similar to europe (or SF to East Coast), symmetric 40ms latency is similar to East Coast to TX.

  1. Variable Latency
tc qdisc change dev eth0 root netem delay 200ms 200ms 50%
tc qdisc change dev ifb0 root netem delay 200ms 200ms 50%

This adds variable round trip latency from 0-400ms.

  1. Emulated Satellite internet
tc qdisc change dev eth0 root netem delay 350ms 50ms 50%
tc qdisc change dev ifb0 root netem delay 350ms 50ms 50%
tc qdisc change dev eth0 root netem loss 0.3% 33.33%
tc qdisc change dev ifb0 root netem loss 0.3% 33.33%

In reality, satellite internet isn't THIS bad, because they do use TCP acceleration which converts TCP into a sort of UDP-esqe stream to avoid bandwidth-delay product problems that severely constrain bandwidth in this scenario. The latency and loss figures, are however accurate.

  1. Packet Loss

Low bursty packet loss

tc qdisc change dev eth0 root netem loss 0.3% 33.33%
tc qdisc change dev ifb0 root netem loss 0.3% 33.33%

High bursty packet loss

tc qdisc change dev eth0 root netem loss 3.0% 33.33%
tc qdisc change dev ifb0 root netem loss 3.0% 33.33%

Insane packet loss

tc qdisc change dev eth0 root netem loss 15.0% 33.33%
tc qdisc change dev ifb0 root netem loss 15.0% 33.33%