Commit 05876fa6 authored by Joe Julian's avatar Joe Julian

extend timeout to workaround slow arm64 math

The math/big functions are slow on arm64. There is improvement coming with go1.11 but in the mean time if a server uses rsa certificates on arm64, the math load for the multitude of watches over taxes the ability of the processor and the TLS connections time out. Retries will also not succeed and serve to exacerbate the problem. By extending the timeout, the TLS connections will eventually be successful and the load will drop. Fixes #64649
parent cd6a03fe
...@@ -29,14 +29,15 @@ import ( ...@@ -29,14 +29,15 @@ import (
"k8s.io/apiserver/pkg/storage/value" "k8s.io/apiserver/pkg/storage/value"
) )
var ( // The short keepalive timeout and interval have been chosen to aggressively
// The short keepalive timeout and interval have been chosen to aggressively // detect a failed etcd server without introducing much overhead.
// detect a failed etcd server without introducing much overhead. const keepaliveTime = 30 * time.Second
keepaliveTime = 30 * time.Second const keepaliveTimeout = 10 * time.Second
keepaliveTimeout = 10 * time.Second
// dialTimeout is the timeout for failing to establish a connection. // dialTimeout is the timeout for failing to establish a connection.
dialTimeout = 10 * time.Second // It is set to 20 seconds as times shorter than that will cause TLS connections to fail
) // on heavily loaded arm64 CPUs (issue #64649)
const dialTimeout = 20 * time.Second
func newETCD3Storage(c storagebackend.Config) (storage.Interface, DestroyFunc, error) { func newETCD3Storage(c storagebackend.Config) (storage.Interface, DestroyFunc, error) {
tlsInfo := transport.TLSInfo{ tlsInfo := transport.TLSInfo{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment