News for hackers. Stuff that matters.
Re:Reining in the thundering herd: Getting to 80% CPU utiliz... by PaywallBuster on Sunday August 15, 2021 @02:18PM (#28190968)
containers would've solved it

one process per container, easy peasy

Re:Reining in the thundering herd: Getting to 80% CPU utiliz... by motoboi on Sunday August 15, 2021 @02:23PM (#28191036)
you now containers are just processes, right?

This is what they did, but because they didn't need to schedule other jobs on the same machine, kubernetes or even docker would be overkill.

In this case, simple VM orchestration seems like a fine solution.

Re:Reining in the thundering herd: Getting to 80% CPU utiliz... by PaywallBuster on Monday August 16, 2021 @12:45AM (#28195007)
Indeed,

but you wouldn't be thinking about instance sizes,

how many processes per instance and

wondering if you're hitting kernel limits with all the issues coming up

Re:Reining in the thundering herd: Getting to 80% CPU utiliz... by zbentley on Tuesday August 17, 2021 @05:21AM (#28207803)
You'd probably be worrying more about instance sizes if you ran a single executor per container; the memory overhead of your app would become a problem very quickly unless it's startup footprint was quite small.
Re:Reining in the thundering herd: Getting to 80% CPU utiliz... by PaywallBuster on Wednesday August 18, 2021 @02:00AM (#28218134)
That's what they're doing now.

One app pool with one worker x number of cores

Re:Reining in the thundering herd: Getting to 80% CPU utiliz... by zbentley on Thursday August 19, 2021 @08:14AM (#28232826)
I assumed they're managing all those workers under one parent process which compiled their codebase on start. Perhaps that assumption was in error.
Re:Reining in the thundering herd: Getting to 80% CPU utiliz... by motoboi on Monday August 16, 2021 @04:42AM (#28196114)
Why not?
Re:Reining in the thundering herd: Getting to 80% CPU utiliz... by Spivak on Sunday August 15, 2021 @02:29PM (#28191109)
This doesn’t work so easily with architectures with process pools for workers. So now your app server needs to speak docker (or whatever control plane) to spawn new workers and deal with more complicated IPC. Also the startup time is brutal.

One process per container and multiprocessing is a huge lift most of the time. I’ve done it but it can be a mess because you don’t really have as much a handle on containers than subprocesses because you can only poke them at a distance through the control plane.

Re:Reining in the thundering herd: Getting to 80% CPU utiliz... by zbentley on Tuesday August 17, 2021 @05:24AM (#28207823)
> One process per container and multiprocessing

Do you mean multiprocessing inside the containers? Or are you managing multiprocessing child procs by forking into a container somehow? If the latter, I'd be really interested to learn how to do that; I didn't think it was possible, and it would be super useful for some of what I work on.

Re:Reining in the thundering herd: Getting to 80% CPU utiliz... by PaywallBuster on Wednesday August 18, 2021 @02:01AM (#28218136)
That's what they're doing now.

One app pool with one worker x number of cores

Wrapping it around a container makes no difference