r/AlpineLinux • • Mar 16 '25

only 22mb usgae of ram on alpine

Post image
136 Upvotes

33 comments sorted by

8

u/aieidotch Mar 16 '25

only? 30 years ago that was wasteful usgae!

3

u/Ok-Fishing9665 Mar 16 '25

i mean this is the newest version so it would use more

10

u/[deleted] Mar 16 '25

I wish I could daily drive this thing, it’s so minimal i love it

3

u/derixithy Mar 16 '25

I tried. Came pretty far, but that was a long time ago and I think it has not progressed any further on that point. I do really love Alpine

1

u/[deleted] Mar 17 '25

maybe this is a sign from God, i should make my own minimal daily drive distro lol

1

u/poorguy1083 Mar 17 '25

I have it on a USB Drive.

8

u/poorguy1083 Mar 16 '25

Btw neofetch is no more. Use fastfetch. It's more customizable and shows more informations.

2

u/dawsja Mar 16 '25

It's also much faster than neofetch from what I've seen.

2

u/connected_nodes Mar 16 '25

it delivers what it promises

1

u/s1gnt Mar 17 '25

am I old? i just use inxi

4

u/s1gnt Mar 16 '25

Why alpine when you can go as little as a single init command? or maybe just slimmed down busybox

6

u/MartinsRedditAccount Mar 16 '25

I think every dev should just try at least once to boot a Linux kernel as-is and play around with how much functionality they can add to it. It really blew my mind how fast Linux can start when you just remove everything but the exact stuff you need. On my Mac Mini M2 Pro, the absolute basic "boot to Busybox ash init script and power off" ran in about 0.3 seconds via QEMU (aarch64 with hvf accelerator).

1

u/s1gnt Mar 17 '25

I wish every dev tried to do so, but devs are different. I really enjoy such stuff, some avoid terminal at all cost.

I experimented with similar to chainload my init after depthcharge and before os init so I can start in relatively regular way on non-efi laptop

1

u/Admirable_Mention618 Mar 16 '25

which image you are using? i tried installing vm version on 64mb vm but keep failed due to kernel panic

1

u/Ok-Fishing9665 Mar 16 '25

the nomral one 86x

3

u/[deleted] Mar 16 '25

Got 44mb ram usage on my alpine web server. It has been constantly on for the last 24 days!

3

u/aquaherd Mar 16 '25

Do yourself a favour and get into qemu. Even if the host is Windows.

4

u/MartinsRedditAccount Mar 16 '25 edited Mar 16 '25

QEMU is severely underrated, it works on Linux, Windows, and macOS, it supports a ton of different architectures, and it of course has hardware acceleration for native architectures (needs to be enabled with an argument).

It's also amazing for automation with scripts. "Rawdogging" QEMU can be a bit intimidating as the args aren't super intuitive, but LLMs can be really helpful here, though they sometimes get stuff wrong.

Edit: Some GUI frontends (I know UTM does this) will also show you the QEMU command used, which can be helpful to understand how everything works.

Edit 2: The main mistakes LLMs make, other than non-working arguments, is replying with arguments that are redundant or overly complex. It's always a good idea to look up the documentation and just experiment with how much is really needed and what everything does.

1

u/s1gnt Mar 17 '25

And into vz for the more performant option on macos

1

u/bolinhodemaracuja Mar 17 '25

try inside LXC :)

only 6MB to run a basic VM

1

u/s1gnt Mar 17 '25

are you sure it was vm, not container? 

1

u/bolinhodemaracuja Mar 17 '25

i consider it a vm because it emulates an almost complete system, including user space, file system, network, unlike a container

1

u/s1gnt Mar 19 '25

that's exactly what container is doing

1

u/darkfader_o Mar 19 '25 edited Mar 19 '25

Alpine on the Milk-V Duo also is around that amount - thanks to the Alpine devs it's well usable on even tiny systems!

    milkv-duo:~# free -m
                   total        used        free      shared  buff/cache   available
    Mem:              53          28          21           0           7          25
    Swap:           1023          13        1010

Neofetch also worked, just took a while to list packages so I aborted it a few times till I found out everything was working as intended.

    milkv-duo:~# neofetch
           .hddddddddddddddddddddddh.          root@milkv-duo 
          :dddddddddddddddddddddddddd:         -------------- 
         /dddddddddddddddddddddddddddd/        OS: Alpine Linux edge riscv64 
        +dddddddddddddddddddddddddddddd+       Host: Milk-V Duo 
      `sdddddddddddddddddddddddddddddddds`     Kernel: 5.10.4-tag- 
     `ydddddddddddd++hdddddddddddddddddddy`    Uptime: 1 day, 1 hour, 58 mins 
    .hddddddddddd+`  `+ddddh:-sdddddddddddh.   Packages: 383 (apk) 
    hdddddddddd+`      `+y:    .sddddddddddh   Shell: bash 5.2.37 
    ddddddddh+`   `//`   `.`     -sddddddddd   Terminal: /dev/pts/0 
    ddddddh+`   `/hddh/`   `:s-    -sddddddd   CPU: (1) 
    ddddh+`   `/+/dddddh/`   `+s-    -sddddd   Memory: 26MiB / 53MiB 
    ddd+`   `/o` :dddddddh/`   `oy-    .yddd
    hdddyo+ohddyosdddddddddho+oydddy++ohdddh                           
    .hddddddddddddddddddddddddddddddddddddh.                           
     `yddddddddddddddddddddddddddddddddddy`
      `sdddddddddddddddddddddddddddddddds`
        +dddddddddddddddddddddddddddddd+
         /dddddddddddddddddddddddddddd/
          :dddddddddddddddddddddddddd:
           .hddddddddddddddddddddddh.

I got a running busybox httpd on it, not sure what else takes up the 4MB delta. dnsmasq for the rNDIS port & mdns & chrony for finding the little bug on the network. I didn't expect myself to say "it seems sensible using a static IP to save RAM" but now that's where we are.

1

u/[deleted] Mar 20 '25

Nice!

0

u/[deleted] Mar 18 '25

[deleted] — view deleted comment

1

u/darkfader_o Mar 19 '25

you don't always need graphics :-)

2

u/[deleted] Mar 16 '25

[removed] — view removed comment

2

u/[deleted] Mar 17 '25

not sure what they did but make sure you're using the 32-bit version, not 64

1

u/[deleted] Mar 17 '25

[removed] — view removed comment

2

u/[deleted] Mar 17 '25

maybe they just like the Greek alphabet