guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: hydra: bayfront: Make some NGinx configuration tw


From: Christopher Baines
Subject: branch master updated: hydra: bayfront: Make some NGinx configuration tweaks.
Date: Fri, 24 Jun 2022 06:42:08 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository maintenance.

The following commit(s) were added to refs/heads/master by this push:
     new a556b50  hydra: bayfront: Make some NGinx configuration tweaks.
a556b50 is described below

commit a556b50386903af93ede78d3f7e9946b535ec036
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Jun 24 11:32:37 2022 +0100

    hydra: bayfront: Make some NGinx configuration tweaks.
    
    I'm hoping these might help with the "server is somewhat slow"
    messages from guix substitute.
    
    The reuseport option affects all servers, and might help with latency
    and throughput by having connections distributed directly to worker
    processes.
    
    I think epoll might be being used by default, but specify it
    explicitly anyway.
    
    The access log is quite big, so gzip it to decrease disk I/O.
    
    Also increase the number of worker processes.
    
    * hydra/bayfront.scm (%bordeaux.guix.gnu.org-nginx-servers): Use
    reuseport when listening and gzip the access log.
    <services>: Specify use epoll; and increase worker_processes in the
    NGinx global directives.
---
 hydra/bayfront.scm | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index aef3cd5..8692c1c 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -645,11 +645,11 @@ add_header Content-Type text/plain;")))
     (list
      (nginx-server-configuration
       (server-name '("bordeaux.guix.gnu.org"))
-      (listen '("80" "[::]:80"))
+      (listen '("80 reuseport"
+                "[::]:80 reuseport"))
       (root (local-file "nginx/html/bordeaux" #:recursive? #t))
       (raw-content
-       '("
-access_log  /var/log/nginx/bordeaux.access.log;"))
+       '("access_log /var/log/nginx/bordeaux.access.log.gz combined gzip 
flush=1m;"))
       (locations
        (append
         common-locations
@@ -660,15 +660,17 @@ access_log  /var/log/nginx/bordeaux.access.log;"))
 
      (nginx-server-configuration
       (server-name '("bordeaux.guix.gnu.org"))
-      (listen '("443 ssl" "[::]:443 ssl"))
+      (listen '("443 ssl reuseport"
+                "[::]:443 ssl reuseport"))
       (root (local-file "nginx/html/bordeaux" #:recursive? #t))
       (ssl-certificate
        "/etc/letsencrypt/live/bayfront.guix.gnu.org/fullchain.pem")
       (ssl-certificate-key
        "/etc/letsencrypt/live/bayfront.guix.gnu.org/privkey.pem")
       (raw-content
-       (list %common-tls-options
-             "access_log /var/log/nginx/bordeaux.access.log;"))
+       (list
+        %common-tls-options
+        "access_log /var/log/nginx/bordeaux.access.log.gz combined gzip 
flush=1m;"))
       (locations common-locations)))))
 
 
@@ -1003,8 +1005,8 @@ access_log  /var/log/nginx/bordeaux.access.log;"))
     (service nginx-service-type
              (nginx-configuration
               (global-directives
-               '((events . ())
-                 (worker_processes . 8)))
+               '((events . ((use . epoll)))
+                 (worker_processes . 16)))
               (modules
                (list
                 ;; Module to redirect users to the localized pages of their 
choice.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]