Live data from Hacker News

There are only 12 binaries in Talos Linux

siderolabs.com

21–30 of 73 posts

Re: There are only 12 binaries in Talos Linux

#22
post #9

It's disingenuous to say that /sbin/init (machined/main.go) is less than 400 lines of code. Sure, that file is. What about all of the in-tree modules that are being imported? A super lazy summing of Go lines in the master branch of the repo: $ find . -name *.go | xargs wc -l | tail -1 354085 total Heck, there are almost 100k lines under internal/app! $ find internal/app -name *.go | xargs wc -l | tail -1 96885 total…

I know there are a lot more lines and I didn’t count any of the imports from systemd either. 300 loc (machined) vs 3000 loc (systemd) was the closest comparison I could think of without crawling all imports and deps. Would be happy to update with a different comparison you think is more fair.

How about we just don't compare lines of code at all, as if it's a useful metric of anything?

Re: There are only 12 binaries in Talos Linux

#23

The /sbin/init binary is hard linked to /sbin/dashboard, /sbin/poweroff, /sbin/shutdown, and /sbin/wrapperd. While this technically is 5 files, it’s a single file hard linked 4 times to provide convenience commands. Err, that's definitely 1 file with 5 directory entries, not 5 files.

Wonder why they would use hard links instead of symlinks. Edit: interesting, seems like there's a mild performance benefit. https://unix.stackexchange.com/a/20716

There's a lot of benefits actually, as symbolic links often need to be handled as a completely different type of file with different semantics which often leads to bugs. Hard links are always better when you know you are dealing with a single static host & filesystem. Symbolic links in such a case are only better for indicating quickly to the user which files are linked to which others.

Re: There are only 12 binaries in Talos Linux

#24

The /sbin/init binary is hard linked to /sbin/dashboard, /sbin/poweroff, /sbin/shutdown, and /sbin/wrapperd. While this technically is 5 files, it’s a single file hard linked 4 times to provide convenience commands. Err, that's definitely 1 file with 5 directory entries, not 5 files.

Wonder why they would use hard links instead of symlinks. Edit: interesting, seems like there's a mild performance benefit. https://unix.stackexchange.com/a/20716

Reverse question: why use symlinks when you can get away with hard links?

Re: There are only 12 binaries in Talos Linux

#25
post #4

Earlier quoted context omitted.

The systemd hate is getting long in the tooth now. It's not like it doesn't do anything with its line count, or that the code is obfuscated.

I’m actually a big fan of systemd. It’s an awesome, general purpose, and flexible init system. I don’t think the complexity it brings is required for Kubernetes.

There's work in a new kublet replacement that moves things that would normally go into daemonset into systemd (or something like systemd).

There's also a neat feature of podman that runs pods as systemd units, which is a nice intermediate step between a more traditional pet server and a full kubernetes cluster.

Re: There are only 12 binaries in Talos Linux

#26

20 years ago, I used to make custom Linux distros for fun. Floppy distros, CDROM distros, RAM-resident distros, network-boot distros. In a few of them, I custom-made my own binary that was both the init system, and a few applications, stripped it down, and shipped just that as the distro (basically just a few files and my static binary). A lot of people downloaded them, and it was great fun - to start. Problem is whe…

In the case of Talos, Kubernetes can provide the flexibility you want from a more traditional Linux distribution.

Re: There are only 12 binaries in Talos Linux

#28
post #6
post #2

>As opposed to systemd which is over 3000 lines of C code I’ll never comprehend. Well, technically true, but systemd is a whole lot more than 3000 lines... I can see another binary in the demo video called apid, does that one not count? Any comparison with Bottlerocket OS?

In retrospect, it would've saved a lot of trouble and misunderstandings if systemd had called the init daemon "systemd-init" to make it clear that not literally everything that is under the umbrella is part of the init daemon.

Eh... Most of the other components have a hard dependency on the init part; I'm not convinced that they're all that separate.

Re: There are only 12 binaries in Talos Linux

#29
post #4
post #2

>As opposed to systemd which is over 3000 lines of C code I’ll never comprehend. Well, technically true, but systemd is a whole lot more than 3000 lines... I can see another binary in the demo video called apid, does that one not count? Any comparison with Bottlerocket OS?

The systemd hate is getting long in the tooth now. It's not like it doesn't do anything with its line count, or that the code is obfuscated.

I'm not reading that as hate, I read that as criticising systemd in the context of a stripped down system designed to do one thing.

I have systemd on the laptop I am typing on right now. Do I want it on some tiny embedded linux device? probably not.

Re: There are only 12 binaries in Talos Linux

#30
post #4

Earlier quoted context omitted.

The systemd hate is getting long in the tooth now. It's not like it doesn't do anything with its line count, or that the code is obfuscated.

I'm not reading that as hate, I read that as criticising systemd in the context of a stripped down system designed to do one thing. I have systemd on the laptop I am typing on right now. Do I want it on some tiny embedded linux device? probably not.

Thanks for clarifying because that was the vibe I was going for (not hate).

I'm using projectbluefin.io for all my laptops/desktops and love it. Wouldn't want the same on single-purpose, production servers.

Post reply on HN