[pve-devel] [PATCH qemu-server] fix #3588: helper: consider NIC count for config-specific timeout

Hannes Laimer h.laimer at proxmox.com
Thu Nov 21 16:16:06 CET 2024


sent a v2 [1]

[1] 
https://lore.proxmox.com/pve-devel/20241121151335.130711-1-h.laimer@proxmox.com/T/#u

On 11/15/24 11:00, Hannes Laimer wrote:
> There have been some reports about `qm start` timeouts on VMs that have a
> lot of NICs assigned.
> This patch considers the number of NICs when calculating the config-specific
> timeout. Since the increase in start time is linearly related to the number
> of NICs, a constant timeout increment per NIC was chosen.
> 
> Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
> ---
>   PVE/QemuServer/Helpers.pm | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/PVE/QemuServer/Helpers.pm b/PVE/QemuServer/Helpers.pm
> index 0afb6317..99cb3ab8 100644
> --- a/PVE/QemuServer/Helpers.pm
> +++ b/PVE/QemuServer/Helpers.pm
> @@ -167,6 +167,14 @@ sub config_aware_timeout {
>   	$timeout = 150;
>       }
>   
> +    # Some testing showed that adding a NIC increased the start time by ~450ms
> +    # consistantly across different NIC models, options and already existsing
> +    # number of NICs.
> +    # So, 10x that to account for any potential system differences seemed
> +    # reasonable.
> +    my $nic_count = grep { /^net/ } keys %{$config};
> +    $timeout += $nic_count * 5;
> +
>       return $timeout;
>   }
>   





More information about the pve-devel mailing list