Systemd socket activation for starbound server on linux

Question

I've been running a starbound server on my private linux server for a while now, and I've noticed that it eats about 1 gig of RAM idle. That's less than desirable, but I understand that it probably isn't that easy to avoid.

A solution for this would be to shut the server down completely when nobody is connected, and launch it whenever someone connects. This would occasionally cause someone to need to wait for connection for a second or 5, but generally just spare my server's resources for other, slightly more important services when the starbound service is not in use.

Good thing I'm using Linux and have already implemented a systemd unit to accomplish this.

The only problem is, the starbound server either doesn't support socket activation (a socket is passed through stdin to the daemon, this is probably very systemd specific and might therefore not be implemented) or the client times out before the server is booted up, resulting in me being unable to connect at all. I do get a response, and the server is launched, it's just the connection that fails.

So, does anyone know if it is implemented or if there is some way around the client timeout? I use the feature for my other services, so I don't think I made mistakes (copied from another unit and redid it about 4 times with different socket types to be sure).

tl;dr: lots of technobabble that says I want more server performance, actual question is how do I get systemd socket activation to work with starbound.

Posted Jun 30, 2015, 11:37 PM UTC

20

No comments yet

Nobody commented on this post, or the comments weren't captured.