Opened 4 years ago

Closed 4 years ago

#2912 closed change (fixed)

New default for $nginx::worker_processes

Reported by: matze Assignee: matze
Priority: P3 Milestone:
Module: Infrastructure Keywords:
Cc: fred Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29323735
https://codereview.adblockplus.org/29323738
https://codereview.adblockplus.org/29323742
https://codereview.adblockplus.org/29323745
https://codereview.adblockplus.org/29323748
https://codereview.adblockplus.org/29323751

Description

The number of $nginx::worker_processes should default to the node's $::processorcount (a Facter variable), instead of hard-coding it based on the current number of CPUs. See also #2888.

Change History (3)

comment:1 Changed 4 years ago by matze

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

While the initial change-set is quite trivial, the work won't be done with this one alone:

$ find * -name '*.pp' -not -wholename 'modules/nginx/*' -exec grep worker_processes {} +
modules/discourse/manifests/init.pp:    worker_processes => 1,
modules/downloadserver/manifests/init.pp:    worker_processes => 2,
modules/filterserver/manifests/init.pp:      worker_processes => 2,
modules/notificationserver/manifests/init.pp:      worker_processes => 2,
modules/statsmaster/manifests/init.pp:    worker_processes => 2,
modules/updateserver/manifests/init.pp:    worker_processes => 2,

Obvously a lot of our modules define the number of $nginx::worker_processes for their individual application. This does not make much sense anymore, especially with the change-set from both this ticket here as well as the one from #2888.

In fact it should be enough to just remove all of the occurrences listed above. One can use the Hiera option nginx::worker_processes instead. For now that won't be necessary though: All of the above numbers "accidentally" reflect the number of CPUs in their respective production setup. Well, this is of course no accident, but a tribute to the quirks of the former approach.

Note, however, that the removal should be split up in multiple commits (except for filterserver and notificationserver, those may be put together). All of these can use this very ticket here as reference number though.

comment:2 Changed 4 years ago by matze

  • Review URL(s) modified (diff)
Note: See TracTickets for help on using tickets.