distr1 / distri

a Linux distribution to research fast package management
https://distr1.org
Other
532 stars 28 forks source link

Image size #91

Closed markusbkk closed 1 year ago

markusbkk commented 1 year ago

I notice the image on the distri website is quite large (8GB uncompressed).

Is this a natural drawback to the architecture, or do you just ship a lot of packages with the base distro? My internet is slow and I'm stricken with the flu RN, or I'd check it out myself.

I'm working on my own ChromeOS alternative. Using something like distri would, on a cursory inspection, be more manageable than a Gentoo or Debian base image. Especially since distri uses Go, just like my custom desktop environment and other bits and pieces.

stapelberg commented 1 year ago

Hey! 👋

I notice the image on the distri website is quite large (8GB uncompressed).

Is this a natural drawback to the architecture, or do you just ship a lot of packages with the base distro?

Neither. The disk image is sized to 8G just to have enough room to do something useful (install few packages, for example) without having to resize.

The actual disk usage is ≈3.6 GB. The size breakdown looks like this:

distri-du

There are a couple of packages that could probably be split into multiple, more specific packages (e.g. linux-firmware, or splitting locales out of glibc). In other cases, changing what we install by default (e.g. removing chrome) would help, and in yet other cases it’s up to the overall Linux ecosystem to change (e.g. polkit depending on mozjs)

In general, distri has never optimized for disk size, it primarily has optimized for speed. Obviously having smaller package images helps optimize transfer speed, so it’s not entirely out of scope to make packages smaller. (But, personally I like to explore things with distri where I’m uncertain, not things where I already know they can be done, like reducing package size by splitting them up.)

In issue https://github.com/distr1/distri/issues/28, there are a couple of ideas regarding reducing disk usage for the case of the distri Docker container specifically.

Hope this gives you a good insight into where things stand.

Also, get well soon :)

markusbkk commented 1 year ago

Hey! 👋

I notice the image on the distri website is quite large (8GB uncompressed). Is this a natural drawback to the architecture, or do you just ship a lot of packages with the base distro?

Neither. The disk image is sized to 8G just to have enough room to do something useful (install few packages, for example) without having to resize.

The actual disk usage is ≈3.6 GB. The size breakdown looks like this:

distri-du

There are a couple of packages that could probably be split into multiple, more specific packages (e.g. linux-firmware, or splitting locales out of glibc). In other cases, changing what we install by default (e.g. removing chrome) would help, and in yet other cases it’s up to the overall Linux ecosystem to change (e.g. polkit depending on mozjs)

In general, distri has never optimized for disk size, it primarily has optimized for speed. Obviously having smaller package images helps optimize transfer speed, so it’s not entirely out of scope to make packages smaller. (But, personally I like to explore things with distri where I’m uncertain, not things where I already know they can be done, like reducing package size by splitting them up.)

In issue #28, there are a couple of ideas regarding reducing disk usage for the case of the distri Docker container specifically.

Hope this gives you a good insight into where things stand.

Also, get well soon :)

Ah! My bad. I managed to eventually download the img.zst (img.gz wouldn't be recognized by gunzip for some reason) and, upon running df -H, I saw where I made the wrong assumption coming mostly from .iso images.

I really like what I see, thus far. It's really snappy. The way it only mounts the FUSE parts when you actually need them is nice, too.

mozjs won't be a problem for me, since my own little project needs it too. chrome should be easy enough to remove

stapelberg commented 1 year ago

I managed to eventually download the img.zst (img.gz wouldn't be recognized by gunzip for some reason)

With which tool did you download the .gz version?

For me, these steps worked just now:

% cd /tmp
% wget https://repo.distr1.org/distri/supersilverhaze/img/distri-disk.img.gz
% gunzip distri-disk.img.gz
% ls -lh distri-disk.img
-rw-r--r-- 1 michael michael 8,0G 2022-11-12 19:44 distri-disk.img
markusbkk commented 1 year ago

I managed to eventually download the img.zst (img.gz wouldn't be recognized by gunzip for some reason)

With which tool did you download the .gz version?

For me, these steps worked just now:

% cd /tmp
% wget https://repo.distr1.org/distri/supersilverhaze/img/distri-disk.img.gz
% gunzip distri-disk.img.gz
% ls -lh distri-disk.img
-rw-r--r-- 1 michael michael 8,0G 2022-11-12 19:44 distri-disk.img

I used Firefox. Had some issues with my network that day though (surveillance in Germany is getting really bad, lately) so maybe it was just that.

stapelberg commented 1 year ago

I just tried it in Firefox, and it worked there as well. Strange.

Anyway, I’ll close this issue for now :)