aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2024-03-10-the-abysmal-state-of-linux-in-the-year-2024.md
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2024-03-11 07:27:43 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2024-03-11 07:27:43 +0100
commit60dc94097de7affdd49a838d411215639b4ea3b3 (patch)
tree9c928571d267463e5a6fe9caae5089f4b5133d66 /content/posts/2024-03-10-the-abysmal-state-of-linux-in-the-year-2024.md
parentb0112ae6881c663d7004224234a750e76baff5d4 (diff)
downloadmitjafelicijan.com-60dc94097de7affdd49a838d411215639b4ea3b3.tar.gz
Update to post
Diffstat (limited to 'content/posts/2024-03-10-the-abysmal-state-of-linux-in-the-year-2024.md')
-rw-r--r--content/posts/2024-03-10-the-abysmal-state-of-linux-in-the-year-2024.md259
1 files changed, 257 insertions, 2 deletions
diff --git a/content/posts/2024-03-10-the-abysmal-state-of-linux-in-the-year-2024.md b/content/posts/2024-03-10-the-abysmal-state-of-linux-in-the-year-2024.md
index d3b7bc9..da526c7 100644
--- a/content/posts/2024-03-10-the-abysmal-state-of-linux-in-the-year-2024.md
+++ b/content/posts/2024-03-10-the-abysmal-state-of-linux-in-the-year-2024.md
@@ -1,11 +1,13 @@
1--- 1---
2title: "The abysmal state of Linux in the year 2024" 2title: "The abysmal state of Linux in the year 2024 and a case against shared object libraries"
3url: the-abysmal-state-of-linux-in-the-year-2024.html 3url: the-abysmal-state-of-linux-in-the-year-2024-and-a-case-against-shared-object-libraries.html
4date: 2024-03-10T21:41:52+01:00 4date: 2024-03-10T21:41:52+01:00
5type: post 5type: post
6draft: false 6draft: false
7--- 7---
8 8
9## Personal critique
10
9This is in part difficult to write, but then I think it is necessary. How 11This is in part difficult to write, but then I think it is necessary. How
10come Linux is worse than it was 10 years ago. This may very well be 12come Linux is worse than it was 10 years ago. This may very well be
11a subjective opinion, or maybe I am looking at the situation with 13a subjective opinion, or maybe I am looking at the situation with
@@ -61,6 +63,248 @@ tried to solve some of these things, but until a distribution comes out
61that is completely devoid of shared dependencies, we will still live in 63that is completely devoid of shared dependencies, we will still live in
62this purgatory. 64this purgatory.
63 65
66Let's compare these two distributions when it comes to packages sizes
67and shared object libraries and see they fair.
68
69## Debian
70
71```ini
72root@debian: cat /etc/os-release
73
74PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
75NAME="Debian GNU/Linux"
76VERSION_ID="12"
77VERSION="12 (bookworm)"
78VERSION_CODENAME=bookworm
79ID=debian
80HOME_URL="https://www.debian.org/"
81SUPPORT_URL="https://www.debian.org/support"
82BUG_REPORT_URL="https://bugs.debian.org/"
83```
84
85### Top 20 packages by size
86
87```sh
88dpkg-query -W --showformat='${Installed-Size}\t${Package}\n' | sort -nr | head -n 20 | awk '{size=$1;unit="KB"; if (size >= 1024) {size=size/1024; unit="MB"}; if (size >= 1024) {size=size/1024; unit="GB"}; printf "%.2f %s\t%s\n", size, unit, $2}'
89```
90
91| Size | Package |
92|-----------|----------------------------|
93| 651.87 MB | libwine |
94| 389.26 MB | linux-image-6.1.0-18-amd64 |
95| 345.76 MB | brave-browser |
96| 323.74 MB | google-chrome-stable |
97| 265.31 MB | llvm-14-dev |
98| 225.76 MB | firefox-esr |
99| 141.77 MB | fluid-soundfont-gm |
100| 114.67 MB | libreoffice-core |
101| 113.41 MB | containerd.io |
102| 112.77 MB | libnvidia-rtcore |
103| 111.92 MB | libllvm15 |
104| 106.56 MB | ibus-data |
105| 104.92 MB | libllvm14 |
106| 99.20 MB | docker-ce |
107| 77.39 MB | docker-buildx-plugin |
108| 72.00 MB | libwebkit2gtk-4.1-0 |
109| 71.93 MB | libwebkit2gtk-4.0-37 |
110| 70.51 MB | libwebkitgtk-6.0-4 |
111| 69.25 MB | nvidia-kernel-dkms |
112| 66.64 MB | gcc-12 |
113
114This is more or less fresh system that is being used daily for work.
115
116### Number of packages installed
117
118```sh
119dpkg -l | grep '^ii' | wc -l
120
1212217
122```
123
124### Number of shared object libraries on system (*.so)
125
126*Note: Some of them could be symlinks to each other so take this with
127a grain of salt.*
128
129```sh
130find /lib /lib64 /usr/lib /usr/lib64 -follow -type f -name "*.so.*" | wc -l
131
1325156
133```
134
135### Shared objects sorted by size
136
137```sh
138find /lib /lib64 /usr/lib /usr/lib64 -type f -name "*.so.*" -exec du -h {} + | sort -rh | head -n 20
139```
140
141| Size | Package |
142|------|----------------------------------------------------------------|
143| 113M | /usr/lib/x86_64-linux-gnu/libnvidia-rtcore.so.525.147.05 |
144| 112M | /usr/lib/x86_64-linux-gnu/libLLVM-15.so.1 |
145| 105M | /usr/lib/x86_64-linux-gnu/libLLVM-14.so.1 |
146| 70M | /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so.0.12.8 |
147| 70M | /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37.67.8 |
148| 69M | /usr/lib/x86_64-linux-gnu/libwebkitgtk-6.0.so.4.4.8 |
149| 57M | /usr/lib/llvm-14/lib/libclang-cpp.so.14 |
150| 45M | /usr/lib/x86_64-linux-gnu/libnode.so.108 |
151| 43M | /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.525.147.05 |
152| 41M | /usr/lib/x86_64-linux-gnu/libnvidia-eglcore.so.525.147.05 |
153| 31M | /usr/lib/x86_64-linux-gnu/libmozjs-102.so.102.15.1 |
154| 30M | /usr/lib/x86_64-linux-gnu/libicudata.so.72.1 |
155| 30M | /usr/lib/x86_64-linux-gnu/libclang-14.so.14.0.6 |
156| 29M | /usr/lib/x86_64-linux-gnu/nvidia/current/libcuda.so.525.147.05 |
157| 28M | /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-6.0.so.1.1.14 |
158| 28M | /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.1.so.0.4.14 |
159| 28M | /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so.18.23.14 |
160| 24M | /usr/lib/x86_64-linux-gnu/libnvidia-glvkspirv.so.525.147.05 |
161| 23M | /usr/lib/x86_64-linux-gnu/libz3.so.4 |
162| 22M | /usr/lib/x86_64-linux-gnu/libgs.so.10.00 |
163
164## Fedora
165
166```ini
167root@fedora: cat /etc/os-release
168
169NAME="Fedora Linux"
170VERSION="36 (Workstation Edition)"
171ID=fedora
172VERSION_ID=36
173VERSION_CODENAME=""
174PLATFORM_ID="platform:f36"
175PRETTY_NAME="Fedora Linux 36 (Workstation Edition)"
176ANSI_COLOR="0;38;2;60;110;180"
177LOGO=fedora-logo-icon
178CPE_NAME="cpe:/o:fedoraproject:fedora:36"
179HOME_URL="https://fedoraproject.org/"
180DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"
181SUPPORT_URL="https://ask.fedoraproject.org/"
182BUG_REPORT_URL="https://bugzilla.redhat.com/"
183REDHAT_BUGZILLA_PRODUCT="Fedora"
184REDHAT_BUGZILLA_PRODUCT_VERSION=36
185REDHAT_SUPPORT_PRODUCT="Fedora"
186REDHAT_SUPPORT_PRODUCT_VERSION=36
187PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
188SUPPORT_END=2023-05-16
189VARIANT="Workstation Edition"
190VARIANT_ID=workstation
191```
192
193### Top 20 packages by size
194
195```sh
196rpm -qa --queryformat '%{SIZE}\t%{NAME}\n' | sort -rn | head -n 20 | awk '{size=$1;unit="B"; if (size >= 1024) {size=size/1024; unit="KB"}; if (size >= 1024) {size=size/1024; unit="MB"}; if (size >= 1024) {size=size/1024; unit="GB"}; printf "%.2f %s\t%s\n", size, unit, $2}'
197```
198
199| Size | Package |
200|-----------|------------------------------|
201| 572.91 MB | google-cloud-sdk |
202| 559.76 MB | wine-core |
203| 530.12 MB | wine-core |
204| 383.76 MB | code |
205| 350.98 MB | golang-bin |
206| 318.04 MB | brave-browser |
207| 302.78 MB | google-chrome-stable |
208| 282.24 MB | libreoffice-core |
209| 273.43 MB | firefox |
210| 253.00 MB | ocaml |
211| 223.60 MB | proj-data-us |
212| 219.46 MB | zoom |
213| 217.81 MB | glibc-all-langpacks |
214| 199.31 MB | qemu-user |
215| 196.79 MB | edk2-aarch64 |
216| 194.77 MB | fluid-soundfont-lite-patches |
217| 194.25 MB | java-17-openjdk-headless |
218| 176.75 MB | java-11-openjdk-headless |
219| 156.80 MB | pandoc |
220| 154.82 MB | qt5-qtwebengine |
221
222What is interesting that the most of these packages are from a a system
223that are daily in use.
224
225### Number of packages installed
226
227```sh
228dnf list installed | tail -n +3 | wc -l
229
2303484
231```
232
233### Number of shared object libraries on system (*.so)
234
235*Note: Some of them could be symlinks to each other so take this with
236a grain of salt.*
237
238```sh
239find /lib /lib64 /usr/lib /usr/lib64 -follow -type f -name "*.so.*" | wc -l
240
2418894
242```
243
244### Shared objects sorted by size
245
246```sh
247find /lib /lib64 /usr/lib /usr/lib64 -type f -name "*.so.*" -exec du -h {} + | sort -rh | head -n 20
248```
249
250| Size | Package |
251|------|--------------------------------------------------------------------------------|
252| 128M | /usr/lib64/libQt5WebEngineCore.so.5.15.10 |
253| 55M | /usr/lib64/llvm13/lib/libclang-cpp.so.13 |
254| 53M | /usr/lib64/libclang-cpp.so.14 |
255| 50M | /usr/lib64/libwebkit2gtk-4.0.so.37.57.6 |
256| 49M | /usr/lib64/libnode.so.93 |
257| 45M | /usr/lib64/libOpenImageDenoise.so.1.4.3 |
258| 33M | /usr/lib64/llvm13/lib/libclang.so.13.0.1 |
259| 30M | /usr/lib64/libclang.so.14.0.5 |
260| 29M | /usr/lib64/libopenvdb.so.9.0.0 |
261| 28M | /usr/lib/libicudata.so.69.1 |
262| 28M | /usr/lib64/libmozjs-78.so.0.0.0 |
263| 28M | /usr/lib64/libicudata.so.69.1 |
264| 26M | /usr/lib64/libusd_usd_ms.so.0 |
265| 26M | /usr/lib64/libgdal.so.30.0.3 |
266| 22M | /usr/lib64/libjavascriptcoregtk-4.0.so.18.21.6 |
267| 22M | /usr/lib64/libgs.so.9.56 |
268| 22M | /usr/lib64/google-cloud-sdk/platform/bundledpythonunix/lib/libpython3.9.so.1.0 |
269| 17M | /usr/lib64/libgtkd-3.so.0.9.0 |
270| 17M | /usr/lib64/libgeocoding.so.8.12 |
271| 14M | /usr/lib64/libmfxhw64.so.1.35 |
272
273## Quick observation
274
275```
276/usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-6.0.so.1.1.14
277/usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.1.so.0.4.14
278/usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so.18.23.14
279```
280
281These three packages are probably used by three different applications,
282and nothing else needs them. I could be mistaken, but in any case they
283should just be packages alongside the application that requires them
284and be done with it.
285
286## So, now what?
287
288The main point is that, yes these packages can be big, but if we are
289honest, what would a couple of additional megabytes that would include
290shared object libraries actually do? Probably nothing! And it would make
291maintenance an entirely different game.
292
293There is also this big elephant in the room, the users. They aren't
294concerned about package dependencies. They don't care if an application
295is 20 MB bigger. Nobody cares! But they certainly do care about borked
296systems and non-working dependencies and hunting for solutions why
297`libFlac` was not found even though they have it installed.
298
299Operating systems should abstract these complexities away from the
300user. And I am not saying that the Linux kernel is at fault. I mean the
301operating system as a whole.
302
303This is why I am a massive proponent of
304[AppImages](https://appimage.org/). Flatpaks and Snaps are OK, but they
305still have their own package management and the whole dependency problem
306because they try to optimize for space, and they sacrifice the simplicity.
307
64It would be an interesting exercise to make a prototype distribution 308It would be an interesting exercise to make a prototype distribution
65that does not rely on shared objects, but has everything packed in 309that does not rely on shared objects, but has everything packed in
66AppImages. Probably a foolish endeavor, but maybe worth looking into. I 310AppImages. Probably a foolish endeavor, but maybe worth looking into. I
@@ -73,6 +317,17 @@ more options we have, the worse it gets. Wayland competing with X. So
73many window managers, you just get lost. So many choices. I have no idea 317many window managers, you just get lost. So many choices. I have no idea
74if this is even salvageable, or something new must be invented. 318if this is even salvageable, or something new must be invented.
75 319
320Honorable mention goes to [AppImageHub](https://www.appimagehub.com/). If
321possible, I continually try to find applications there and take care of
322updating them myself. I don't need hand holding or a constant up-to date
323system. I just want my system to be stable and when some application has
324gotten some significant new features I can download that myself. It's
325about the choice and not being forced into this churn that requires
326constant updating and keeping up with things. At this point, using Linux
327is more like a second job, and I was so stoked when this was not a case
328anymore in the past. This is why I feel like the last 10 years were a
329regression disguised as progress.
330
76Some interesting talks and videos 331Some interesting talks and videos
77 332
78- [Jonathan Blow on how an operating system should work](https://www.youtube.com/watch?v=k0uE_chSnV8) 333- [Jonathan Blow on how an operating system should work](https://www.youtube.com/watch?v=k0uE_chSnV8)