News for hackers. Stuff that matters.
Re:Security in Plan 9 (2002) by pjmlp on Wednesday September 28, 2022 @08:54AM (#33007305)
That is the best security.
Re:Security in Plan 9 (2002) by Ensorceled on Wednesday September 28, 2022 @09:04AM (#33007406)
Next up in the blog schedule: "Performance and Scaling in Plan 9"
Re:Security in Plan 9 (2002) by MisterTea on Wednesday September 28, 2022 @10:28AM (#33008368)
Re:Security in Plan 9 (2002) by ori_b on Wednesday September 28, 2022 @01:14PM (#33010465)
Still WIP. We're not yet at a million useful procs.
Re:Security in Plan 9 (2002) by MisterTea on Wednesday September 28, 2022 @02:39PM (#33011575)
Ah, by "Already done" I was referring to to the fact that your blog post exists and addresses the performance issues :-)
Re:Security in Plan 9 (2002) by butterisgood on Wednesday September 28, 2022 @09:49AM (#33007902)
I'd actually love to see such a paper. Plan 9 threading is more like coroutines, but it is certainly possible to run multi-core/multi-process code.

That said, I can't say I've seen anyone try to write anything that scales like nginx on Plan 9. That doesn't mean it hasn't happened, I've just not seen anyone talk about it too much.

It did run on IBM's Blue Gene for a bit (https://www.usenix.org/legacy/event/usenix07/posters/vanhens...) but as you can see that was some 15 years ago, and I'm not sure we're talking about anything even remotely similar to a single computer handling tons of concurrent connections.

Plan 9 can also run Go binaries, but, again, not really sure we're talking about the same thing as nginx-level scale.

Re:Security in Plan 9 (2002) by MisterTea on Wednesday September 28, 2022 @12:31PM (#33009918)
> I'd actually love to see such a paper. Plan 9 threading is more like coroutines, but it is certainly possible to run multi-core/multi-process code.

Rob Pike was on of the main developers behind plan 9 and Go and involved in concurrent programming research focusing on CSP.

Multi-processing was a main focus of plan 9's design and it works well as procs are cheap to spawn on plan 9. Procs are also the smallest unit of execution on plan 9, threads are just light weight procs with a shared heap to pass pointers around. Thread stacks can also be shared as well by being allocated on the heap via fork(2) RFMEM flag (its all done with malloc in the background).

The issue with vanilla (aka labs or legacy ) plan 9 is there is a hard coded limit of 2k procs statically allocated at boot. This was a pragmatic design decision. The unfortunate side effect is vanilla plan 9 falls over under any sort of work load requiring spawning lots of procs like handling web requests. This is actively being worked on by 9front developers so sites hosted on 9front should hold up better (patches welcome :-).

> That said, I can't say I've seen anyone try to write anything that scales like nginx on Plan 9.

Because you really don't need those big web serving monoliths on plan 9. You wire things up using rc scripts and programs like execfs (implements cgi) plus httpd/tcp80 or another web serving listener and sandbox code using namespaces. Plan 9 is more true to unix philosophy and more unix than unix. (edit: execfs is experimental but available on shuthub.us along with other webstuff like tcp80)

Re:Security in Plan 9 (2002) by pjmlp on Thursday September 29, 2022 @02:10AM (#33017063)
And also Limbo and Inferno, Plan 9's sucessor that people keep forgeting about and heavily influenced Go.

https://www.vitanuova.com/inferno/limbo.html

Re:Security in Plan 9 (2002) by mburee on Thursday September 29, 2022 @01:59AM (#33016988)
rfork is also just a really elegant system call
Re:Security in Plan 9 (2002) by p_l on Wednesday September 28, 2022 @04:24PM (#33012795)
Plan9 libthread is literally goroutines just without the syntax sugar - up till version 1.5, golang shipped significant chunk of Plan9 standard library with itself. It's also where the saner networking interface came from, as Plan9 was to support networking from start, not depend on quick and dirty port of non-Unix stack like BSD Sockets
Re:Security in Plan 9 (2002) by pjmlp on Thursday September 29, 2022 @02:10AM (#33017060)
It got taken care of in Limbo and Inferno, Plan 9's sucessor that people keep forgeting about and heavily influenced Go.

https://www.vitanuova.com/inferno/limbo.html