Bun: cgroup-aware AvailableParallelism / HardwareConcurrency on Linux (github.com)

by tosh 24 comments 45 points
Read article View on HN

24 comments

[−] elffjs 42d ago
Something from the PR description that I had to look up to understand: "WTF" is "WebKit Template Framework".
[−] himata4113 42d ago
I had to take a moment to find out why all primitives in chrome were in the WTF namespace.

WTF is just kinda funny. Seen it used in loggers too log.wtf("this should never happen")

[−] dboreham 42d ago
That comment put my brain into an infinite loop for a while...
[−] nevon 41d ago
Anyone have ideas about what to do when using cgroup weights rather than max?

I'm currently in the process of removing cpu.max from our clusters, to allow applications to better utilize the available cpu time which currently is just being wasted. We will use cpu weights to make sure that cpu time is fairly allocated during contention, and to not oversubscribe the hosts, but I'm sure that among the thousands of applications that are running on those clusters today, many will be relying on cpu.max to size threadpools etc.

On the one hand, we do want applications to use the available cpu time, but at the same time they need to not kill themselves by running out of memory.

[−] phplovesong 42d ago
I had high hopes for Bun, but looks like it has gone down the shitter after they went all in on vibecoding.
[−] loevborg 42d ago
This was pre-Anthropic but the fact that Bun automatically loads .env files if they're present almost disqualifies it from most tasks https://github.com/oven-sh/bun/issues/23967

It makes it hard to take them too seriously with such a design choice - a footgun really. It's so easy to accidentally load secrets via environment variables, with no way to disable this anti-feature.

[−] rvz 42d ago
Damn. That one is absolutely horrific.

What a find.

[−] gear54rus 42d ago
Any specific links to problems? I was planning to start a new project on it :(
[−] hu3 42d ago
I still have high praises since one of my clients use it in production.

I personally use it's tooling part which is screamingly fast.

[−] pier25 42d ago
it's been flawless for me
[−] saagarjha 42d ago
I feel like https://github.com/oven-sh/WebKit/commit/35315978baee84ed1bd... is the more interesting commit tbh
[−] boomskats 42d ago
Haha, did I just hear someone whisper GOMAXPROCS?