From 3924579214c2b4dbbd3608589cdeed5f6b52fdc9 Mon Sep 17 00:00:00 2001 From: Etienne Perot Date: Thu, 27 Jul 2023 16:13:59 -0700 Subject: [PATCH] `nginx` config: Remove `worker_processes` and `events.worker_connections`. This is closer to the default nginx settings with respect to concurrency. Turn off access log, as it is heavy on I/O and would not be used in a production setup (whether with or without gVisor). Update nginx to version `1.25.1`. PiperOrigin-RevId: 551669286 --- images/benchmarks/nginx/Dockerfile | 4 ++-- images/benchmarks/nginx/nginx.conf | 14 +++++--------- images/benchmarks/nginx/nginx_gofer.conf | 14 +++++--------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/images/benchmarks/nginx/Dockerfile b/images/benchmarks/nginx/Dockerfile index c8e3330d0..a938a4696 100644 --- a/images/benchmarks/nginx/Dockerfile +++ b/images/benchmarks/nginx/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:1.15.10 +FROM nginx:1.25.1 # Generate a bunch of relevant files. RUN mkdir -p /local && \ @@ -8,5 +8,5 @@ RUN mkdir -p /local && \ RUN touch /local/index.html -COPY ./nginx.conf /etc/nginx/nginx.conf +COPY ./nginx.conf /etc/nginx/nginx.conf COPY ./nginx_gofer.conf /etc/nginx/nginx_gofer.conf diff --git a/images/benchmarks/nginx/nginx.conf b/images/benchmarks/nginx/nginx.conf index 2c43c0cda..08598b437 100644 --- a/images/benchmarks/nginx/nginx.conf +++ b/images/benchmarks/nginx/nginx.conf @@ -1,17 +1,13 @@ -user nginx; -worker_processes 1; +user nginx; daemon off; -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; +events {} http { server { + access_log off; location / { root /tmp/html; } diff --git a/images/benchmarks/nginx/nginx_gofer.conf b/images/benchmarks/nginx/nginx_gofer.conf index dbba2a575..3d942ff86 100644 --- a/images/benchmarks/nginx/nginx_gofer.conf +++ b/images/benchmarks/nginx/nginx_gofer.conf @@ -1,17 +1,13 @@ -user nginx; -worker_processes 1; +user nginx; daemon off; -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; +events {} http { server { + access_log off; location / { root /local; }