======================
Automatic bond tuning
======================

To easily offer optimum performance for a bond, Bonded Internet can
automatically test legs and update leg and bond settings with the ideal
values for a site. It can even be configured to test a bond when it
first comes online, and to automatically set the legs and bond with the
ideal settings. This is known as leg and bond tuning. It works by
running a series of speed tests on a leg or bond, analyzing the results,
and recommending download and upload speeds for each leg and the values
of important bond settings.

Automatic tuning requires that legs offer a reasonable level of
stability. If the leg or bond has considerable speed variation, as is
common with certain types of wireless and mobile broadband legs, testing
may fail because the software does not know how low it's acceptable to
set the leg speeds in order to get reasonable stability—only an
administrator with knowledge of the bandwidth requirements of the
particular site can make that decision. In this case, you can `tune the
bond manually <manual-bond-tuning.html>`__.

Leg tuning
-----------

During a leg tuning job, the leg is removed from the bond. If the bond
has only a single leg, this will interrupt customer traffic. 

To tune a leg, click the Actions button for the leg, then click "Detect
speeds."

|image0|

The tuning job is created and a number of tests are scheduled on the
leg. If the leg is offline, the test will wait until the leg comes back
online before starting to tune. As soon as a leg gets a test scheduled,
a notice is shown beside its icon on the bond details page:

|image1|

Bond tuning
------------

During parts of a bond tuning job, customer traffic is interrupted. Take
care to run tuning jobs only when it's acceptable to interrupt the
customer's network service.

As part of bond tuning, all the bond's active legs are tested in the
same way as running a leg tuning job. If any non-failover leg cannot be
tuned, the bond tuning job will fail, as it's not possible to detect
ideal bond settings if the legs speeds can't be determined. If a
failover leg cannot be tuned, the bond tuning job can still complete.

To tune a bond, click the bond Actions button, then click "Tune bond
settings."

|image2|

This opens a dialog with a number of options for the tuning job, as
follows:

Bonded throughput
^^^^^^^^^^^^^^^^^^

The minimum acceptable bond throughput as a percentage of the sum of all
leg's speeds. For example, if this value is 85%, the tuning will be
considered successful if a bond with 10 Mbps of total download bandwidth
and 2 Mbps of upload bandwidth reaches at least 8.5 Mbps upload and 1.7
Mbps upload.

Test stability
^^^^^^^^^^^^^^^

The stability level required to consider testing successful. High
stability tests require very stable speed results; this achieves the
greatest bonding efficiency but may not be suitable for wireless legs.
Accepting results with lower stability can reduce the overall efficiency
of the bond but allow legs with low stability to be tuned automatically.

Test length
^^^^^^^^^^^^

The length of each individual speed test. This can usually be left at
the default, 10 seconds, but may need to be increased when tuning cable
legs with a 20 or 30 second boost feature.

Accept recommended settings automatically
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If checked, this updates the leg and bond settings to the recommended
values if tuning is successful. If the tuning is cancelled or fails, no
settings are updated.

Schedule
^^^^^^^^^

Determines when the tuning is run.

-  Right now: begin the tuning process immediately
-  When all active legs are online: as soon as all active legs are
   online, begin the tuning process
-  At this time: begin the tuning at the selected time, up to 24 hours
   in the future

Cancelling a tuning
^^^^^^^^^^^^^^^^^^^^

Bond settings cannot be changed while a bond or leg test is underway. If
a bond must be updated before a test is finished, you can cancel a test
by clicking the "Cancel tuning" button at the top of the bond details
page. You can also cancel a scheduled tuning this way.

Reviewing tuning results
^^^^^^^^^^^^^^^^^^^^^^^^^

Tuning can take a while—up to 15 or 20 minutes or more depending on the
number of legs and the number of tests that need to be run to determine
the ideal settings. The user that executes the tuning job is sent an
email when the task finishes. When a tuning job is complete, a notice is
shown on the top of the bond details page offering a link to the tuning
results. This page offers the option to accept the tuning
recommendations and adjust leg and bond settings, or to decline the
recommendations and keep the current leg or bond settings.

Bond settings cannot be changed while a bond or leg test is underway. If
a bond must be updated before a test is finished, you can cancel a test
by clicking the "Cancel tuning" button at the top of the bond details
page.


.. |image0| image:: /attachments/11666131/11667778.png
.. |image1| image:: /attachments/11666131/11667779.png
.. |image2| image:: /attachments/11666131/11667781.png
