aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-09-18 13:42:50 -0500
committerGitHub <noreply@github.com>2022-09-18 13:42:50 -0500
commit6a307269ab99956fb2c5ea2149ae76c3ef24c8b2 (patch)
tree490d0b393c33c533a1c7c0344ebb1ce346b28166 /docs
parent2700743d8b7b049a8c5fe20f398354e28ce1a94b (diff)
parentab95c9841b2967f86b9217fddef2d70b99a57b7a (diff)
downloadslskd-6a307269ab99956fb2c5ea2149ae76c3ef24c8b2.tar.gz
Merge pull request #649 from slskd/faster-scan
Increase the speed of share scanning by 4-5x
Diffstat (limited to 'docs')
-rw-r--r--docs/config.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/config.md b/docs/config.md
index 0580baf5..19692fe3 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -166,9 +166,16 @@ Storing the cache on disk uses quite a bit less memory and allows the applicatio
The cache is stored in memory by default. If you find that the application uses too much memory or crashes with an `Out of Memory` exception, change this option to store the cache on disk.
+Scanning shares is an I/O intensive operation; all of the files and directories in each share have to be listed, and each file has to be read to gather metadata like length, bitrate, and sample rate. To speed things up, multiple 'workers'
+are used to allow metadata to be read from several files concurrently. The scan generally gets faster as additional workers are added, but each worker also adds additional I/O pressure and increases CPU and memory usage. At some number of workers
+performance will start to get worse as more are added. The optimal number of workers will vary from system to system, so if scan performance is important to you it will be a good idea to experiment to see what the optimal number is for your system.
+
+The default number of workers is 16.
+
| Command Line | Environment Variable | Description |
| ---------------------------- | -------------------------- | ------------------------------------------------------- |
| `--share-cache-storage-mode` | `SHARE_CACHE_STORAGE_MODE` | The type of storage to use for the cache (Memory, Disk) |
+| `--share-cache-workers` | `SHARE_CACHE_WORKERS` | The number of workers to use while scanning shares |
#### **YAML**
```yaml