CLI: Bandwidth Throttling

Learn how to use the CLI to manage upload and download bandwidth.


Overview

Bandwidth Throttling allows you to control the rate of data transfer DryvIQ uses when running jobs. By setting limits on bandwidth usage, you can optimize network performance and prevent saturation. This page explains how to configure bandwidth throttling using the DryvIQ command-line interface (CLI).

SkySync References

The CLI references SkySync. This is expected. 

 

Parameters

Parameter Description

upload

u

Sets the upload bandwidth throttling

download

d

Sets the download bandwidth throttling

List Throttling Configuration

node bin/skysync.js performance bandwidth_throttle show --json

Example Result

[
  {
    "upload": {
      "disabled": false,
      "bytes_per_second": 504000,
      "window": [
        {
          "bytes_per_second": 222444,
          "days": [
            "monday",
            "tuesday",
            "friday",
            "saturday"
          ],
          "start_time": {
            "hr": 2,
            "min": 2,
            "sec": 0,
            "ms": 0
          },
          "end_time": {
            "hr": 12,
            "min": 13,
            "sec": 0,
            "ms": 0
          }
        }
      ]
    },
    "download": {
      "disabled": true,
      "bytes_per_second": 151316851,
      "window": [
        {
          "bytes_per_second": 2000,
          "days": [
            "monday"
          ],
          "start_time": {
            "hr": 7,
            "min": 12,
            "sec": 0,
            "ms": 0
          },
          "end_time": {
            "hr": 16,
            "min": 36,
            "sec": 0,
            "ms": 0
          }
        }
      ]
    }
  }
]

Updating Throttling Configuration

If the disabled flag on the upload or download is set to true, both configurations will be ignored.

Setting Upload Throttling

Example 1

node bin/skysync.js performance bandwidth_throttle update --upload '{ "bytes_per_second": 504000, "disabled": false, "window": [ { "bytes_per_second": 222444, "days" : ["Monday", "Tuesday", "Friday", "Saturday"], "start_time": { "hr": 2, "min": 2, "sec": 0 },"end_time": { "hr": 12, "min": 12, "sec": 0 } }]}'

Example 2

node bin/skysync.js performance bandwidth_throttle update --u '{ "bytes_per_second": 504000, "disabled": false, "window": [ { "bytes_per_second": 222444, "days" : ["Monday", "Tuesday", "Friday", "Saturday"], "start_time": { "hr": 2, "min": 2, "sec": 0 },"end_time": { "hr": 12, "min": 12, "sec": 0 } }]}'

Example 3

node bin/skysync.js performance bandwidth_throttle update --upload-file {name_of_file}.json

Example 4

node bin/skysync.js performance bandwidth_throttle update --uf {name_of_file}.json

Setting Download Throttling

Example 1

node bin/skysync.js performance bandwidth_throttle update --download '{ "bytes_per_second": 504000, "disabled": false, "window": [ { "bytes_per_second": 222444, "days" : ["Monday", "Tuesday", "Friday", "Saturday"], "start_time": { "hr": 2, "min": 2, "sec": 0 },"end_time": { "hr": 12, "min": 12, "sec": 0 } }]}'

Example 2

node bin/skysync.js performance bandwidth_throttle update --d '{ "bytes_per_second": 504000, "disabled": false, "window": [ { "bytes_per_second": 222444, "days" : ["Monday", "Tuesday", "Friday", "Saturday"], "start_time": { "hr": 2, "min": 2, "sec": 0 },"end_time": { "hr": 12, "min": 12, "sec": 0 } }]}'

Example 3

node bin/skysync.js performance bandwidth_throttle update --download-file {name_of_file}.json

Example 4

node bin/skysync.js performance bandwidth_throttle update --df {name_of_file}.json

Sample JSON File Used for Update

{
    "bytes_per_second": 151316851,
    "disabled": false,
    "window": [
        {
            "bytes_per_second": 0,
            "days": ["monday"],
            "start_time": {
                "hr": 7,
                "min": 12
            },
            "end_time": {
                "hr": 16,
                "min": 36
            }
        },
        {
            "bytes_per_second": 0,
            "days": ["wednesday", "friday"],
            "start_time": {
                "hr": 8,
                "min": 52
            },
            "end_time": {
                "hr": 21,
                "min": 48
            }
        },
        {
            "bytes_per_second": 6000,
            "days": ["tuesday", "thursday"],
            "start_time": {
                "hr": 8,
                "min": 52
            },
            "end_time": {
                "hr": 21,
                "min": 48
            }
        }
    ]
}

When bandwidth throttling is set through the CLI, the changes will be reflected on the Performance page in the Settings once the page is refreshed.