Originally posted by kpedersen
View Post
Originally posted by kpedersen
View Post
Above shows that we use a lot more systemd parts than we need to in most cases.
Yes the move over to varlink instead of dbus for more things in systemd will remove the dbus requirement todo fancy things.
kpedersen the biggest thing that makes it tricky is the Linux kernel recycling of PID and breakaway support in process tree. shell scripts are not designed to work with pidfd or cgroups. You really do need to use both of these on Linux.
pidfd to make sure that when you send a instruction to a PID it goes to the process you in fact intended it so that another process had not started in it place.
cgroupsv2 is to counter the breakaway in the PID tree. X application starts Y application under Linux Y application can come its own thing not linked to X at all this is the break away.
Slow and steady shell script cannot solve the problems coming from Linux kernel design that comes from Linus originally miss reading a book on posix.
Yes we do need a new kill command and a few other things for Linux. Something like
Code:
safekill PID "/bin/this" startime
Yes then tooling to operate cgroupv2 effectively. There have been syscalls added to the Linux kernel to make starting processes in a new cgroup clean and simple and as single call to kernel but you cannot use this from a shell script.
Shell script on Linux starts running into being a round peg in a square hole so not working exactly right.
Yes this could be fixed by making a new shell script language with a few Linux particular addons to deal with Linux PID recylcing and PID tree breakway..
Originally posted by kpedersen
View Post
Core systemd and core SMF is not that slow either.
You have people who go and benchmark openrc vs systemd and find opps systemd is faster.
Yes a systemd system starting slow is more a product of I need to clean out what I don't in fact use. Others have done this with busybox and runit and quite a few other init systems. Systemd itself is not that slow compared to shell scripts.
Shell scripts are slow due to how often you are having to call the kernel to start another process then wait for that process to end before you can go forwards this adds up. Cost of starting the process and cleaning up the process when it ends is free.
A scripting language design perfectly for service management where starting process that will have to quickly terminate are minimized could possible be faster than systemd but this is not your shell scripts.
Yes the idea that shell script init/service management is fast is not in fact backed by benchmarks there is a fundamental issue that makes shell script init/service management slow..
Leave a comment: