[PATCH 2/2] migration: Set the socket backlog number to reduce the chance of live migration failure

Li Zhang posted 2 patches 4 years, 2 months ago
Maintainers: Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
There is a newer version of this series
[PATCH 2/2] migration: Set the socket backlog number to reduce the chance of live migration failure
Posted by Li Zhang 4 years, 2 months ago
When creating the guest on destination with -incoming ip:port in QEMU command line,
the source code that sets the backlog number as the same as multifd channels doesn't
get called. So the number of backlog is always 1. It's very easy to cause live migration
failure, so a bigger number is preferred to reduce the chance of the failure.

Signed-off-by: Li Zhang <lizhang@suse.de>
---
 migration/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/socket.c b/migration/socket.c
index 05705a32d8..398d4c10fa 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -152,7 +152,7 @@ socket_start_incoming_migration_internal(SocketAddress *saddr,
     QIONetListener *listener = qio_net_listener_new();
     MigrationIncomingState *mis = migration_incoming_get_current();
     size_t i;
-    int num = 1;
+    int num = 16;
 
     qio_net_listener_set_name(listener, "migration-socket-listener");
 
-- 
2.31.1


Re: [PATCH 2/2] migration: Set the socket backlog number to reduce the chance of live migration failure
Posted by Juan Quintela 4 years, 2 months ago
Li Zhang <lizhang@suse.de> wrote:
> When creating the guest on destination with -incoming ip:port in QEMU command line,
> the source code that sets the backlog number as the same as multifd channels doesn't
> get called. So the number of backlog is always 1. It's very easy to cause live migration
> failure, so a bigger number is preferred to reduce the chance of the failure.
>
> Signed-off-by: Li Zhang <lizhang@suse.de>
> ---
>  migration/socket.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/migration/socket.c b/migration/socket.c
> index 05705a32d8..398d4c10fa 100644
> --- a/migration/socket.c
> +++ b/migration/socket.c
> @@ -152,7 +152,7 @@ socket_start_incoming_migration_internal(SocketAddress *saddr,
>      QIONetListener *listener = qio_net_listener_new();
>      MigrationIncomingState *mis = migration_incoming_get_current();
>      size_t i;
> -    int num = 1;
> +    int num = 16;
>  
>      qio_net_listener_set_name(listener, "migration-socket-listener");

Here, the right answer is to use -incoming defer.

Later, Juan.


Re: [PATCH 2/2] migration: Set the socket backlog number to reduce the chance of live migration failure
Posted by Li Zhang 4 years, 2 months ago
On 11/26/21 5:32 PM, Juan Quintela wrote:
> Li Zhang <lizhang@suse.de> wrote:
>> When creating the guest on destination with -incoming ip:port in QEMU command line,
>> the source code that sets the backlog number as the same as multifd channels doesn't
>> get called. So the number of backlog is always 1. It's very easy to cause live migration
>> failure, so a bigger number is preferred to reduce the chance of the failure.
>>
>> Signed-off-by: Li Zhang <lizhang@suse.de>
>> ---
>>   migration/socket.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/migration/socket.c b/migration/socket.c
>> index 05705a32d8..398d4c10fa 100644
>> --- a/migration/socket.c
>> +++ b/migration/socket.c
>> @@ -152,7 +152,7 @@ socket_start_incoming_migration_internal(SocketAddress *saddr,
>>       QIONetListener *listener = qio_net_listener_new();
>>       MigrationIncomingState *mis = migration_incoming_get_current();
>>       size_t i;
>> -    int num = 1;
>> +    int num = 16;
>>   
>>       qio_net_listener_set_name(listener, "migration-socket-listener");
> Here, the right answer is to use -incoming defer.

Ok, thanks a lot.


>
> Later, Juan.
>
>