I hope I never have to rely on my Mastodon instance in an emergency because given the state of my Sidekiq queue, I’d likely have been dead for several hours before anyone even hears my cry for help :)
(I say this with a smile but it’s actually really quite concerning that I can’t rely on it being real-time. Going to have to see what I can do about it. Can’t really afford to spend more than the ~€50/month I’m spending on my instance of one and my posts are routinely delayed by hours these days.)
@aral Just out of curiosity, how many sidekiq worker threads would €50 / month buy at mastohost?
Asking since I operate my own little micro-instance from what feels like a hilariously overpowered bare metal server on Hetzner for something like €38 / month. (this of course only covers the server, I need to take care of OS + service maintenance and backups myself).
@thilo I’m not sure about the number of threads (or if the bottleneck is purely a function of the number of threads available) but from what I can see in the admin interface, it seems to attempt to handle about 20 or so tasks at a time.
@aral Sidekiq handles inter-instance background communication, so it's the first thing to look at in case of delays / a full backlog. 20 seems quite low for that kind of money (I run 100 threads in 2 processes but would bump this up to 400 t / 8 p if backlog piles up).
It's also important to note that sidekiq "threads" aren't really running in parallel as Ruby runs single-threaded. Ruby threads yield on I/O, e.g. when a remote instance needs time to respond.
A better way to picture it... /
@aral ... would be that your instance can run up to 20 parallel connections to other instances IF those instances take longer to respond and Sidekiq needs to wait for data coming in. But all your local work, including preparing requests and creating and tearing down connections runs sequentially.
One would need to run multiple Sidekiq processes to do actual parallel work, each with its own thread pool (backed by a respective DB conns pool) - but that would be on Mastohost to do.
TL;DR .../
@aral ... it seems Mastohost encounters scaling challenges for big accounts like yours which you would not experience / would be easy to mitigate if your instance was fully self-hosted.