Performance: Difference between revisions

13 bytes removed ,  00:03, 26 November 2023
no edit summary
No edit summary
No edit summary
Line 27: Line 27:
* Make multiple processes for a queue (after making a separate service)
* Make multiple processes for a queue (after making a separate service)


=== Configuration ===
=== Default Configuration ===
 
==== Default ====


By default, the <code>mastodon-sidekiq</code> service is configured with 25 threads, the full service file is as follows:
By default, the <code>mastodon-sidekiq</code> service is configured with 25 threads, the full service file is as follows:
Line 89: Line 87:
</syntaxhighlight>
</syntaxhighlight>


==== Separate Services ====
=== Separate Services ===


We want to split up sidekiq into multiple processes using separate systemd service files. We want to a) make the site responsive by processing high-priority queues quickly but also b) use all our available resources by not having processes sit idle. So we give each of the main queues one service file that has that queue as the top prioriry, and mix the other queues in as secondary priorities - sidekiq will try and process items from the first queue first, second queue second, and so on.
We want to split up sidekiq into multiple processes using separate systemd service files. We want to a) make the site responsive by processing high-priority queues quickly but also b) use all our available resources by not having processes sit idle. So we give each of the main queues one service file that has that queue as the top prioriry, and mix the other queues in as secondary priorities - sidekiq will try and process items from the first queue first, second queue second, and so on.