From 4b0a28e4250f214e496fe1a7e86aed33af3675fe Mon Sep 17 00:00:00 2001 From: Starnop Date: Fri, 25 Oct 2019 16:17:56 +0800 Subject: [PATCH] docs: optimize the config documents Signed-off-by: Starnop --- docs/config/dfdaemon_properties.md | 7 ++----- docs/config/dfget_config_template.yml | 10 +++++++--- docs/config/dfget_properties.md | 6 +++--- docs/config/supernode_config_template.yml | 19 +++---------------- docs/config/supernode_properties.md | 3 --- 5 files changed, 15 insertions(+), 30 deletions(-) diff --git a/docs/config/dfdaemon_properties.md b/docs/config/dfdaemon_properties.md index ea5ac2e47..8cc147594 100644 --- a/docs/config/dfdaemon_properties.md +++ b/docs/config/dfdaemon_properties.md @@ -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 diff --git a/docs/config/dfget_config_template.yml b/docs/config/dfget_config_template.yml index 34f241ea7..86234e6ae 100644 --- a/docs/config/dfget_config_template.yml +++ b/docs/config/dfget_config_template.yml @@ -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. diff --git a/docs/config/dfget_properties.md b/docs/config/dfget_properties.md index b2f72e702..9b8a3470d 100644 --- a/docs/config/dfget_properties.md +++ b/docs/config/dfget_properties.md @@ -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 diff --git a/docs/config/supernode_config_template.yml b/docs/config/supernode_config_template.yml index 2cf8b13c5..fee331cbf 100644 --- a/docs/config/supernode_config_template.yml +++ b/docs/config/supernode_config_template.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: {} diff --git a/docs/config/supernode_properties.md b/docs/config/supernode_properties.md index df7a4475d..4c27abb3f 100644 --- a/docs/config/supernode_properties.md +++ b/docs/config/supernode_properties.md @@ -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 |