Re: [libvirt PATCH 6/9] src: set max open file limit to match systemd >= 240 defaults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 21, 2023 at 14:32:29 +0100, Daniel P. Berrangé wrote:
> Since systemd 240, all services get an open file hard limit of
> 500k, and a soft limit of 1024. This limit means apps are safe
> to use select() by default which is limited to 1024 FDs. Apps
> which don't use select() are expected to simply set their soft
> limit to match the hard limit during startup.
> 
> With our current unit file settings we've been effectively
> reducing the max open files we have on most modern systems.
> 
> https://gitlab.com/libvirt/libvirt/-/issues/489
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  src/ch/virtchd.service.in        |  9 ++++-----
>  src/locking/virtlockd.service.in |  8 ++++----
>  src/logging/virtlogd.service.in  | 11 ++++-------
>  src/lxc/virtlxcd.service.in      |  9 ++++-----
>  src/qemu/virtqemud.service.in    |  9 ++++-----
>  src/remote/libvirtd.service.in   |  9 ++++-----
>  tests/virshtest.c                |  1 +
>  tools/virsh.c                    |  2 +-
>  8 files changed, 26 insertions(+), 32 deletions(-)

[...]

> diff --git a/tests/virshtest.c b/tests/virshtest.c
> index cf834bb847..022cd075f9 100644
> --- a/tests/virshtest.c
> +++ b/tests/virshtest.c
> @@ -118,6 +118,7 @@ testCompareOutputLit(const char *expectData,
>  
>      cmd = virCommandNewArgs(argv);
>  
> +    virCommandAddEnvPassCommon(cmd);
>      virCommandAddEnvString(cmd, "LANG=C");
>      virCommandSetInputBuffer(cmd, empty);
>      virCommandSetOutputBuffer(cmd, &actualData);
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 963e886860..55a1ffca86 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -123,7 +123,7 @@ virshConnect(vshControl *ctl, const char *uri, bool readonly)
>          keepalive_forced = true;
>      }
>  
> -    if (virPolkitAgentAvailable() &&
> +    if (0 && virPolkitAgentAvailable() &&
>          !(pkagent = virPolkitAgentCreate()))
>          virResetLastError();

More irrelevant debug code accidentally added.

For the unit file bits:

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux