Bun: cgroup-aware AvailableParallelism / HardwareConcurrency on Linux
Hey there, little explorer! Imagine your computer is like a big toy box, and inside it, there are lots of tiny helpers, like little worker robots!
Sometimes, we put a special fence around some of these robots, saying, "Only these 3 robots can work on this toy!"
Before, your computer program, called "Bun," would peek over the fence and think, "Wow, there are all these robots in the big box!" It didn't know about the fence!
But now, Bun is super smart! It can see the fence and knows, "Oh, I only have these 3 robots to help me!"
So, Bun can work much better and faster because it knows exactly how many little helpers it really has! Yay, Bun!
Article URL: https://github.com/oven-sh/bun/pull/28801 Comments URL: https://news.ycombinator.com/item?id=47625311 Points: 7 # Comments: 1
added 2 commits
April 2, 2026 23:56
Routes navigator.hardwareConcurrency (and therefore os.availableParallelism()) through WTF::numberOfProcessorCores() instead of an inline sysconf/sysctl. On Linux this picks up the new sched_getaffinity + cgroup cpu.max capping in WTF, so containers with --cpus=N report N instead of the host core count.Routes navigator.hardwareConcurrency (and therefore os.availableParallelism()) through WTF::numberOfProcessorCores() instead of an inline sysconf/sysctl. On Linux this picks up the new sched_getaffinity + cgroup cpu.max capping in WTF, so containers with --cpus=N report N instead of the host core count.This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Show hidden characters
Sign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
availablegithub
Truckloads of food are being wasted because computers won’t approve them
Modern food systems may look stable on the surface, but they are increasingly dependent on digital systems that can quietly become a major point of failure. Today, food must be “recognized” by databases and automated platforms to be transported, sold, or even released, meaning that if systems go down, food can effectively become unusable—even when it’s physically available.

Untitled
You have 50 models. Each trained on different data, different domain, different patient population. You want them to get smarter from each other. So you do the obvious thing — you set up a central aggregator. Round 1: gradients in, averaged weights out. Works fine at N=5. At N=20 you notice the coordinator is sweating. At N=50, round latency has tripled, your smallest sites are timing out, and your bandwidth budget is gone. You tune the hell out of it. Same ceiling. This is not a configuration problem. This is an architecture ceiling. The math underneath it guarantees you hit a wall. A different architecture changes the math. The combinatorics you are not harvesting Start with a fact that has nothing to do with any particular framework: N agents have exactly N(N-1)/2 unique pairwise relati

This Week in AI: April 05, 2026 - Revolutionizing Development with Personal Agents and Multimodal Intelligence
This Week in AI: April 05, 2026 - Revolutionizing Development with Personal Agents and Multimodal Intelligence Published: April 05, 2026 | Reading time: ~10 min This week has been incredibly exciting for AI enthusiasts and developers alike. With advancements in personal AI agents, multimodal intelligence, and compact models for enterprise documents, the field is rapidly evolving. One of the most significant trends is the ability to build and deploy useful AI prototypes in a remarkably short amount of time. This shift is largely due to innovative tools and ecosystems that are making AI more accessible to individual builders. In this article, we'll dive into the latest AI news, exploring what these developments mean for developers and the broader implications for the industry. Building a Per
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Releases

Truckloads of food are being wasted because computers won’t approve them
Modern food systems may look stable on the surface, but they are increasingly dependent on digital systems that can quietly become a major point of failure. Today, food must be “recognized” by databases and automated platforms to be transported, sold, or even released, meaning that if systems go down, food can effectively become unusable—even when it’s physically available.

I Put an LLM Inside the Linux Kernel Scheduler. Here's What Happened.
A few weeks ago, I did something that probably shouldn't work. I replaced the CPU scheduling algorithm in my Linux kernel with calls to an AI model. As on-device LLM inference capabilities grow, I am curious about its potential as a CPU scheduler. Maybe in the future, tweaking a laptop's performance is a matter of adjusting the system prompt 🤷♂️ What Is a CPU Scheduler? CPU Scheduler is an operating system component that decides which task or process gets to use the CPU at a particular time. Linux's default scheduler is called CFS (Completely Fair Scheduler). It's an algorithm that tries to give every process a fair share of CPU time, weighted by priority. It makes decisions in microseconds, fully algorithmic. The Idea Two things that made this feel worth trying. First, sched_ext landed

I Turned My MacBook's Notch Into a Control Center for AI Coding Agents
Every developer using Claude Code knows the pain: you have 5+ terminal sessions running, Claude is asking for permission in one tab, waiting for input in another, and you're buried in a third. You Alt-Tab frantically, lose context, and waste time. So I built CodeIsland — a free, open-source macOS app that turns your MacBook's notch (Dynamic Island) into a real-time dashboard for all your AI coding agents. The Problem When you're running multiple Claude Code sessions across different projects, there's no way to see everything at a glance. You're constantly switching between terminals to: Check which session finished Approve permission requests Answer Claude's questions Monitor usage limits Multiple Claude Code sessions in cmux, with CodeIsland monitoring everything from the notch The Soluti


Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!