Source: nginx
Version: 1.30.1-4
Severity: normal
X-Debbugs-Cc: [email protected], 
[email protected]
User: [email protected]
Usertags: loong64

I noticed that debusine's autopkgtests are failing on loong64 (e.g.  
https://ci.debian.net/packages/d/debusine/testing/loong64/72375884/).  
On investigation, I found this in its test artifacts:

  Jun 22 10:47:53 ci-173-ef19176d nginx[8035]: 2026/06/22 10:47:53 [emerg] 
8035#8035: could not build server_names_hash, you should increase 
server_names_hash_bucket_size: 32
  Jun 22 10:47:53 ci-173-ef19176d nginx[8035]: nginx: configuration file 
/etc/nginx/nginx.conf test failed

I suppose we could work around this in debusine, as suggested in 
https://nginx.org/en/docs/http/server_names.html#optimization.  However, 
I think this message points to nginx being configured suboptimally on 
this architecture.  The default value of server_names_hash_bucket_size 
is set to nginx's idea of the CPU cache line size.  Looking at 
https://salsa.debian.org/nginx-team/nginx/-/blob/debian/latest/auto/os/conf, 
it seems that this is set based on matching the architecture name.  No 
specific value is set for the case where $NGX_MACHINE is loongarch64, so 
it falls back to 32.

I'm not an architecture expert, but looking at e.g. 
https://github.com/golang/go/blob/master/src/internal/cpu/cpu_loong64.go 
it seems as though 64 might be a better choice on this architecture.  
Could anyone on debian-loongarch@ confirm or contradict this?

Thanks,

-- 
Colin Watson (he/him)                              [[email protected]]

Reply via email to