4 ms·
A better way to do this analysis would be to build a Linux distribution with everything statically linked and compare to the normal version with dynamic linking
by devit 6y ago
A better way to do this analysis would be to build a Linux distribution with everything statically linked and compare to the normal version with dynamic linking, looking at disk space used, startup time, memory used, and time to launch specific applications both cold and hot.
- weinzierl 6y ago> A better way to do this analysis would be to build a Linux distribution with everything statically linked [..] Here you go: Stali https://dl.suckless.org/htmlout/sta.li/ https://dl.suckless.org/htmlout/sta.li/ "Stali distribution smashes assumptions about Linux" https://www.infoworld.com/article/3048737/stali-distribution-smashes-assumptions-about-linux.html https://www.infoworld.com/article/3048737/stali-distribution...
- devit 6y agoFor a useful comparison you need the static and dynamic distributions to be otherwise the same, i.e. you want to pick a mainstream distribution and build it from scratch with both static and dynamic linking and compare.
- a1369209993 6y agoI don't know of any mainstream distribution that doesn't make full-static-from-scratch builds gratuitously painful and difficult. Personally I gave up after trying to blunt-force-trauma glibc into linking correctly, though, so someone with more internals knowledge might have better success at it.
- yjftsjthsd-h 6y agoDepends on your ideas of "mainstream"; I expect nixos and gentoo are both happy to do such rebuilds for you. But, as you note, the real pain is that glibc really doesn't want you to do static builds... I wonder how gentoo and/or nixos support is for musl...
- marcthe12 6y agoYou going to have to disable PAM which basically limits the the stuff you can install. Also qt and Mesa are designed to be static libs so expect token stuff. I have some ideas to solve thisfor long time but any solution is going by in from multiple places.
- cryptonector 6y agoWhen during Solaris 10 development the "unified process model" was introduced, and static link archives for all system libraries removed, boot times improved dramatically because all the programs that run at boot time were then dynamically-linked and started faster than their previous statically-linked selves because the C library and such were already loaded. Later of course we had even more dramatic boot time improvements via SMF (the Solaris/Illumos predecessor to Linux's systemd). That was an apples-to-apples comparison of pre- and post-process model unification performance, and it was a win. Now, this was back in... I want to say 2003 or 2004 -- before S10 shipped. And it's possible that the same experiment today would not have the same result. I'm not sure how easy it would be to construct a distro with only dynamically-linked executables (at least for core libraries, like the C library) and then the same distro with only statically-linked executables. The S10 work was done by Roger Faulkner (RIP) and it was a huge change.