Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
immibis
· 2y ago · 0 comments
Why can't virtual threads overcommit CPU use? If I have 4 CPUs and 4000 virtual threads running CPU-bound code, is that not overcommit? A system without overcommit would refuse to create the 5th thread.
Comments
[–]
detinho
2y ago
I think parent is saying overcommit with OS threads. 4k requests = 4k OS threads. That would lead to the problems parent is talking about.
[–]
immibis
OP
2y ago
Why wouldn't 4k virtual threads lead to the same problems?
[–]
troupo
2y ago
Because they don't create 4k real threads, and can be scheduled on n=CPU Cores OS threads
[–]
immibis
OP
2y ago
4k "real" threads can also be scheduled on 4 CPU cores. What's the difference?