4 ms·
In the normal case, Erlang is only one OS process. It handles everything via select. The only limits are OS limits on open sockets and things like that.
by davidw 19y ago
In the normal case, Erlang is only one OS process. It handles everything via select. The only limits are OS limits on open sockets and things like that.
- Tichy 19y agoWhat is a select? And if Erlang is only one OS process, how does it benefit from multicore CPUs? But my real question is, how does the OS (Linux) handle the open connections (a ka open sockets, I guess)?
- davidw 19y agoThe select syscall: http://linux.die.net/man/2/select http://linux.die.net/man/2/select That's how most high throughput networking works.
- wmf 19y agoHere are some in-depth resources about asynchronous network IO: http://www.unpbook.com/ http://www.unpbook.com/ (I'm glad to see that someone took over from Stevens so that these books don't languish.) http://www.kegel.com/c10k.html http://www.kegel.com/c10k.html
- brianm 19y agoI'm pretty sure it uses kernel events (epoll, kqueue, /dev/poll) if available.