Live data from Hacker News

Oasis – a small, statically-linked Linux system

github.com

31–40 of 288 posts

Re: Oasis – a small, statically-linked Linux system

#31
post #20

Doesn't linking everything statically imply that the base image -- and memory, at runtime -- will be bloated by many copies of libc and other common libraries? I do like the simplicity of static linking but it sort of seems to go against the idea of avoiding "bloat".

In a world where Docker and Kubernetes exist, where whole copies of operating systems are added to each running service...

This seems a weird thing to complain about =)

Re: Oasis – a small, statically-linked Linux system

#33
post #31
post #20

Doesn't linking everything statically imply that the base image -- and memory, at runtime -- will be bloated by many copies of libc and other common libraries? I do like the simplicity of static linking but it sort of seems to go against the idea of avoiding "bloat".

In a world where Docker and Kubernetes exist, where whole copies of operating systems are added to each running service... This seems a weird thing to complain about =)

I mean, if you ran every single executable on your desktop in a separate container I think you'd see problems. There are a pretty large number of programs running on most desktops, plus all the programs that get called by shell scripts, etc.

Running a handful of containers representing major applications is more reasonable and the memory wastage may be worth it to avoid dependency conflicts.

Re: Oasis – a small, statically-linked Linux system

#34
post #31
post #20

Doesn't linking everything statically imply that the base image -- and memory, at runtime -- will be bloated by many copies of libc and other common libraries? I do like the simplicity of static linking but it sort of seems to go against the idea of avoiding "bloat".

In a world where Docker and Kubernetes exist, where whole copies of operating systems are added to each running service... This seems a weird thing to complain about =)

Yeah but there I can still update vulnerable libraries independently, to be a statically linked system just means that if there is a bug in libpng then I have to recompile everything?

Re: Oasis – a small, statically-linked Linux system

#36
post #20

Doesn't linking everything statically imply that the base image -- and memory, at runtime -- will be bloated by many copies of libc and other common libraries? I do like the simplicity of static linking but it sort of seems to go against the idea of avoiding "bloat".

It would be bloated, but how big of a problem is that these days? A TB of storage is pretty cheap.

Re: Oasis – a small, statically-linked Linux system

#37
post #20

Doesn't linking everything statically imply that the base image -- and memory, at runtime -- will be bloated by many copies of libc and other common libraries? I do like the simplicity of static linking but it sort of seems to go against the idea of avoiding "bloat".

KSM could help with that: https://docs.kernel.org/admin-guide/mm/ksm.html

... oh wait, the apps have to hint that it's possible. Nebbermind.

Re: Oasis – a small, statically-linked Linux system

#38
post #22

Earlier quoted context omitted.

> grab a drop-in binary This is a cool approach on Docker as well. FROM some:thing AS bins FROM debian:latest COPY --from=bins /bin/foo /bin/

Agreed, if the binary is statically linked. If you run `file` on the output from that and it shows 'dynamically linked' then you're playing games with porting over libraries, changing the library loading path, or just going full chroot like linux from scratch does with the bootstrapping part of the install. I find static binaries simplest to work with in that context but agreed I use that pattern too with docker and…

Agreed, dynamically linked binaries don't drop in well.

Re: Oasis – a small, statically-linked Linux system

#39
post #9

What is the comparison between using musl and traditional glibc? Is there performance differences between the two? I have been seeing musl used more and more in both Rust and Zig ecosystems lately.

glibc is LGPL. Static linking your application implies some obligation on your part. Musl being MIT is less restrictive.

[flagged]

Re: Oasis – a small, statically-linked Linux system

#40
post #15
post #9

What is the comparison between using musl and traditional glibc? Is there performance differences between the two? I have been seeing musl used more and more in both Rust and Zig ecosystems lately.

> What is the comparison between using musl and traditional glibc? you get weird bugs and failures that don't happen with glibc (like the incomplete dns resolving routines that would fail under some conditions) but you can brag about saving 30-40 mb of disk space. this project seems to be compromising on quality overall, in the name of having smaller size. Even BearSSL, by their own website is beta-quality: "Current…

> incomplete dns resolving routines

They eventually did fix this, as of musl 1.2.4.

Post reply on HN