public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] qmp client: increase timeout for thaw
@ 2022-03-02 13:21 Fabian Ebner
  2022-03-03 11:13 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Ebner @ 2022-03-02 13:21 UTC (permalink / raw)
  To: pve-devel

Using a loop of freeze, sleep 5, thaw, sleep 5, an idling Windows 11
VM with 4 cores and 8GiB RAM once took 54 seconds for thawing. It took
less than a second about 90% of the time and maximum of a few seconds
for the majortiy of other cases, but there can be outliers where 10
seconds is not enough.

And there can be hookscripts executed upon thaw, which might also not
complete instantly.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 PVE/QMPClient.pm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm
index ea4dc0b..8af28e8 100644
--- a/PVE/QMPClient.pm
+++ b/PVE/QMPClient.pm
@@ -113,9 +113,10 @@ sub cmd {
 	    # locked state with high probability, so use an generous timeout
 	    $timeout = 60*60; # 1 hour
 	} elsif ($cmd->{execute} eq 'guest-fsfreeze-thaw') {
-	    # thaw has no possible long blocking actions, either it returns
-	    # instantly or never (dead locked)
-	    $timeout = 10;
+	    # While it should return instantly or never (dead locked) for Linux guests,
+	    # the variance for Windows guests can be big. And there might be hook scripts
+	    # that are executed upon thaw, so use 3 minutes to be on the safe side.
+	    $timeout = 3 * 60;
 	} elsif ($cmd->{execute} eq 'savevm-start' ||
 		 $cmd->{execute} eq 'savevm-end' ||
 		 $cmd->{execute} eq 'query-backup' ||
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: Re: [PATCH qemu-server] qmp client: increase timeout for thaw
  2022-03-02 13:21 [pve-devel] [PATCH qemu-server] qmp client: increase timeout for thaw Fabian Ebner
@ 2022-03-03 11:13 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-03-03 11:13 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Ebner

On 02/03/2022 14:21, Fabian Ebner wrote:
> Using a loop of freeze, sleep 5, thaw, sleep 5, an idling Windows 11
> VM with 4 cores and 8GiB RAM once took 54 seconds for thawing. It took
> less than a second about 90% of the time and maximum of a few seconds
> for the majortiy of other cases, but there can be outliers where 10
> seconds is not enough.
> 
> And there can be hookscripts executed upon thaw, which might also not
> complete instantly.
> 
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
>  PVE/QMPClient.pm | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-03 11:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 13:21 [pve-devel] [PATCH qemu-server] qmp client: increase timeout for thaw Fabian Ebner
2022-03-03 11:13 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal