mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 15:45:28 +00:00
27cd763500
Linux still defaults to a 1024 open file handle limit. This causes scalability problems for libvirtd / virtlockd / virtlogd on large hosts which might want > 1024 guest to be running. In fact if each guest needs > 1 FD, we can't even get to 500 guests. This is not good enough when we see machines with 100's of physical cores and TBs of RAM. In comparison to other memory requirements of libvirtd & related daemons, the resource usage associated with open file handles is essentially line noise. It is thus reasonable to increase the limits unconditionally for all installs. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
37 lines
1.1 KiB
SYSTEMD
37 lines
1.1 KiB
SYSTEMD
# NB we don't use socket activation. When libvirtd starts it will
|
|
# spawn any virtual machines registered for autostart. We want this
|
|
# to occur on every boot, regardless of whether any client connects
|
|
# to a socket. Thus socket activation doesn't have any benefit
|
|
|
|
[Unit]
|
|
Description=Virtualization daemon
|
|
Requires=virtlogd.socket
|
|
Requires=virtlockd.socket
|
|
Before=libvirt-guests.service
|
|
After=network.target
|
|
After=dbus.service
|
|
After=iscsid.service
|
|
After=apparmor.service
|
|
After=local-fs.target
|
|
After=remote-fs.target
|
|
Documentation=man:libvirtd(8)
|
|
Documentation=http://libvirt.org
|
|
|
|
[Service]
|
|
Type=notify
|
|
EnvironmentFile=-/etc/sysconfig/libvirtd
|
|
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
KillMode=process
|
|
Restart=on-failure
|
|
# At least 1 FD per guest, often 2 (eg qemu monitor + qemu agent).
|
|
# eg if we want to support 4096 guests, we'll typically need 8192 FDs
|
|
# If changing this, also consider virtlogd.service & virtlockd.service
|
|
# limits which are also related to number of guests
|
|
LimitNOFILE=8192
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
Also=virtlockd.socket
|
|
Also=virtlogd.socket
|