From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LzsBU-0004eR-Te for qemu-devel@nongnu.org; Fri, 01 May 2009 08:49:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LzsBP-0004dj-J2 for qemu-devel@nongnu.org; Fri, 01 May 2009 08:49:43 -0400 Received: from [199.232.76.173] (port=51443 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LzsBP-0004dg-Dj for qemu-devel@nongnu.org; Fri, 01 May 2009 08:49:39 -0400 Received: from rv-out-0708.google.com ([209.85.198.244]:9657) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LzsBP-0004kG-4d for qemu-devel@nongnu.org; Fri, 01 May 2009 08:49:39 -0400 Received: by rv-out-0708.google.com with SMTP id c5so1534069rvf.22 for ; Fri, 01 May 2009 05:49:37 -0700 (PDT) Message-ID: <49FAEFDD.2070002@gmail.com> Date: Fri, 01 May 2009 06:49:33 -0600 From: David Ahern MIME-Version: 1.0 Subject: Re: [Qemu-devel] PATCH: enabling TCP keepalives - v3 References: <49F9FEBA.6050901@gmail.com> <20090501113204.GA10763@amd.home.annexia.org> In-Reply-To: <20090501113204.GA10763@amd.home.annexia.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: qemu-devel@nongnu.org Richard W.M. Jones wrote: > On Thu, Apr 30, 2009 at 01:40:42PM -0600, David Ahern wrote: >> Did not see a response to the last version. >> >> This patch enables TCP keepalives on VNC connections and TCP-based char >> devices. >> >> Default parameters have keep alive probes sent after 60-seconds of idle >> time. Probes are sent every 12 seconds with the connection resetting >> after 5 failed probes (ie., connection is closed if no response received >> in 60-seconds). > > IMHO this should be optional, and firmly default to _OFF_. Brief > network outages shouldn't result in connections failing all over the > place. In addition, does this negatively impact migration? It's not a matter of connections failing; it's a matter of cleaning them up for a variety of reasons. Besides the VPN example which motivated this patch (i.e, VPN connection drops and when re-established you get a differnt IP), there are a lot of networks with very aggressive firewalls (e.g., 60-minute timers). Without some sort of keepalive mechanisms those firewalls will close the holes and the connections will hang. I'll take a look at adding yet another command line option to enable this. sshd for example, does not specify individual timer and count values, only on/off. So for char devices, how about something like: -serial tcp::[,server][,nowait][,tcpkeep] -vnc display[,tcpkeep] If timer and counters are to be configurable, I could do something like tcpkeep=i,j,k, where i is the idle time, j is the interval for sending probes and k is the count of missed probes. I have not run, and not setup to run, migration tests. Will migrations work as expected if the network were to stall for 2 minutes? The current patch would only drop the connection after 2 minutes of no response. david > > Rich. >