update settings docs

This commit is contained in:
Ivan Baidakou
2025-01-25 20:18:06 +03:00
parent d2f7ef9d18
commit 47e3c33e24
4 changed files with 48 additions and 58 deletions
+36 -49
View File
@@ -3,93 +3,80 @@
Configuration is generated by default should be OK in the most of cases,
however you might want to tune it.
All timeouts are specified in milliseconds
```toml
# settings peer connection
[bep]
blocks_max_requested = 16 # maximum concurrent block read requests to a peer
advances_per_iteration = 10 # maximum amount of file metadata advances per iteration
blocks_max_requested = 16 # maximum concurrent block read requests per peer
blocks_simultaneous_write = 16 # maximum concurrent block write requests to disk
connect_timeout = 5000
request_timeout = 60000
connect_timeout = 5000 # maximum time for connection, milliseconds
request_timeout = 60000 # maximum time for request, milliseconds
rx_buff_size = 16777216 # preallocated receive buffer size
rx_timeout = 300000
rx_timeout = 300000 # maximum time for request, milliseconds
tx_buff_limit = 8388608 # preallocated transmit buffer size
tx_timeout = 90000
tx_timeout = 90000 # tx max time, milliseconds
# database settings
[db]
upper_limit = 0x400000000 # maximum amount of database, in bytes
upper_limit = 0 # maximum amount of database, in bytes, 0 - for auto allocate
uncommited_threshold = 150 # how often flush db to disk, i.e. how much operations
# might be not committed. Affects disk performance
max_blocks_per_diff = 8192 # maximum number of blocks per single diff (to display progress in UI)
max_files_per_diff = 1024 # maximum number of files per single diff (to display progress in UI)
# dialer settings
[dialer]
enabled = true
redial_timeout = 300000 # how often try to redial to offline peers
redial_timeout = 300000 # how often try to redial to connect offline peers, milliseconds
skip_discovers = 10 # when peer addresses are known, how many times skip rediscovering them
# filesystem settings
[fs]
temporally_timeout = 86400000 # remove incomplete file after this amount of seconds
mru_size = 10 # maximum amount of cached files
temporally_timeout = 86400000 # remove incomplete file after this amount of seconds
mru_size = 128 # maximum amount of cached/opened files
bytes_scan_iteration_limit = 1024*1024 # max number of bytes before emitting scan events
files_scan_iteration_limit = 128 # max number processed files before emitting scan events
[global_discovery]
announce_url = 'https://discovery.syncthing.net/'
# this device certificate location
cert_file = '/home/b/.config/syncthing/cert.pem'
# the device_id of global discovery server
device_id = 'LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW'
enabled = true
# this device key location
key_file = '/home/b/.config/syncthing/key.pem'
rx_buff_size = 32768
timeout = 4000
debug = false
announce_url = 'https://discovery.syncthing.net/' # url of syncthing/private global announce server
device_id = 'LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW' # the device_id of global discovery server
cert_file = '/home/b/.config/syncthing/cert.pem' # this device certificate location
key_file = '/home/b/.config/syncthing/key.pem' # this device key location
rx_buff_size = 32768 # preallocated receive buffer size, bytes
timeout = 4000 # max request/response time, milliseconds
[local_discovery]
enabled = true
# how often send announcements in LAN, in milliseconds
frequency = 10000
port = 21026
frequency = 30000 # how often send announcements in LAN, in milliseconds
port = 21027 # upd port used for announcement (should be the same as in syncthing)
# default log settings
[[log]]
name = 'default'
# possible values: trace, debug, info, warn, error, critical
name = 'default' # possible values: trace, debug, info, warn, error, critical
level = 'trace'
# where do output logs
sinks = ['stdout', 'file:/tmp/log.txt']
sinks = ['stdout', 'file:/tmp/log.txt'] # where do output logs
[main]
# where folders are created by default
default_location = '/tmp/syncspirit'
# this device name
device_name = 'this-device-name'
timeout = 5000
# the amount cpu cores used for hashing
hasher_threads = 3
default_location = '$HOME/.config/syncspirit/shared_data' # where folders are created by default
device_name = 'this-device-name' # this device name
timeout = 5000 # main actors timeout, milliseconds
hasher_threads = 3 # the amount cpu cores used for hashing
[relay]
enabled = true
# where pick the list of relay servers pool
discovery_url = 'https://relays.syncthing.net/endpoint'
rx_buff_size = 1048576
debug = false
discovery_url = 'https://relays.syncthing.net/endpoint' # where pick the list of relay servers pool
rx_buff_size = 1048576 # preallocated receive buffer size, bytes
[upnp]
enabled = true
# do output of upnp requests
debug = false
discovery_attempts = 2
# external port for communication, opened on router
external_port = 22001
max_wait = 1
rx_buff_size = 65536
# actor specific log (for net.db in the case)
[[log]]
name = 'net.db'
level = 'debug'
external_port = 22001 # external (router) port for communication, opened on router
max_wait = 1 # router response max wait time, seconds
rx_buff_size = 65536 # preallocated receive buffer size, bytes
```
+4 -1
View File
@@ -5,6 +5,9 @@ and downloads files to local disk. The program stays always "online"
(similar to [syncthing](https://syncthing.net)), unless `inactivate`
command is defined.
`syncspirit-daemon` shares the same database, config folder and files with
other `syncspirit` programs, so it is possible to "setup" configuration
in one program and sync in other.
## generic command line options
@@ -37,7 +40,7 @@ short device id or via device label.
inactivity (i.e. no traffic between peers).
# Launch example
# launch example
```
syncspirit-daemon --log_level info \
+7 -7
View File
@@ -556,15 +556,15 @@ outcome::result<void> serialize(const main_t cfg, std::ostream &out) noexcept {
{"rx_buff_size", cfg.upnp_config.rx_buff_size},
}}},
{"bep", toml::table{{
{"rx_buff_size", cfg.bep_config.rx_buff_size},
{"tx_buff_limit", cfg.bep_config.tx_buff_limit},
{"connect_timeout", cfg.bep_config.connect_timeout},
{"request_timeout", cfg.bep_config.request_timeout},
{"tx_timeout", cfg.bep_config.tx_timeout},
{"rx_timeout", cfg.bep_config.rx_timeout},
{"advances_per_iteration", cfg.bep_config.advances_per_iteration},
{"blocks_max_requested", cfg.bep_config.blocks_max_requested},
{"blocks_simultaneous_write", cfg.bep_config.blocks_simultaneous_write},
{"advances_per_iteration", cfg.bep_config.advances_per_iteration},
{"connect_timeout", cfg.bep_config.connect_timeout},
{"request_timeout", cfg.bep_config.request_timeout},
{"rx_buff_size", cfg.bep_config.rx_buff_size},
{"rx_timeout", cfg.bep_config.rx_timeout},
{"tx_buff_limit", cfg.bep_config.tx_buff_limit},
{"tx_timeout", cfg.bep_config.tx_timeout},
}}},
{"dialer", toml::table{{
{"enabled", cfg.dialer_config.enabled},
+1 -1
View File
@@ -389,7 +389,7 @@ void discovery_url_t::reflect_to(syncspirit::config::main_t &main) {
main.relay_config.discovery_url = utils::parse(value);
}
const char *discovery_url_t::explanation_ = "here pick the list of relay servers pool";
const char *discovery_url_t::explanation_ = "where pick the list of relay servers pool";
rx_buff_size_t::rx_buff_size_t(std::uint64_t value, std::uint64_t default_value)
: parent_t("rx_buff_size", explanation_, value, default_value) {}