[PATCH] Using worker specific counters for http_stub_status module

Maxim Dounin mdounin at mdounin.ru
Sun Jan 7 15:14:12 UTC 2018


On Fri, Jan 05, 2018 at 01:34:56PM +0000, debayang.qdt wrote:

> When the http_stub_status_module is enabled, a performance 
> impact seen on some platforms with several worker processes 
> running and increased workload.
> There is a contention with the atomic updates of the several 
> shared memory counters maintained by this module - which could 
> be eliminated if we maintain worker process specific counters 
> and only sum them up when requested by client.
> Below patch is an attempt to do so - which bypasses the 
> contention and improves performance on such platforms.

So far we haven't seen any noticeable performance degradation on 
real workloads due to stub status enabled.  Several atomic 
increments aren't visible compared to generic request processing 
costs.  If you've seen any noticeable preformance degradation on 
real workloads - you may want to share your observations first.

Also, it might not be a good idea to spend 128k per variable, as 
this might be noticeable on platforms with small amounts of memory.

Maxim Dounin

More information about the nginx-devel mailing list