mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-05 22:05:47 +00:00
src: fix max file limits in systemd services
This fixes
commit 38abf9c34d
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: Wed Jun 21 13:22:40 2023 +0100
src: set max open file limit to match systemd >= 240 defaults
The bug referenced in that commit had suggested to set
LimitNOFile=512000:1024
on the basis that matches current systemd default behaviour and is
compatible with old systemd. That was good except
* The setting is LimitNOFILE and these are case sensitive
* The hard and soft limits were inverted - soft must come
first and so it would have been ignored even if the
setting name was correct.
* The default hard limit is 524288 not 512000
Reported-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
3a45a4d78c
commit
3d2f3fb72b
@ -24,7 +24,7 @@ Restart=on-failure
|
|||||||
# Raise hard limits to match behaviour of systemd >= 240.
|
# Raise hard limits to match behaviour of systemd >= 240.
|
||||||
# During startup, daemon will set soft limit to match hard limit
|
# During startup, daemon will set soft limit to match hard limit
|
||||||
# per systemd recommendations
|
# per systemd recommendations
|
||||||
LimitNOFile=512000:1024
|
LimitNOFILE=1024:524288
|
||||||
# The cgroups pids controller can limit the number of tasks started by
|
# The cgroups pids controller can limit the number of tasks started by
|
||||||
# the daemon, which can limit the number of domains for some hypervisors.
|
# the daemon, which can limit the number of domains for some hypervisors.
|
||||||
# A conservative default of 8 tasks per guest results in a TasksMax of
|
# A conservative default of 8 tasks per guest results in a TasksMax of
|
||||||
|
@ -18,7 +18,7 @@ OOMScoreAdjust=-900
|
|||||||
# Raise hard limits to match behaviour of systemd >= 240.
|
# Raise hard limits to match behaviour of systemd >= 240.
|
||||||
# During startup, daemon will set soft limit to match hard limit
|
# During startup, daemon will set soft limit to match hard limit
|
||||||
# per systemd recommendations
|
# per systemd recommendations
|
||||||
LimitNOFile=512000:1024
|
LimitNOFILE=1024:524288
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
Also=virtlockd.socket
|
Also=virtlockd.socket
|
||||||
|
@ -18,7 +18,7 @@ OOMScoreAdjust=-900
|
|||||||
# Raise hard limits to match behaviour of systemd >= 240.
|
# Raise hard limits to match behaviour of systemd >= 240.
|
||||||
# During startup, daemon will set soft limit to match hard limit
|
# During startup, daemon will set soft limit to match hard limit
|
||||||
# per systemd recommendations
|
# per systemd recommendations
|
||||||
LimitNOFile=512000:1024
|
LimitNOFILE=1024:524288
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
Also=virtlogd.socket
|
Also=virtlogd.socket
|
||||||
|
@ -24,7 +24,7 @@ Restart=on-failure
|
|||||||
# Raise hard limits to match behaviour of systemd >= 240.
|
# Raise hard limits to match behaviour of systemd >= 240.
|
||||||
# During startup, daemon will set soft limit to match hard limit
|
# During startup, daemon will set soft limit to match hard limit
|
||||||
# per systemd recommendations
|
# per systemd recommendations
|
||||||
LimitNOFile=512000:1024
|
LimitNOFILE=1024:524288
|
||||||
# The cgroups pids controller can limit the number of tasks started by
|
# The cgroups pids controller can limit the number of tasks started by
|
||||||
# the daemon, which can limit the number of domains for some hypervisors.
|
# the daemon, which can limit the number of domains for some hypervisors.
|
||||||
# A conservative default of 8 tasks per guest results in a TasksMax of
|
# A conservative default of 8 tasks per guest results in a TasksMax of
|
||||||
|
@ -26,7 +26,7 @@ Restart=on-failure
|
|||||||
# Raise hard limits to match behaviour of systemd >= 240.
|
# Raise hard limits to match behaviour of systemd >= 240.
|
||||||
# During startup, daemon will set soft limit to match hard limit
|
# During startup, daemon will set soft limit to match hard limit
|
||||||
# per systemd recommendations
|
# per systemd recommendations
|
||||||
LimitNOFile=512000:1024
|
LimitNOFILE=1024:524288
|
||||||
# The cgroups pids controller can limit the number of tasks started by
|
# The cgroups pids controller can limit the number of tasks started by
|
||||||
# the daemon, which can limit the number of domains for some hypervisors.
|
# the daemon, which can limit the number of domains for some hypervisors.
|
||||||
# A conservative default of 8 tasks per guest results in a TasksMax of
|
# A conservative default of 8 tasks per guest results in a TasksMax of
|
||||||
|
@ -31,7 +31,7 @@ Restart=on-failure
|
|||||||
# Raise hard limits to match behaviour of systemd >= 240.
|
# Raise hard limits to match behaviour of systemd >= 240.
|
||||||
# During startup, daemon will set soft limit to match hard limit
|
# During startup, daemon will set soft limit to match hard limit
|
||||||
# per systemd recommendations
|
# per systemd recommendations
|
||||||
LimitNOFile=512000:1024
|
LimitNOFILE=1024:524288
|
||||||
# The cgroups pids controller can limit the number of tasks started by
|
# The cgroups pids controller can limit the number of tasks started by
|
||||||
# the daemon, which can limit the number of domains for some hypervisors.
|
# the daemon, which can limit the number of domains for some hypervisors.
|
||||||
# A conservative default of 8 tasks per guest results in a TasksMax of
|
# A conservative default of 8 tasks per guest results in a TasksMax of
|
||||||
|
Loading…
Reference in New Issue
Block a user