Tiny Core Extensions > TCE Tips & Tricks

TC17 needs RAM: 71MB(CLI) or 90MB(GUI) just to run

(1/2) > >>

nick65go:
Using QEMU emulator version 10.2.1, I tested the requested RAM to run the latest TC17 32 bits (kernel 6.12). Before thinking to improve TC, I need to measure its PRACTICAL demands, which for me now seems to be minimum 256 MB RAM without a HDD/USB storage touching.
--- Code: --- qemu-system-i386 -accel tcg -cpu 486-v1 -machine pc -m 128M -cdrom TinyCore-17.0.iso
--- End code ---
total memory 128M= 128*1024= 131,072 = TOTAL(117,704) +swap=17,816 (13%); remains free=79,932

minim RAM to boot in command prompter (no GUI)=71MB; at 70MB RAM will not boot.
total memory 71M= 71*1024= 72,704 KB => TOTAL(59,132) +swap=2,472 (13%); remains free=23,496 KB
what you can do with less than 24 MB free is now up to you.


--- Code: ---qemu-system-i386 -accel kvm -machine pc -m 90M -cdrom TinyCore-17.0.iso

--- End code ---
GUI at 89MB RAM will not boot. With GUI, minim RAM=90MB, total useful=78,428, swap=7,788, free to use=13,804 KB (so near useless). Of course, you could have a swap on HDD (not in RAM, by remastering), delete after boot the not-needed drivers (network mostly) so maybe get some 4MB more to use. Or else use a not-supported "scattered" install TC on HDD.

This proves that using TC17 (kernel 6.12 or 6.18) for a very old PC with less than 90MB RAM is good as a prove of concept, but near useless daily. So you need at least 128MB RAM and humble acknowledge your pay-grade (application total space less than 79 MB) with such a constrained 486 device.
Demo: I just add fluff.tcz and freemem is now 8MB (from initial 128 MB RAM).

Summary:
1. for users of limited /less than 128 MB RAM, try do NOT update TC over version 17. You gain nothing.

2. for RAM=256MB, I boot fresh and add fluff.tcz (minim FLTK GUI file manager), then dillo.tcz (minim internet GUI browser for forum help) and then abiword.tcz (or +gnumeric.tcz add +2MB) for some "productive" work. Now the freemem=17MB (to save some documents in RAM). So now add alsa.tcz for sound (+2.3MB). I can NOT add mplayer-cli.tcz (it asks for extra 66 MB), neither vlc.tcz (asks for 99MB just to install it). So I could settle to just listing music only (not movies) by using mpd-minimal.tcz (asks for 9MB) or cmus.tcz (I did not find in TC17 the xmms.tcz).
This is a variant/experience of what you may expect from limited 256MB RAM. Same as you would expect from (now dead/frozen) DSL - Damn Small Linux. Oh boy, sic transit gloria mundi.

FYI: intentionally I did not use some HDD space, to be fully nomadic + no trace on HDD.
My original purpose was to test if latest TC17 truly runs on just 486 CPU instructions (so I used qemu -accel tcg -cpu 486), and to demystify that TC17 can run on less than 71 MB (CLI) or 90 MB (GUI). Q:E.D

Rich:
Hi nick65go

--- Quote from: nick65go on March 11, 2026, 03:55:54 PM --- ... Of course, you could have a swap on HDD (not in RAM, by remastering), ...
--- End quote ---
You don't need to remaster anything. Take a thumb drive and place a swap
partition on it. If a swap partition is present when booting, Tinycore will find it.

/init reserves 25% of RAM for zswap. When RAM is tight, a swap partition and
nozswap  boot code will help.


--- Quote --- ... (I did not find in TC17 the xmms.tcz). ...
--- End quote ---
sox.tcz is available.

nick65go:
Hi @Rich, thanks for your replay.
Today I can not buy (in the country where I live) any device with less than [2..4] GB RAM: and I have 32 GB RAM in latest laptop  ;)  . Basically I have no problem with any linux distro. For me is just intellectual challenge to " improve" the specifications, like what could be the minimum RAM required to run TC17 32 bit version.

So for me, in TC environment, I would like to push the hardware request to the minimum, without changing many things that can be upgraded with next TC version.
I consider hardware RAM more important than swap HDD, because someone can buy a new CDROM-disk or USB-pen more easy than upgrade the RAM memory (which is specific to machine socket, size, etc). Plus the RAM usually comes in lots of 64MB, 128 MB, 256 MB and further combinations. Starting from RAM 256 MB is no focus for me to "improve" a TinyCore-17.0.iso of 25MB.

But I think that TC17 could boot/run usable in less than 64MB, a possible nice achievement to advertise to TC web-site. The goal will be to improve the core CLI, because when considering GUI is game over for less than 64MB.
One idea is about /init, specifically the
--- Code: ---inodes=`grep MemFree /proc/meminfo | awk '{printf("%d\n", $2/3)}'`
mount / -o remount,size=90%,nr_inodes=$inodes
--- End code ---
The 10% default choose for RAM swap from 64MB could be bypassed with a IF/case for MeeFree < 64MB, so TC17 can be used as CLI rescue CD/USB. The only thing 90% RAM is used is because cmd line parameter "noembed" for tar + switch_root, which is not justified for less than 64MB RAM.

A 2-nd idea is about to do not automatically load in RAM what you not need just to boot and rescue. Like no network-card driver into modules.gz, but load later from another net-drv.gz if necessary. So split modules.gz in 2-3 parts.

A 3-rd idea can be to split /bin/busybox in the pieces, you already did it using busybox.id (is suid). Some busybox applets maybe are not necessary at boot/rescue (fonts, dumpkey, etc).

A 4-th idea, things like /bin{e2fsk, mke2fs} + /usr/lib{lib*, gconv} can be in another gz/tcz loaded on demand (or RAM> 64MB).

Summary: TC will have ALL original programs (some loaded on demand), with few structural changes. Feed-back is welcome, why is too much effort or not good/practical ideas for extreme limited RAM. Or maybe not too many TC users still use 486 CPU + 64MB RAM.

Rich:
Hi nick65go

--- Quote from: nick65go on March 12, 2026, 05:29:20 AM --- ... One idea is about /init, specifically the
--- Code: ---inodes=`grep MemFree /proc/meminfo | awk '{printf("%d\n", $2/3)}'`
mount / -o remount,size=90%,nr_inodes=$inodes
--- End code ---
The 10% default choose for RAM swap from 64MB ...
--- End quote ---
Sorry, my mistake. zswap is set up in tc-config and is 25% of free RAM:

--- Code: ---tc@HP-G62:~/Downloads$ grep zram /etc/init.d/tc-config
        while [ ! -e /dev/zram0 ]; do usleep 50000; done
        grep MemFree /proc/meminfo | awk '{printf("%dK\n", $2/4)}' > /sys/block/zram0/disksize
        mkswap /dev/zram0 >/dev/null 2>&1
        swapon /dev/zram0
        echo "/dev/zram0  swap         swap    defaults,noauto   0       0" >> /etc/fstab # Lets swapoff -a work
--- End code ---

nick65go:
Calculation for minim RAM need to load (core.gz + vmlinuz) in memory, using 7zip.exe from windows11.
Isolinux needs to load + keep the lump-sum of the following pieces (in Bytes!):
A  = core.gz = 13,952,288
A1 = core.cpio = 20,470,784 (un-gzip of core.gz)

B = vmlinuz = 6,087,168 [sectionions: b1 +b2 +b3]
 b1 = name.1 = 16,532
 b3 = name.3 = 47,225
 b2 = 2.gz   = 6,023,411 (is gzip of .text section =c)
   c = 2.gz-ungipped = 13,092,640 (= 1.elf + name.2)

So total = (A +A1) + (B + b1 +b3 + b2 + c) =
= (13,952,288 + 20,470,784) + (16,532 + 47,225 + 6,023,411) + 13,092,640
= 53,602,880 bytes (aprox. 53 MB)

so even without delayed/ondemand load of network drivers (= 5,935,341 bytes)
(TinyCore-17.0.iso\boot\core.gz\core.cpio\lib\modules\6.18.2-tinycore\kernel\drivers\net\)
we could boot CLI with 53MB RAM, practically with physical 64MB RAM.

FYI: you do remember that linux booted from floppy and have a lot of rescue tools. Do not you challenge yourself in these day to squeeze more from this modern TC?
Would @curaga or @juanito consider inserting a new line in /init script to test condition MemFree<64MB for 100% instead of 90% remount rw?
Or even better, a case tests for some RAM ranges, because (for example) at 16GB-32GB someone may not need zram of 10% in TC. latest kernel are better at OOM (out of memory) stress to do not freeze the system.

Navigation

[0] Message Index

[#] Next page

Go to full version