Hacker News new | ask | show | jobs
by j16sdiz 1821 days ago
Not OP.

I my experience, systemd config is simple because it handles all the complexity. Inside it’s guts, it is much more complicated than a sysv system — naturally so because it can do so much more. Those folks loves using the latest and greatest kernel function for all its glory.

All works well - until it don’t. When something is broken, suddenly you have to understand all the interdependent components to debug.

Back in the days, these were not so uncommon, because bugs or simply unimplemented features………

1 comments

Agree with that. It breaks catastrophically.

But it's also overengineered. Like starting a daemon on first connect is "neat trick", but should never have gone beyond that.

Like: oh, I want to restart this daemon, because I want it to re-run its init code (possibly with new settings), but you CAN'T, because some idiot decided that it'll only actually start when someone connects to its unix socket, so running "restart" is a no-op.

> but you CAN'T, because some idiot decided that it'll only actually start when someone connects to its unix socket, so running "restart" is a no-op.

FTA:

> It can then boot your service on the first request, or you can do systemctl start lunchd yourself if you think that would take a while.

You can, but it doesn't. If I know I want to start it I can just connect with the client.

Sounds like you're arguing something like "yes, it's broken. But you can just reimplement everything and it won't be broken anymore".

Yes, I can also turn off "kill user processes on logout", but that doesn't make that not-broken.

No, I'm arguing there's a way to force-start even socket-activated services.

But this is really a moot point. Systemd's socket activation is really meant for system services which would otherwise be in the critical path of system boot. 'Regular' client-facing services that people normally run–webapps, etc.–are not really the target use case. It's fine to start them up in the normal way, with WantedBy=multi-user.target in the [Install] section. And I have never seen people use socket activation for them anyway. So you are basically arguing a strawman here.

> So you are basically arguing a strawman here.

gpsd is an example that immediately comes to mind that was set to start on-demand. Which is ridiculous.

So it's a straw man that actually exists, making it not a straw man.

Starting a daemon on first connect is essential for fast boot times of a system with multiple dependent network services. This is mostly a desktop use case though. Not sure if it can be disabled for servers.
But I would also like to see data showing how often desktop users reboot (on purpose, that is, not because systemd or something says "you should reboot now" because it's shitty software that doesn't just work cross updates).

Like, who even boots their computer anymore? Isn't the typical user on a laptop, and just suspends it?

My workplace even had to install corp software that forces a reboot every N days (with warnings ahead of time) because people just Do. Not. Reboot.

And even for the people that do, at what cost, here? You have a bunch of services and services completely broken, but "they started just fine" (except they didn't start), and only break once you actually need them.

So to me this really looks like it applies neither to servers nor desktop. I'm really not seeing any use case except fetishizing boot times.

And for me this always SPENDS human wait time, not save it. I try to use a service, and nope, it needs to "boot up" first. Could you not have done that already, WTF? (and maybe it fails to boot, which I only find out about now that I'm already in the zone to use it)

Are we really optimizing for kernel developers, here? Can't they just disable the services they don't need, to speed it up?

And we have eleventy billion cores now. Really? You can't start a 645kB gpsd? It takes what, 3ms?

> So to me this really looks like it applies neither to servers nor desktop.

It applies to both. We need desktops to boot up fast, because you said it yourself, sometimes they just need to. And no one likes waiting around for their machines to boot. Can you imagine the volume of complaints about long boot times that would come in to large-scale distros from annoyed users? That alone makes it a high priority.

And on top of that, we need servers to boot up fast, because nowadays they're virtualized and started/stopped constantly when services are scaled up and down. Can you imagine trying to scale up a fleet of servers and waiting a couple of minutes for each one to boot?

> We need desktops to boot up fast, because you said it yourself, sometimes they just need to

I didn't say that. Because they don't.

> And no one likes waiting around for their machines to boot.

Nobody cares, if it's once for every month or two. Which it is.

> we need servers to boot up fast

But it's not actually booted until the service is up, so it's moot.

> I didn't say that. Because they don't.

Yes, you did. Here's a refresher:

> My workplace even had to install corp software that forces a reboot every N days (with warnings ahead of time) because people just Do. Not. Reboot.

I.e. sometimes computers just need to reboot, and there's nothing you can do about it.

> Nobody cares

If nobody cares, then why do people hate rebooting so much?

> But it's not actually booted until the service is up, so it's moot.

With per second billing, fast boot times save money and enable lower fixed capacity, further lowering cost.