From 7bde3a602ab95de50b750122f9b52a02e2c2a9bc Mon Sep 17 00:00:00 2001 From: Nate Berkopec Date: Fri, 21 Apr 2017 12:16:27 -0600 Subject: [PATCH] Make tuning.md a little more accurate --- Running-Mastodon/Tuning.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Running-Mastodon/Tuning.md b/Running-Mastodon/Tuning.md index c4acb992..27c2efd0 100644 --- a/Running-Mastodon/Tuning.md +++ b/Running-Mastodon/Tuning.md @@ -16,7 +16,7 @@ The web process serves short-lived HTTP requests for most of the application. Th - `WEB_CONCURRENCY` controls the number of worker processes - `MAX_THREADS` controls the number of threads per process -The default is 2 workers with 5 threads each. Threads share the memory of their parent process. Different processes allocate their own memory each. Threads in Ruby are not native threads, so it's more or less: threads equal concurrency, processes equal parallelism. A larger number of threads maxes out your CPU first, a larger number of processes maxes out your RAM first. +The default is 2 workers with 5 threads each. Threads share the memory of their parent process. Different processes allocate their own memory, though they share some memory via copy-on-write. A larger number of threads maxes out your CPU first, a larger number of processes maxes out your RAM first. These values affect how many HTTP requests can be served at the same time. When not enough threads are available, requests are queued until they can be answered. @@ -30,7 +30,7 @@ If you need to scale up the streaming API, spawn more separate processes on diff ### Background processing -Many tasks in Mastodon are delegated to background processing to ensure the HTTP requests are fast, and to prevent HTTP request aborts from affecting the execution of those tasks. Sidekiq is a single process, with a configurable numbero of threads. By default, it is 5. That means, 5 different jobs can be executed at the same time. Others will be queued until they can be processed. +Many tasks in Mastodon are delegated to background processing to ensure the HTTP requests are fast, and to prevent HTTP request aborts from affecting the execution of those tasks. Sidekiq is a single process, with a configurable number of threads (5 by default). While the amount of threads in the web process affects the responsiveness of the Mastodon instance to the end-user, the amount of threads allocated to background processing affects how quickly posts can be delivered from the author to anyone else, how soon e-mails are sent out, etc.