|
|
Subscribe / Log in / New account

Debian reconsiders init-system diversity

Debian reconsiders init-system diversity

Posted Nov 12, 2019 11:04 UTC (Tue) by smurf (subscriber, #17840)
In reply to: Debian reconsiders init-system diversity by ncm
Parent article: Debian reconsiders init-system diversity

The resident size of systemd is typically 5…10MB on my systems. That's hardly excessive given (a) a lot more features than anything else out there and (b) it's also used for user sessions, which some other code would have to manage instead.


to post comments

Debian reconsiders init-system diversity

Posted Nov 13, 2019 4:48 UTC (Wed) by ncm (guest, #165) [Link]

On my Qubes system, I see 294MB consumed by the systemds on my VMs, all told.

Debian reconsiders init-system diversity

Posted Nov 13, 2019 15:09 UTC (Wed) by IanKelling (subscriber, #89418) [Link] (10 responses)

I have a router with 128 mb of ram, sysv init is using 840k. So, 10mb is quite a lot for small and embedded systems which are also capable of running a full gnu/linux system and providing tons of functionality. Being stuck with 10% overhead for the init process is significant.

Debian reconsiders init-system diversity

Posted Nov 13, 2019 16:31 UTC (Wed) by pizza (subscriber, #46) [Link] (5 responses)

How much RAM is free on that router system? I'd wager a lot more than 10MB -- And unused RAM is wasted RAM.

(With embedded or RAM constrained systems you're presumably going to turn off systemd's features you don't need or care about. Of the three systems I have immediately in front of me, the RSSes for PID1 are 17.1MB, 8.5MB, and 5.4MB respectively.. Even the 5.4MB one still pulls in the likes of libselinux, libapparmour, libaudit, and libpam...)

What really matters in that router (or other embedded systems) is peak RAM usage. Sure, sysvinit on your router might only be 840k, but for it to do anything useful it has to invoke a shell, which in turn invokes subshells and a pile of various other tools along the way. If you have a higher baseline but your peak is lower, then you've come out ahead.

(Back when I was still writing router BSPs, I had to put a lot of effort into auditing this sort of thing..)

Debian reconsiders init-system diversity

Posted Nov 13, 2019 21:36 UTC (Wed) by hmh (subscriber, #3838) [Link] (4 responses)

128MiB is not much if that router has an 802.11ac radio with decent throughput and serving many stations.

Debian reconsiders init-system diversity

Posted Nov 14, 2019 12:04 UTC (Thu) by pizza (subscriber, #46) [Link] (3 responses)

The old dual-band 802.11AC access point I'm using at home has 50/128MB free (adding in buffers/caches it's actually 72/128MB), serving 6 wireless clients as I type this.

Meanwhile, the triple-band "gaming" AC monstrosity at the work lab has a quad-core ARM under its gaudy exterior with 13 wired and 1 wireless client, and 399/1024MB free (according to its web UI) But it's also doing routing/dnsmasq/openvpn, plus a whole lot of other crap we don't actually use.

Debian reconsiders init-system diversity

Posted Nov 14, 2019 17:32 UTC (Thu) by hmh (subscriber, #3838) [Link] (1 responses)

Give those routers some work deserving of their 802.11ac radios (some clients doing high-throughput streams), or a typical number of clients for large rooms (100+), and they might run out of RAM on 64MiB.

With 128MiB they are supposed to survive, and still have some RAM left to do something other than pushing packets around, running the control plane, and hosting the [buffers with] the uncompressed image of the O.S...

Debian reconsiders init-system diversity

Posted Nov 14, 2019 18:36 UTC (Thu) by farnz (subscriber, #17727) [Link]

Just to put some numbers on this; a single PHY-level frame in 802.11ac VHT mode can be up to 1 megabyte long, and is targeted at a single receiver. That means that for full throughput, you need 2 megabytes per client buffering in your AP - one frame being transmitted now, one frame being prepared for the next time that client gets airtime.

Debian reconsiders init-system diversity

Posted Nov 18, 2019 22:35 UTC (Mon) by rahvin (guest, #16953) [Link]

Old? AC has only been out a few years and was the most recent standard until AX (wifi6) came out a few months ago. I'd hardly call that old. I know people still running routers that top out at G.

Debian reconsiders init-system diversity

Posted Nov 14, 2019 2:59 UTC (Thu) by rbrito (guest, #66188) [Link] (1 responses)

This is exactly my situation (with an armel NAS with only 128MB). For the record, I'm using Debian 10.

Besides that, since this thing doesn't have a physical terminal, forcing an fsck at boot time with systemd is hard, since you have to pass it as a (kernel) command line parameter, which is not really as simple as entering GRUB and setting the right option (fsck.mode=force).

(With other systems, I don't mind running systemd, but with some, I do).

Debian reconsiders init-system diversity

Posted Nov 14, 2019 17:48 UTC (Thu) by derobert (subscriber, #89569) [Link]

Depending on your filesystem, one of the FS-specific tools might be able to replace the flag file. E.g., tune2fs -E force_fsck for ext4.

Debian reconsiders init-system diversity

Posted Nov 14, 2019 3:23 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

A few years ago I was running systemd on a system with 8Mb of total RAM. It worked. This was with musl libc, btw.

Debian reconsiders init-system diversity

Posted Nov 14, 2019 23:48 UTC (Thu) by Darakian (guest, #96997) [Link]

Systemd will also subsume some of the tasks running on your router though. Cron comes to mind, but I'm sure there are other processes which you will no longer need and which will offset the memory usage.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds