Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1024 from Starnop/docs-config
Browse files Browse the repository at this point in the history
docs: optimize the config documents
  • Loading branch information
lowzj authored Jan 13, 2020
2 parents ed99479 + 4b0a28e commit c17e3ca
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 30 deletions.
7 changes: 2 additions & 5 deletions docs/config/dfdaemon_properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ The following startup parameters are supported for `dfdaemon`
| Parameter | Description |
| ------------- | ------------- |
| dfget_flags | dfget properties |
| dfpath | dfget path |
| dfpath | dfget bin path |
| hijack_https | HijackHTTPS is the list of hosts whose https requests should be hijacked by dfdaemon. The first matched rule will be used |
| localrepo | Temp output dir of dfdaemon, by default `$HOME/.small-dragonfly/dfdaemon/data/` |
| maxprocs| The maximum number of CPUs that the dfdaemon can use |
| proxies | Proxies is the list of rules for the transparent proxy |
| ratelimit | Net speed limit,format:xxxM/K |
| registry_mirror | Registry mirror settings |
| supernodes | Specify the addresses(host:port) of supernodes, it is just to be compatible with previous versions |
| verbose | Open detail info switch |
| verbose | Verbose mode. If true, set log level to 'debug'. |

## Examples

Expand Down
10 changes: 7 additions & 3 deletions docs/config/dfget_config_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ localLimit: 20M

# Minimal rate about a single download task, format: G(B)/g/M(B)/m/K(B)/k/B
# pure number will also be parsed as Byte.
minRate: 512
minRate: 64KB

# TotalLimit rate limit about the whole host, format: G(B)/g/M(B)/m/K(B)/k/B
# TotalLimit rate limit about the whole host includes download and upload, format: G(B)/g/M(B)/m/K(B)/k/B
# pure number will also be parsed as Byte.
totalLimit: 40M
#
# Suppose that there are two tasks on the same host
# and the `localLimit` for each task is 20MB.
# The actual download speed limit for each task will be 10MB when the `totalLimit` is 20MB.
# totalLimit: 20M

# ClientQueueSize is the size of client queue
# which controls the number of pieces that can be processed simultaneously.
Expand Down
6 changes: 3 additions & 3 deletions docs/config/dfget_properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ The following startup parameters are supported for `dfget`
| Parameter | Description |
| ------------- | ------------- |
| nodes | Nodes specify supernodes with format host:port=weight where the host is necessary, the port(default: 8002) and the weight(default:1) are optional. |
| localLimit | LocalLimit rate limit about a single download task,format: 20M/m/K/k |
| minRate | Minimal rate about a single download task. it's type is integer. The format of `M/m/K/k` will be supported soon |
| totalLimit | TotalLimit rate limit about the whole host,format: 20M/m/K/k |
| localLimit | LocalLimit rate limit about a single download task,format: G(B)/g/M(B)/m/K(B)/k/B. |
| minRate | Minimal rate about a single download task,format: G(B)/g/M(B)/m/K(B)/k/B. |
| totalLimit | TotalLimit rate limit about the whole host includes download and upload, format: G(B)/g/M(B)/m/K(B)/k/B |
| clientQueueSize | ClientQueueSize is the size of client queue, which controls the number of pieces that can be processed simultaneously. It is only useful when the Pattern equals "source". The default value is 6 |

## Examples
Expand Down
19 changes: 3 additions & 16 deletions docs/config/supernode_config_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
# You can configure your supernode by change the parameter according your requirement.
---
base:
# AdvertiseIP is used to set the ip that we advertise to other peer in the p2p-network.
# By default, the first non-loop address is advertised.
advertiseIP: 127.0.0.1

# ListenPort is the port supernode server listens on.
# default: 8002
listenPort: 8005
listenPort: 8002

# DownloadPort is the port for download files from supernode.
# And you should start a file server firstly which listens on the download port.
# default: 8001
downloadPort: 8001

Expand All @@ -25,11 +22,6 @@ base:
# default: 10
schedulerCorePoolSize: 10

# DownloadPath specifies the path where to store downloaded files from source address.
# This path can be set beyond BaseDir, such as taking advantage of a different disk from BaseDir's.
# default: $BaseDir/downloads
downloadPath: /home/admin/supernode/downloads

# PeerUpLimit is the upload limit of a peer. When dfget starts to play a role of peer,
# it can only stand PeerUpLimit upload tasks from other peers.
# default: 5
Expand Down Expand Up @@ -57,10 +49,6 @@ base:
# default: 5
failureCountLimit: 5

# LinkLimit is set for supernode to limit every piece download network speed.
# default: 20 MB, in format of G(B)/g/M(B)/m/K(B)/k/B, pure number will also be parsed as Byte.
linkLimit: 20M

# SystemReservedBandwidth is the network bandwidth reserved for system software.
# default: 20 MB, in format of G(B)/g/M(B)/m/K(B)/k/B, pure number will also be parsed as Byte.
systemReservedBandwidth: 20M
Expand All @@ -78,6 +66,7 @@ base:
debug: false

# FailAccessInterval is the interval time after failed to access the URL.
# If a task failed to be downloaded from the source, it will not be retried in the time since the last failure.
# default: 3m
failAccessInterval: 3m

Expand Down Expand Up @@ -117,5 +106,3 @@ base:
# IntervalThreshold is the threshold of the interval at which the task file is accessed.
# default: 2h0m0s
IntervalThreshold: 2h
plugins: {}
storages: {}
3 changes: 0 additions & 3 deletions docs/config/supernode_properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ The following startup parameters are supported for `supernode`
| listenPort | 8002 | listenPort is the port that supernode server listens on |
| downloadPort | 8001 | downloadPort is the port for download files from supernode |
| homeDir | /home/admin/supernode | homeDir is the working directory of supernode |
| advertiseIP | the first non-loop address | the supernode ip is the ip we advertise to other peers in the p2p-network |
| schedulerCorePoolSize | 10 | pool size is the core pool size of ScheduledExecutorService(the parameter is aborted) |
| downloadPath | /home/admin/supernode/repo/download | DownloadPath specifies the path where to store downloaded files from source address |
| peerUpLimit | 5 | upload limit for a peer to serve download tasks |
| peerDownLimit | 4 |the task upload limit of a peer when dfget starts to play a role of peer |
| eliminationLimit | 5 | if a dfget fails to provide service for other peers up to eliminationLimit, it will be isolated |
| failureCountLimit | 5 | when dfget client fails to finish distribution task up to failureCountLimit, supernode will add it to blacklist|
| linkLimit | 20M | LinkLimit is set for supernode to limit every piece download network speed |
| systemReservedBandwidth | 20M | network rate reserved for system |
| maxBandwidth | 200M | network rate that supernode can use |
| enableProfiler | false | profiler sets whether supernode HTTP server setups profiler |
Expand Down

0 comments on commit c17e3ca

Please sign in to comment.