3 ms·
> Note that the playground is only 2 cores and you are sharing with everyone else This is amazing, I use it all the time with no performance issues so I expect
by littlestymaar 2y ago
> Note that the playground is only 2 cores and you are sharing with everyone else
This is amazing, I use it all the time with no performance issues so I expected it to be much beefier to support many simultaneous users.
How many users does it serve? (Monthly or daily user and/or compilation job sent). And what tricks are used to keep it working? (I suspect it can re-use already compiled binaries of all supported dependencies and only need to compile the user's code and link it, but is there other clever strategies?)
- shepmaster 2y ago> How many users does it serve? I don't really track users, but over the last 24 hours, there were 47.8k meaningful [1] requests taking a total of 28.2 hours. That ~0.5 requests per second number has been relatively consistent. > re-use already compiled binaries of all supported dependencies and only need to compile the user's code and link it, but is there other clever strategies? Yes, we pre-compile all the available dependencies [2] and that's about it. > I use it all the time with no performance issues That's good to hear! There's been a long-running bug where the playground binary loses track of the child Docker container (maybe?) and then the machine runs out of memory and the OOM killer often does more harm than good [3]. While trying to pin that down, I've recently caused the entire process to get into what appears to be a complete deadlock where no requests can be serviced at all. This tends to happen while I'm asleep so either I have no chance to debug it before it is auto-killed or the playground is unresponsive for 8+ hours. [1]: compiling / executing code, running clippy/miri/rustfmt, expanding macros [2]: https://github.com/rust-lang/rust-playground/blob/c4d00b90aab3742c841011b29fba038f3cd99690/compiler/base/Dockerfile#L105-L107 https://github.com/rust-lang/rust-playground/blob/c4d00b90aa... [3]: somehow it does something that ends up killing the network stack and then the machine is basically dead in the water. Very similar to what is reported in https://serverfault.com/q/1125634/119136 https://serverfault.com/q/1125634/119136