Performance: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 95: Line 95:
So we allocate 25 threads (and 25 db connections) each to four service files with the following priority orders, and two additional service files that give 5 threads to the lower-priority queues. Note that we '''only do this after increasing the maximum postgres connections to 200,''' see https://hazelweakly.me/blog/scaling-mastodon/#db_pool-notes-from-nora's-blog
So we allocate 25 threads (and 25 db connections) each to four service files with the following priority orders, and two additional service files that give 5 threads to the lower-priority queues. Note that we '''only do this after increasing the maximum postgres connections to 200,''' see https://hazelweakly.me/blog/scaling-mastodon/#db_pool-notes-from-nora's-blog


{|class="wikitable"
{{:Sidekiq#Services}}
! Service Name !! Queues !! Threads
|-
| <code>mastodon-sidekiq-default</code> || default, ingress, pull, push || 25
|-
| <code>mastodon-sidekiq-ingress</code> || ingress, default, push, pull || 25
|-
| <code>mastodon-sidekiq-push</code> || push, pull, default, ingress || 25
|-
| <code>mastodon-sidekiq-pull</code> || pull, push, default, ingress || 25
|-
| <code>mastodon-sidekiq-mailers</code> ||  mailers || 5
|-
| <code>mastodon-sidekiq-scheduler</code> || scheduler || 5
|}


Each service file is identical except for this part. (We didn't use the <code>@.service</code> systemd templates because we couldn't find a nice way of doing a list of parameters that could handle multiple queues and variable thread numbers in different services):
Each service file is identical except for this part. (We didn't use the <code>@.service</code> systemd templates because we couldn't find a nice way of doing a list of parameters that could handle multiple queues and variable thread numbers in different services):
Line 135: Line 121:
[Service]
[Service]
Type=oneshot
Type=oneshot
ExecStart=/bin/echo "mastodon-sidekiq exists only to collectively start and stop mastodon-sidekiq-* instances, shimmi>
ExecStart=/bin/echo "mastodon-sidekiq exists only to collectively start and stop mastodon-sidekiq-* instances"
RemainAfterExit=yes
RemainAfterExit=yes