Settings
The MASV Agent can be configured with the following settings:
- Disk read/write settings
- FIFO mode settings
- Multiconnect settings
- Network rate-limit and worker count settings
Disk Configuration
When transferring data, the MASV Agent can be configured with certain parameters which determine how data is transferred to/from the disk.
Parameters
The following fields can be used to configure each disk:
Field | Type | Description |
---|---|---|
disk_id |
string |
Unique ID for the disk config |
priority |
string |
Disk read/write priority |
max_concurrent_readers |
integer |
Maximum number of concurrent readers |
max_concurrent_writers |
integer |
Maximum number of concurrent writers |
The following are valid values for the priority
field
Priority | Description |
---|---|
mixed_read_writes |
Allows concurrent read and write operations on the disk |
prioritize_writes |
Delays all read operations while writing to disk. |
prioritize_reads |
Delays all write operations while reading from disk. Not recommended for a typical user. |
Query Status
The following command will query both the default and current disk configurations:
masv settings disk status
Response:
{
"default": {
"max_concurrent_readers": 8,
"max_concurrent_writers": 8,
"priority": "mixed_read_writes"
},
"disks": [
{
"active_read_jobs": 0,
"active_write_jobs": 0,
"disk_id": "/",
"max_concurrent_readers": 8,
"max_concurrent_writers": 8,
"priority": "mixed_read_writes"
},
{
"active_read_jobs": 0,
"active_write_jobs": 0,
"disk_id": "/mnt/hdd2",
"max_concurrent_readers": 8,
"max_concurrent_writers": 8,
"priority": "mixed_read_writes"
}
]
}
The following command will query the default disk configuration
curl http://localhost:8080/api/v1/settings/disk_config_default
Response:
{
"max_concurrent_readers": 8,
"max_concurrent_writers": 8,
"priority": "mixed_read_writes"
}
The following command will query the disk configurations
curl http://localhost:8080/api/v1/settings/disk_status
Response:
[
{
"disk_id": "/",
"max_concurrent_readers": 8,
"max_concurrent_writers": 8,
"priority": "mixed_read_writes",
"active_read_jobs": 0,
"active_write_jobs": 0
},
{
"disk_id": "/mnt/hdd2",
"max_concurrent_readers": 8,
"max_concurrent_writers": 8,
"priority": "mixed_read_writes",
"active_read_jobs": 0,
"active_write_jobs": 0
}
]
Update Configurations
Both the default and disk configurations can be updated with a single request:
masv settings disk update --readers 2 --writers 3 --priority mixed_read_writes
If the user wishes to modify only the default configuration, specify the --default
flag:
masv settings disk update --readers 2 --default
If the user wishes to modify specific disk configurations, specify the --ids
flag:
masv settings disk update --writers 2 --ids /,/mnt/hdd2
To create a new configuration, provide an id
that does not yet exist
masv settings disk update --writers 1 --ids /mnt/hdd3
Update the default disk configuration:
curl -H "Content-Type: application/json" -X POST \
http://localhost:8080/api/v1/settings/disk_config_default -d \
'{
"priority":"mixed_read_writes",
"max_concurrent_readers":8,
"max_concurrent_writers":8
}'
Update/create disk configuration(s):
curl -H "Content-Type: application/json" -X POST \
http://localhost:8080/api/v1/settings/disk_config -d \
'{
"/":{
"priority":"mixed_read_writes",
"max_concurrent_readers":8,
"max_concurrent_writers":8
},
"/":{
"priority":"mixed_read_writes",
"max_concurrent_readers":8,
"max_concurrent_writers":8
},
}'
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.
Manage FIFO Mode
You can enable or disable FIFO mode, as well as specify the number of concurrent uploads and downloads.
To query the current status of FIFO mode, use the following request:
masv settings fifo status
curl http://localhost:8080/api/v1/settings/fifo_mode
To update the FIFO mode configuration, use the following requests:
masv settings fifo update --enable --downloads 1 --uploads 2
masv settings fifo update --disable
Update the default disk configuration:
curl -H "Content-Type: application/json" -X POST \
http://localhost:8080/api/v1/settings/fifo_mode -d \
'{
"active_download_count":1,
"active_upload_count":2,
"enabled":true
}'
Modify FIFO Ranks
The following request(s) lets you alter the rank of existing transfers:
masv upload update {upload_id} --fifo-rank 1
masv download update {download_id} --fifo-rank 1
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":1}'
Multiconnect
Multiconnect allows the MASV Agent to transfer data using multiple active internet connections available to the host system.
Query Status
To query the Multiconnect status, use the following request:
masv settings multiconnect status
curl http://localhost:8080/api/v1/settings/multiconnect/status
Manage Multiconnect
To enable/disable Multiconnect, use the following request
masv settings multiconnect update --enable
masv settings multiconnect update --disable
curl -H "Content-Type: application/json" -X POST \
http://localhost:8080/api/v1/settings/multiconnect -d \
'{"enabled":true}'
curl -H "Content-Type: application/json" -X POST \
http://localhost:8080/api/v1/settings/multiconnect -d \
'{"enabled":false}'
Manage Multiconnect Network Interfaces
To enable/disable a specific Multiconnect network interface, use the following request:
masv settings multiconnect interface {iface_id} --enable
masv settings multiconnect interface {iface_id} --disable
curl -H "Content-Type: application/json" -X POST \
http://localhost:8080/api/v1/settings/multiconnect/ifaces/{iface_id} -d \
'{"enabled":true}'
curl -H "Content-Type: application/json" -X POST \
http://localhost:8080/api/v1/settings/multiconnect/ifaces/{iface_id} -d \
'{"enabled":false}'
Network
Concurrency Settings
The network concurrency settings control how many upload/download chunk workers are active at a time.
To query the current network concurrency settings, use the following request:
masv settings network concurrency status
curl http://localhost:8080/api/v1/settings/worker_config
To update the network concurrency settings, use the following requests:
masv settings network concurrency update --download 8 --upload 8
curl -H "Content-Type: application/json" -X POST \
http://localhost:8080/api/v1/settings/worker_config -d \
'{"upload":8,"download":8}'
Rate-Limits
- Rate-limits can be used to restrict transfer bandwidth.
- A rate-limit can apply at all times, or on a schedule.
- With Multiconnect disabled, the global rate-limit settings will be applied.
- With Multiconnect enabled, the network interface specific rate-limit settings will be applied.
To query the current rate-limit settings, use the following requests:
masv settings network rate-limit upload status
masv settings network rate-limit download status
With Multiconnect disabled, query the global rate limits
curl http://localhost:8080/api/v1/settings/upload_rate_limit
curl http://localhost:8080/api/v1/settings/download_rate_limit
With Multiconnect enabled, query a particular network interface rate limits
curl http://localhost:8080/api/v1/settings/upload_rate_limit/{iface_id}
curl http://localhost:8080/api/v1/settings/download_rate_limit/{iface_id}
To update a rate limit, without applying any sort of schedule, use the following requests:
With Multiconnect disabled, update the global rate-limit
masv settings network rate-limit download update --bps 100000000 --enable
masv settings network rate-limit download update --disable
With Multiconnect enabled, update the rate-limit for a particular network interface
masv settings network rate-limit download update --iface-id {iface_id} --enable
masv settings network rate-limit download update --iface-id {iface_id} --disable
With Multiconnect disabled, update the global rate-limit
curl -H "Content-Type: application/json" -X POST \
'http://localhost:8080/api/v1/settings/download_rate_limit' -d \
'{
"rate_limit_bps":100000000,
"enabled":true,
"schedule_enabled":false
}'
curl -H "Content-Type: application/json" -X POST \
'http://localhost:8080/api/v1/settings/upload_rate_limit' -d \
'{
"rate_limit_bps":100000000,
"enabled":true,
"schedule_enabled":false
}'
With Multiconnect enabled, update the rate-limit for a particular network interface
curl -H "Content-Type: application/json" -X POST \
'http://localhost:8080/api/v1/settings/download_rate_limit/{iface_id}' -d \
'{
"rate_limit_bps":100000000,
"enabled":true,
"schedule_enabled":false
}'
curl -H "Content-Type: application/json" -X POST \
'http://localhost:8080/api/v1/settings/upload_rate_limit/{iface_id}'' -d \
'{
"rate_limit_bps":100000000,
"enabled":true,
"schedule_enabled":false
}'
Rate-Limit Schedules
To update rate-limits with a schedule, use the following requests:
With Multiconnect disabled, enable/disable the global rate-limit schedule
masv settings network rate-limit download schedule update --enable
masv settings network rate-limit download schedule update --disable
With Multiconnect enabled, enable/disable the rate-limit schedule for the specified network interface
masv settings network rate-limit download schedule update --iface-id {iface_id} --enable
masv settings network rate-limit download schedule update --iface-id {iface_id} --disable
With Multiconnect disabled, update days within the schedule
masv settings network rate-limit download schedule days --start "09:00" --end "17:00" --enable --mon --tue --wed --thu --fri
With Multiconnect enabled, update days within the schedule for the specified network interface
masv settings network rate-limit download schedule days --iface-id "00:d8:61:be:e1:2c" --start "09:00" --end "17:00" --enable --sat --sun
With Multiconnect disabled, update the global rate-limit and schedule
curl -H 'Content-Type: application/json' -X POST \
'http://localhost:8080/api/v1/settings/upload_rate_limit' -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"}
}}'
curl -H 'Content-Type: application/json' -X POST \
'http://localhost:8080/api/v1/settings/download_rate_limit' -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"}
}}'
With Multiconnect enabled, update the interface specific rate-limit and schedule
curl -H 'Content-Type: application/json' -X POST \
'http://localhost:8080/api/v1/settings/upload_rate_limit/{interface_id}' -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"}
}}'
curl -H 'Content-Type: application/json' -X POST \
'http://localhost:8080/api/v1/settings/download_rate_limit/{interface_id}' -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"}
}}'