package ffmpeg

import "gvisor.dev/gvisor/test/kubernetes/benchmarks"

Package gsutil is used to benchmark the speed of large (10GB) downloads. It is intended for comparing runsc with runc.

Package postgresql benchmarks a PostgreSQL database.

Package pytorch contains benchmarks using the pytorch "torchbench" repo.

Package redis holds the redis test where the runtime under test runs a redis server and the native runtime runs a client making requests against it.

Package rubydev holds a benchmark to time a build job of a ruby application.

Package startup benchmarks the time it takes for an empty alpine container to complete successfully.

Index

Variables

var (
	// FastNLPBert uses the fastNLP_Bert module, which is classified as a NLP Language Model.
	// fastNLP_Bert taxes the GPU heavily with low data movement. See Figure 2 on
	// page 5: https://arxiv.org/pdf/2304.14226.pdf
	//
	// https://github.com/pytorch/benchmark/tree/main/torchbenchmark/models/fastNLP_Bert
	// Bert Blog Post: https://towardsdatascience.com/bert-explained-state-of-the-art-language-model-for-nlp-f8b21a9b6270
	// Paper: https://arxiv.org/abs/1810.04805
	FastNLPBert = []pytorchTest{
		{
			// contains filtered or unexported fields
		},
		{
			// contains filtered or unexported fields
		},
	}

	// BigBird uses the hf_BigBird module, which is classified as a NLP Language Model.
	// hf_BigBird taxes the GPU moderately with low data movement. See Figure 2 on
	// page 5 (speech_tf): https://arxiv.org/pdf/2304.14226.pdf
	//
	// https://github.com/pytorch/benchmark/tree/main/torchbenchmark/models/hf_BigBird
	// Paper: https://arxiv.org/abs/2007.14062
	BigBird = []pytorchTest{
		{
			// contains filtered or unexported fields
		},
		{
			// contains filtered or unexported fields
		},
	}

	// SpeechTransformer uses the speech_transformer module classified as "Speech Recognition"
	// model. speech_transformer has a lot of idle time for the GPU. See Figure 2 on
	// page 5 (speech_tf): https://arxiv.org/pdf/2304.14226.pdf
	//
	// https://github.com/pytorch/benchmark/pull/374
	// Paper: https://arxiv.org/abs/1706.03762
	SpeechTransformer = []pytorchTest{
		{
			// contains filtered or unexported fields
		},
		{
			// contains filtered or unexported fields
		},
	}

	// LearningToPaint uses the LearningToPaint module classified as "neural renderer in model-based
	// Deep Reinforcement Learning (DRL)".
	// Learning to paint has a lot of "data movement" and doesn't tax the GPU a lot. See Figure 2 on
	// page 5: https://arxiv.org/pdf/2304.14226.pdf
	//
	// https://github.com/pytorch/benchmark/tree/main/torchbenchmark/models/LearningToPaint
	LearningToPaint = []pytorchTest{
		{
			// contains filtered or unexported fields
		},
		{
			// contains filtered or unexported fields
		},
	}

	// MobileNetV2 uses the mobilenet_v2 module classified as "Computer Vision: Image Classification".
	// MobileNet has a lot of taxes the GPU. See Figure 2 on page 5: https://arxiv.org/pdf/2304.14226.pdf
	//
	// https://github.com/pytorch/benchmark/tree/main/torchbenchmark/models/mobilenet_v2
	// Paper: https://paperswithcode.com/method/mobilenetv2
	MobileNetV2 = []pytorchTest{
		{
			// contains filtered or unexported fields
		},
		{
			// contains filtered or unexported fields
		},
	}

	// AllTests is a map of test names to the tests.
	AllTests = map[string][]pytorchTest{
		"FastNLPBert":       FastNLPBert,
		"BigBird":           BigBird,
		"SpeechTransformer": SpeechTransformer,
		"LearningToPaint":   LearningToPaint,
		"MobileNetV2":       MobileNetV2,
	}
)

Sets of tests.

Functions

func BenchmarkNginx

func BenchmarkNginx(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

BenchmarkNginx runs a series of benchmarks against an nginx server.

func BenchmarkOllama

func BenchmarkOllama(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

BenchmarkOllama runs ollama benchmarks for a single cluster.

func BenchmarkPostgresPGBench

func BenchmarkPostgresPGBench(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

BenchmarkPostgresPGBench runs a PostgreSQL pgbench test.

func BenchmarkRedis

func BenchmarkRedis(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

BenchmarkRedis runs the Redis performance benchmark using redis-benchmark.

func BenchmarkWordpress

func BenchmarkWordpress(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

BenchmarkWordpress runs a benchmark of WordPress performance.

func BuildABSL

func BuildABSL(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

BuildABSL runs the ABSL build benchmark. This benchmark builds the ABSL library from source.

func BuildGRPC

func BuildGRPC(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

BuildGRPC runs the GRPC benchmark. This benchmark builds the gRPC library using bazel.

func MeasureStartup

func MeasureStartup(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

MeasureStartup benchmarks the time it takes for an empty alpine container to complete successfully. Note: WRT gVisor startup latency, this is not a meaningful benchmark. Startup time is dominated by Kubernetes control plane API calls and not actual container startups. This benchmark is provided for illustrative purposes only.

func RunFFMPEG

func RunFFMPEG(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

RunFFMPEG runs the ffmpeg benchmark.

func RunGSUtil

func RunGSUtil(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

RunGSUtil runs a series of gsutil speed benchmarks.

func RunPytorch

func RunPytorch(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster, tests []pytorchTest)

RunPytorch runs the given PyTorch tests sequentially on a single cluster.

func RunRubyDev

func RunRubyDev(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

RunRubyDev runs a benchmark measuring the time to build and test a popular Ruby library.

func RunStableDiffusionXL

func RunStableDiffusionXL(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

RunStableDiffusionXL runs Stable Diffusion XL benchmarks for a single cluster.

func RunTensorflowOnCPU

func RunTensorflowOnCPU(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesContext, cluster *testcluster.TestCluster)

RunTensorflowOnCPU runs the Tensorflow example workloads on CPU.

Source Files

abslbuild.go ffmpeg.go grpc.go gsutil.go nginx.go ollama.go postgresql.go pytorch.go redis.go rubydev.go stablediffusion.go startup.go tensorflow.go wordpress.go

Directories

PathSynopsis
test/kubernetes/benchmarks/httpbenchPackage httpbench provides a library for benchmarking an HTTP server.
test/kubernetes/benchmarks/profilingPackage profiling helps with getting profiles from running benchmarks.
Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
31 packages
Last checked
4 hours ago

Tools for package owners.