diff --git a/test/kubernetes/benchmarks/grpc.go b/test/kubernetes/benchmarks/grpc.go index c68772022..816645791 100644 --- a/test/kubernetes/benchmarks/grpc.go +++ b/test/kubernetes/benchmarks/grpc.go @@ -20,6 +20,7 @@ import ( "path" "strings" "testing" + "time" k8s "gvisor.dev/gvisor/test/kubernetes" "gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling" @@ -127,7 +128,9 @@ func BuildGRPC(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContex if err != nil { t.Fatalf("Failed to initialize benchmark recorder: %v", err) } - containerDuration, err := benchmetric.GetTimedContainerDuration(ctx, cluster, pod, name) + waitDeadlineCtx, cancel := context.WithTimeout(ctx, 30*time.Minute) + containerDuration, err := benchmetric.GetTimedContainerDuration(waitDeadlineCtx, cluster, pod, name) + cancel() if err != nil { t.Fatalf("Failed to get container duration: %v", err) } diff --git a/test/kubernetes/benchmarks/nginx.go b/test/kubernetes/benchmarks/nginx.go index 31bc3af7c..9bf12a22f 100644 --- a/test/kubernetes/benchmarks/nginx.go +++ b/test/kubernetes/benchmarks/nginx.go @@ -33,7 +33,7 @@ import ( const ( nginxPort = 80 - nginxBenchmarkDuration = 70 * time.Second + nginxBenchmarkDuration = 55 * time.Second nginxRequestTimeout = 3 * time.Second nginxServingDir = "/tmp/html" @@ -48,9 +48,9 @@ var ( // The test expects that it contains the files to be served at /local, // and will serve files out of `nginxServingDir`. nginxCommand = []string{"nginx", "-c", "/etc/nginx/nginx.conf"} - nginxDocKibibytes = []int{1, 10, 100, 10240} - threads = []int{1, 8, 64, 1000} - targetQPS = []int{1, 8, 64, httpbench.InfiniteQPS} + nginxDocKibibytes = []int{1, 10240} + threads = []int{1, 8, 1000} + targetQPS = []int{1, 64, httpbench.InfiniteQPS} wantPercentiles = []int{50, 95, 99} ) @@ -182,20 +182,6 @@ func BenchmarkNginx(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesC } } - t.Run("0KiB", func(t *testing.T) { - benchmark := &httpbench.HTTPBenchmark{ - Name: fmt.Sprintf("nginx/%s/0KiB", test.name), - Cluster: cluster, - Namespace: benchmarkNS, - Service: service, - Port: nginxPort, - Path: "/index.html", - Rounds: rounds, - Timeout: nginxRequestTimeout, - WantPercentiles: wantPercentiles, - } - benchmark.Run(ctx, t) - }) for _, docKibibytes := range nginxDocKibibytes { t.Run(fmt.Sprintf("%dKiB", docKibibytes), func(t *testing.T) { benchmark := &httpbench.HTTPBenchmark{ @@ -212,20 +198,6 @@ func BenchmarkNginx(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesC benchmark.Run(ctx, t) }) } - t.Run("HTTP404", func(t *testing.T) { - benchmark := &httpbench.HTTPBenchmark{ - Name: fmt.Sprintf("nginx/%s/HTTP404", test.name), - Cluster: cluster, - Namespace: benchmarkNS, - Service: service, - Port: nginxPort, - Path: "/404-this-page-does-not-exist.html", - Rounds: rounds, - Timeout: nginxRequestTimeout, - WantPercentiles: wantPercentiles, - } - benchmark.Run(ctx, t) - }) }) if t.Failed() { break diff --git a/test/kubernetes/benchmarks/postgresql.go b/test/kubernetes/benchmarks/postgresql.go index 7b3d0ec44..d6b127f2e 100644 --- a/test/kubernetes/benchmarks/postgresql.go +++ b/test/kubernetes/benchmarks/postgresql.go @@ -46,7 +46,7 @@ const ( ) var ( - numConnections = []int{1, 2, 6, 16, 32, 64} + numConnections = []int{1, 2, 12, 64} ) // BenchmarkPostgresPGBench runs a PostgreSQL pgbench test. diff --git a/test/kubernetes/benchmarks/redis.go b/test/kubernetes/benchmarks/redis.go index cfe0a8302..73ec1e937 100644 --- a/test/kubernetes/benchmarks/redis.go +++ b/test/kubernetes/benchmarks/redis.go @@ -49,9 +49,9 @@ const ( ) var ( - numConnections = []int{1, 2, 4, 8, 16, 32} + numConnections = []int{1, 4, 32} latencyPercentiles = []int{50, 95, 99} - operations = []string{"SET", "GET", "MSET", "LPUSH", "LRANGE_500"} + operations = []string{"GET", "MSET", "LRANGE_500"} ) // BenchmarkRedis runs the Redis performance benchmark using redis-benchmark. diff --git a/test/kubernetes/benchmarks/wordpress.go b/test/kubernetes/benchmarks/wordpress.go index 781514300..6642e258a 100644 --- a/test/kubernetes/benchmarks/wordpress.go +++ b/test/kubernetes/benchmarks/wordpress.go @@ -35,7 +35,7 @@ const ( mariaDBImage = "mariadb:10.11.3-jammy" wordpressPort = 80 mariaDBPort = 3306 - wordpressBenchmarkDuration = 70 * time.Second + wordpressBenchmarkDuration = 55 * time.Second wordpressRequestTimeout = 10 * time.Second wordpressLoginPage = "/wp-login.php" mariaDBName = "wpbench" @@ -52,8 +52,8 @@ const ( ) var ( - threads = []int{1, 8, 64, 1000} - targetQPS = []int{1, 8, 64, httpbench.InfiniteQPS} + threads = []int{1, 8, 1000} + targetQPS = []int{1, 64, httpbench.InfiniteQPS} wantPercentiles = []int{50, 95, 99} )