Diet Pi run in RAM?

I’m new to Diet pi. I have a few (a lot) of wireless Raspberry Pi Zero W security cameras. Currently using RPi WebCam interface distro, Apache server for the web page display. I use Raspian Stretch. I want to go to a lower resource intensive OS.
I heard of Tiny Core and Diet Pi. Does Diet Pi run on RAM as Tiny Core?

What are the pros and cons : DietPi vs. Tiny Core.

Any info would be appreciated.

CJ01
Tiny Core and DietPi are hard to compare, as they are totally different concepts:

  • Tiny Core is a completely independent own Linux distribution that really brings not much more than the Linux kernel, busybox which brings a purged down set of usual Linux commands you would expect within the shell, and it’s own supporting commands, a bid similar perhaps to the ones DietPi offers (/boot/dietpi/ files). If you check the size of /boot, you see that the Linux kernel itself + bootloader + custom kernel addition and the whole bunch of DietPi scripts does not take much space. All DietPi scripts is about 1.3M. Busybox is ~2M AFAIK. For this Tiny Core is extremely tiny and can run completely inside RAM. DietPi in comparison just runs it’s own scripts inside ram disk: /DietPi/. What really takes space is hardware drivers and software blobs that you will find on common Linux systems.
  • DietPi is based on Debian/Raspbian, thus brings the whole (although very purged down to the system minimum) Debian APT and systemd system. Thus you are able to do all core system, networking and software configurations and installation as you expect from a Debian (or Ubuntu) system. Most importantly the official Debian/Raspbian APT repository is used, thus you can install the extremely wide range of software packages from there, which makes DietPi very flexible from the comfortable end user perspective, which just wants to have its forum, sync- and share server, web page or media streaming server etc. at home.
  • On Tiny Core, there is a (compared) very limited own maintained software repository, so you will find the most important things there but clearly you will often run into the situation that a specific software title you expect on Linux systems will be not available and you need to install manually from source code. I somehow can’t open the repo browser, but here you get an idea: http://wiki.tinycorelinux.net/wiki:applications. And for sure, as the Linux kernel does not natively support much hardware, e.g. GPU support for SBCs, network dongles, audio and all such needs to be installed manually as well.
  • If you really have a specific use case for your device, and you know that the needed software and hardware drivers are available with Tiny Core, then it is an extremely lightweight and fast. But if you used other Linux distributions before, don’t expect it to behave too similar and many stuff surely needs to be applied/installed manually.

@MichaIng
Thanks so much for the detailed explanation of both. For my current project mentioned I believe I’ll use Diet Pi. It seems less space and less overhead than the Raspian lite (headless mode) but will most likely have more default packages installed that I need. Plus I can install only what I need. I was not so much concerned with the actual space on the SD card but the resources being used as I plan to make them solar, charging the batteries during sunlight and run on the batteries at night. I also have found code that will power off the HDMI and USB port saving more power when it’s running on batteries. I also plan on using RSYNC instead of OWNCloud /NextCloud or other cloud packages. It’s good enough for my needs.

Thanks again.

Even if this is an old thread…the original question is interesting and not really answered (or I dont get it, sorrry)…

I use machines which have enough Ram like at least 2GB up to 16GB. So for me, its not the question if tinycore or others have a littlebit smaller or bigger footprint.

For me it is about reducing any IO-Overhead and have a system as quiet as possible, as I still optiomize for a Highend-Audio-Streamer-Setup.

When you look into AudioLinux, Gentooplayer, Snakeoil or even Puppy (based on bullseye even) and other specializd Linux-Distros for audio, most of them advertise these capabilities:

  • Linux runs in Ram completely
  • The audio files played back are completely in Ram
    -Gentooplayer even seems to be able to load the files into ram and switches automatically ethernet off /goes in energy saving mode and back on when the buffered file is consumed.

I just want to be sure if I understood it right:

  • I boot with kernel command “quiet”, so many logs are not there anyhow anymore
  • Dietpi comes with a kind of “Log2Ram”, so logfiles are going to RAM
  • Swap-Files I disabled anyhow.
  • The system loads all drivers etc into Ram,

Soooo once bootet we dont have any activity with the boot media anymore…? Dietpi runs completely from Ram ?

The buffering of the audiofiles in MPD is back with the Input_Cache function.

The automatzic disabling/enabling of ethernet (from MPD) in Dietpi would be interesting, no idea how to do that or if ethtool can help there.

The entire os is not loaded into memory.

I see…do you have any guidance how to change that and have everything in Ram ? When Puppy can do it with bullyeye, Dietpi should be able as well I guess…?

I think it’s not as easy as you maybe expect.
See:
https://gist.github.com/avinash-oza/9791c4edd78a03540dc69d6fbf21bd9c
https://forums.raspberrypi.com/viewtopic.php?t=333542
https://raspberrypi.stackexchange.com/questions/101720/run-raspbian-in-ram