News for hackers. Stuff that matters.
Re:Why has Plan 9 chosen statically linked binaries instead ... by masklinn on Friday February 15, 2019 @06:55AM (#19170135)
> Statically linking the kernel and OS is quite common nowadays, better known as containerization. For quite a while there has been a movement that every program or "executable" is statically linked.

Containers specifically do not statically link the kernel, the entire point is to have multiple isolated userlands use the same underlying kernel. That's why they're so cheap.

Re:Why has Plan 9 chosen statically linked binaries instead ... by skybrian on Friday February 15, 2019 @05:05PM (#19175150)
Ok, yes, but that's just the kernel, and it's cheap only relative to a full VM. A container may or may not be cheap depending on the language runtime and whatever helper apps you're bundling. Bundling the python interpreter or a Java VM into every app isn't cheap.

This reminds me of early web servers and CGI's. A CGI can be relatively cheap to run as long as you write it in C and don't link in too much; not so much for a scripting language.

Redundancy can happen at multiple layers, so deduplicating at one layer might not be enough, depending on the situation.

Re:Why has Plan 9 chosen statically linked binaries instead ... by dtech on Friday February 15, 2019 @07:24AM (#19170269)
Fair enough, although it is the case if the host OS is different then the container, VM would be a better name then I guess.

So maybe not kernel, but the entire userland/OS of the app is still statically linked with containers.

Re:Why has Plan 9 chosen statically linked binaries instead ... by masklinn on Friday February 15, 2019 @07:42AM (#19170387)
> Fair enough, although it is the case if the host OS is different then the container, VM would be a better name then I guess.

If the host OS is different than the container's you need either an intermediate hypervisor / VM (pretty sure that's what happens for docker on OSX, and why it's much more expensive than on linux) or for the host to provide an ABI compatible with the VM's OS/expectations (WSL, smartos's branded zones).

Either adds even more "dynamic linking" to the pile.

> So maybe not kernel, but the entire userland/OS of the app is still statically linked with containers.

Yes, a container's userland should be statically linked.

Re:Why has Plan 9 chosen statically linked binaries instead ... by mapcars on Friday February 15, 2019 @07:06AM (#19170191)
>the entire point is to have multiple isolated userlands use the same underlying kernel. That's why they're so cheap.

Ironically, this is what Plan9 does out-of-the-box. And even cheaper.

Re:Why has Plan 9 chosen statically linked binaries instead ... by soraminazuki on Friday February 15, 2019 @08:01AM (#19170515)
Do you have any evidence to support your claim? My understanding is that containerized processes are theoretically the same as any other process on the system in terms of runtime performance.
Re:Why has Plan 9 chosen statically linked binaries instead ... by mapcars on Friday February 15, 2019 @09:31AM (#19171161)
In plan9 they are exactly the same, not theoretically. Isolation happens on a file system level (everything is a file, but truly, not a "special device file").

While it's practically not possible to compare performance, just the fact that this is a part of the initial design and a core of Plan9 vs adhoc feature (actually ported from Plan to Linux) is enough to speculate on performance.

>Linux namespaces were inspired by the more general namespace functionality used heavily throughout Plan 9 from Bell Labs.

https://en.wikipedia.org/wiki/Cgroups

Re:Why has Plan 9 chosen statically linked binaries instead ... by masklinn on Friday February 15, 2019 @10:23AM (#19171581)
> While it's practically not possible to compare performance, just the fact that this is a part of the initial design and a core of Plan9 vs adhoc feature (actually ported from Plan to Linux) is enough to speculate on performance.

It really doesn't. For all we know, because the plan9 version has to be more general it is much slower than the ad-hoc version.