The following is an extremely simplified description of systemd
with
respect to Unix services (daemons).
Given the service my_proxy
, one can manage it via systemctl
commands:
$ sudo systemctl (enable|start|status|reload|stop|etc) my_proxy
if the service file /lib/systemd/system/my_proxy.service
is provided.
Here are examples
and the reference
for creating such files.
In addition to a service file, which is usually installed as a part of a deb/rpm
package and should not be changed by an end user, one can put custom
configuration (which inherits settings from the service file) in
/etc/systemd/system/my_proxy.service.d/
directory. Usually,
the directory contains one file limits.conf
which emposes the limits on the
system resources the service is allowed to consume. Here are an
example
and the reference.
For network services, it may be also beneficial to increase system-wide limit on number of concurrently open files.