Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change auto-deletion throttling constants to better scale with server size #23320

Merged
merged 2 commits into from Feb 23, 2023

Conversation

ClearlyClaire
Copy link
Contributor

@ClearlyClaire ClearlyClaire commented Jan 30, 2023

  • MAX_BUDGET: increase from 50 per minute to 150 per minute, as 50 per minute might be too low to keep up with mastodon.social's 56~96 new posts per minute (though the number of toots to be auto-deleted is probably far lower)
  • PER_THREAD_BUDGET: increase from 5 to 6 per minute, this is more to give more leeway to small servers
  • MAX_DEFAULT_SIZE: increase from 2 to 200 items, as larger servers will have larger queues (while still quickly chewing through them), a limit of 2 items is not reasonable, as a server with any medium activity will often have more than that
  • MAX_PUSH_SIZE: increase from 5 to 500 items, as larger servers will have larger queues (while still quickly chewing through them), a limit of 5 items is not reasonable, as a server with any medium activity will often have more than that
  • MAX_PULL_SIZE: increase from 500 to 10000 items since larger servers will frequently queue very large amounts of low-priority jobs
  • MAX_RETRY_SIZE: dropped it as it's widely inconsistent across servers and is not directly indicative of load

Also changed the lock TTL to 1 day, which is plenty enough since the job itself is expected to finish in seconds, and will check for load.

@ClearlyClaire ClearlyClaire force-pushed the fixes/auto-deletion-limits branch 2 times, most recently from 579d327 to a3a7d50 Compare February 1, 2023 18:54
@ClearlyClaire ClearlyClaire marked this pull request as ready for review February 8, 2023 10:07
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@Gargron Gargron merged commit 20b80c6 into mastodon:main Feb 23, 2023
Roboron3042 pushed a commit to Roboron3042/mastodon that referenced this pull request Apr 16, 2023
skerit pushed a commit to 11ways/mastodon that referenced this pull request Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants