Server Performance

the whole point of rails and docker is that you can decouple the code from the infra. A switch to Puma should be straight forward enough.

later versions of discourse run on Puma natively… can you get support from the software vendor?

source-3

We are on the latest version.

Puma is usable but they recommend against it:

What our unicorn setup gives us excellent predictability regarding performance. A unicorn worker can only serve one active (non message bus / non hijacked) request at a time. That means quite a few things in the Ruby world.

  1. Due to global interpreter lock, if you start serving more than 1 request per worker you start bottlenecking on the lock making stuff slower.
  2. If you run lots of requests on a single worker concurrently memory usage can spike and you can bloat Ruby heaps
  3. Only clean way of timing out a request is tearing down a process, unicorn makes this very straight forward and the forking model makes the cost of timing out low.

Unicorn has served us enormously well, and I see no plans to experiment with anything else. That said if memory is super tight I can see an advantage to using puma but the behavior of “low memory” + “misbahving app” on a single process puma could be very very painful.

They are supporting in general on the problem - it has affected a few sports sites this weekend.

Ok so they are running on MRI - that doesn’t support full concurrency as you said the GIL is a cunt.

Puma would still be efficient on MIL because you can scale on memory and CPU - as opposed to workers that fork… that’s not efficient IMO

1 Like

I’m out of my depth here on that side of things. I’m happy that the developers are looking at it though and have identified a couple of regressions in the code recently that won’t have helped.

Looking at other server options though. Think I can get more bang for my buck elsewhere (currently with Digital Ocean but Hetzner looks cheaper so could increase specs for same price).

their DC’s are in Germany too. i think digital ocean are in San Fran.

That’s their base but we’re on an Amsterdam server. Hetzner look more Eurocentric anyway and their big down point seems to be they don’t do out of hours support (which is odd) but sure what can go wrong? We can just run TFK from 9 to 5 if needs be.

sure that’s when most lads are on anyway :smiley:

1 Like

Lads in Kinlough having meltdowns.

That’s a regular occurrence

1 Like

The early risers won’t be happy with that.

Wait until the Late Late Show starts back. It’ll be carnage.

1 Like

The Rose of Tralee next week is its next big test.

We need a new RAM I’d say.Something like this 1630128

2 Likes

The last line may be of interest. Sounds odd. Is there something you’re not telling us?

The answer is in the thread.