Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396055 )

Change subject: Refactor ORES uWSGI workers to use an absolute count
......................................................................

Refactor ORES uWSGI workers to use an absolute count

This decouples us from the hardware.

Bug: T182249
Bug: T182332
Change-Id: Ib4445ad05c01f2b1161fc457b8db9feac2f5b973
---
M modules/ores/manifests/web.pp
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/396055/1

diff --git a/modules/ores/manifests/web.pp b/modules/ores/manifests/web.pp
index 5378bf7..ff1a110 100644
--- a/modules/ores/manifests/web.pp
+++ b/modules/ores/manifests/web.pp
@@ -1,7 +1,7 @@
 # = Class: ores::web
 # Sets up a uwsgi based web server for ORES running python3
 class ores::web(
-    $workers_per_core = 2,
+    $uwsgi_workers = 45,
     $redis_host = '127.0.0.1',
     $redis_password = undef,
     $port = 8081,
@@ -23,7 +23,6 @@
         'ALL=(root) NOPASSWD: /usr/sbin/service celery-ores-worker *',
     ]
 
-    $processes = $::processorcount * $workers_per_core
     service::uwsgi { 'ores':
         port            => $port,
         sudo_rules      => $sudo_rules,
@@ -35,7 +34,7 @@
             need-plugins  => 'python3,stats_pusher_statsd',
             venv          => $ores::base::venv_path,
             logformat     => '[pid: %(pid)] %(addr) (%(user)) {%(vars) vars in 
%(pktsize) bytes} [%(ctime)] %(method) %(uri) => generated %(rsize) bytes in 
%(msecs) msecs (%(proto) %(status)) %(headers) headers in %(hsize) bytes 
(%(switches) switches on core %(core)) user agent "%(uagent)"',
-            processes     => $processes,
+            processes     => $uwsgi_workers,
             add-header    => 'Access-Control-Allow-Origin: *',
             max-requests  => 200,
             stats-push    => 
"statsd:${graphite_server}:8125,ores.${::hostname}.uwsgi",

-- 
To view, visit https://gerrit.wikimedia.org/r/396055
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4445ad05c01f2b1161fc457b8db9feac2f5b973
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Awight <awi...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to