Skip to content

Settings

The masv-agent can be configured with the following settings:

  • upload and download rate limit schedules
  • fifo mode settings
  • disk write mode (serial vs parallel)

To configure these settings with a provisioning config file, see Provisioning.

Multiconnect

Enabling multiconnect allows the transfer-agent to transmit data using multiple active internet connections available to the host system.

In order to fetch the multiconnect status, use the following request:

curl 'http://localhost:8080/api/v1/settings/multiconnect'

In order to enable/disable multiconnect, use the following request:

curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/settings/multiconnect -d '{"enabled":true}'

To view the number of chunks on a given network interface, find the current interface ID's or to see other multiconnect related diagnostic information, use the following request:

curl http://localhost:8080/api/v1/settings/multiconnect/status

In order to enable/disable a specific interface once multiconnect has been enabled, use the following request:

curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/settings/multiconnect/ifaces/{iface_id} -d '{"enabled":true}'

Rate Limit Schedules

Rate limit schedules can be configured independently for both uploads and downloads.

The rate limit schedules allow the app to automatically limit the transfer bandwidth during certain times and days of the week. These limits are independent for uploads and downloads.

Note

For any of the following examples, the corresponding upload endpoint will be identical to the equivalent download endpoint, substituting download for upload

/api/v1/settings/download_rate_limit -> /api/v1/settings/upload_rate_limit

To see the current rate limit schedules, use the following request:

curl 'http://localhost:8080/api/v1/settings/download_rate_limit'

To update a rate limit schedule, use the following request:

curl 'http://localhost:8080/api/v1/settings/download_rate_limit' -H 'Content-Type: application/json' -d \
'{"rate_limit_bps":100000000,"enabled":true,"schedule_enabled":true,"schedule":{
  "fri":{"enabled":true,"end":"17:00","start":"09:00"},
  "mon":{"enabled":true,"end":"17:00","start":"09:00"},
  "sat":{"enabled":false,"end":"17:00","start":"09:00"},
  "sun":{"enabled":false,"end":"17:00","start":"09:00"},
  "thu":{"enabled":true,"end":"17:00","start":"09:00"},
  "tue":{"enabled":true,"end":"17:00","start":"09:00"},
  "wed":{"enabled":true,"end":"17:00","start":"09:00"}
}}'

To update a rate limit schedule for a specific interface when multiconnect is enabled, use the following request:

curl 'http://localhost:8080/api/v1/settings/download_rate_limit/{interface_id}' -H 'Content-Type: application/json' -d \
'{"rate_limit_bps":100000000,"enabled":true,"schedule_enabled":true,"schedule":{
  "fri":{"enabled":true,"end":"17:00","start":"09:00"},
  "mon":{"enabled":true,"end":"17:00","start":"09:00"},
  "sat":{"enabled":false,"end":"17:00","start":"09:00"},
  "sun":{"enabled":false,"end":"17:00","start":"09:00"},
  "thu":{"enabled":true,"end":"17:00","start":"09:00"},
  "tue":{"enabled":true,"end":"17:00","start":"09:00"},
  "wed":{"enabled":true,"end":"17:00","start":"09:00"}
}}'

To simply enable the rate limit without a corresponding schedule, use the following request:

curl 'http://localhost:8080/api/v1/settings/download_rate_limit' -H 'Content-Type: application/json' -d {"rate_limit_bps":100000000,"enabled":true,"schedule_enabled":false}'

To enable the rate limit without a corresponding schedule for a specific network interface while multiconnect is enabled, use the following request:

curl 'http://localhost:8080/api/v1/settings/download_rate_limit/{interface_id}' -H 'Content-Type: application/json' -d '{"rate_limit_bps":100000000,"enabled":true,"schedule_enabled":false}'

FIFO Mode

FIFO mode, when enabled, limits the allocated bandwidth to a number of uploads/downloads, specified when configuring the setting. Transfer priority by default is granted in the order transfers are created, with the oldest transfers getting priority first.

Example request:

curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/settings/fifo_mode -d '{"enabled":true,"active_download_count":1,"active_upload_count":1}'

Transfer FIFO ranks can be altered after creation with the following request:

curl -H "Content-Type: application/json" -X POST http://localhost:8080/api/v1/uploads/{upload_id}/fifo_rank -d '{"fifo_rank":1}'

curl -H "Content-Type: application/json" -X POST http://localhost:8080/api/v1/downloads/{download_id}/fifo_rank -d '{"fifo_rank":0}'

Disk Write Mode

By default, the service runs in parallel write mode, with the calibration mode set to manual. To change the disk write mode of a particular disk, use the following request:

curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/settings/disk_write_modes -d '{"calibration_mode":0,"disk_write_modes":{"2049":{"write_mode_manual":1}}}'

To see the current configuration of the disk write modes, use the following request:

curl http://localhost:8080/api/v1/settings/disk_write_modes

The response will look like the following:

{
  "calibration_mode": 1,
  "disk_write_modes": {
    "2049": {
      "disk_label": "/dev/sda1",
      "requires_automatic_write_mode_calibration": true,
      "write_mode_automatic": 0,
      "write_mode_manual": 1
    },
    "2050": {
      "disk_label": "/dev/sda2",
      "requires_automatic_write_mode_calibration": true,
      "write_mode_automatic": 0,
      "write_mode_manual": 1
    }
  }
}