BBlack has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/362439 )
Change subject: [WIP] NUMA binding for cache frontends under 'isolate' ...................................................................... [WIP] NUMA binding for cache frontends under 'isolate' Binding the cache frontends to the network node won't make sense on many of our legacy hardware configs due to limitations. It will make sense only on our latest config and possibly the other most-recent one as well (the 256GB symmetric nodes). On the older machines that shouldn't bind varnish-frontend, it's also too wasteful to isolate the node just for nginx and nothing else. Therefore, tie the binding of varnish to the 'isolate' setting. Change-Id: Ie67991ab785714e4c0e27f14b5081b8148e3fba6 --- M modules/role/manifests/cache/instances.pp M modules/varnish/manifests/instance.pp M modules/varnish/templates/initscripts/varnish.systemd.erb 3 files changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/39/362439/1 diff --git a/modules/role/manifests/cache/instances.pp b/modules/role/manifests/cache/instances.pp index 99daba4..8683f97 100644 --- a/modules/role/manifests/cache/instances.pp +++ b/modules/role/manifests/cache/instances.pp @@ -103,6 +103,13 @@ # Set a reduced keep value for frontends $fe_keep_vcl_config = merge($fe_vcl_config, { 'keep' => '1d', }) + if $::numa_networking == 'isolate' { + $nnodes = $facts['numa']['device_to_node'][$facts['interface_primary']].join(',') + $fe_cmd_prefix = "/usr/bin/numactl -a -N ${nnodes} -m ${nnodes}" + } else { + $fe_cmd_prefix = '' + } + # lint:ignore:arrow_alignment varnish::instance { "${title}-frontend": instance_name => 'frontend', @@ -123,6 +130,7 @@ }, }, vcl_config => $fe_keep_vcl_config, + start_cmd_prefix => $fe_cmd_prefix, } # lint:endignore } diff --git a/modules/varnish/manifests/instance.pp b/modules/varnish/manifests/instance.pp index a6324c2..f1dff96 100644 --- a/modules/varnish/manifests/instance.pp +++ b/modules/varnish/manifests/instance.pp @@ -11,7 +11,8 @@ $app_directors={}, $app_def_be_opts={}, $backend_caches={}, - $extra_vcl = [] + $extra_vcl = [], + $start_cmd_prefix = '', ) { include ::varnish::common diff --git a/modules/varnish/templates/initscripts/varnish.systemd.erb b/modules/varnish/templates/initscripts/varnish.systemd.erb index 5b3d4c3..6a67cb3 100644 --- a/modules/varnish/templates/initscripts/varnish.systemd.erb +++ b/modules/varnish/templates/initscripts/varnish.systemd.erb @@ -16,7 +16,7 @@ Environment="MALLOC_CONF=<%= @jemalloc_conf %>" <% end -%> ExecReload=/usr/share/varnish/reload-vcl <%= @extraopts %> -q -ExecStart=/usr/sbin/varnishd \ +ExecStart=<%= @start_cmd_prefix %>/usr/sbin/varnishd \ -P %t/%p.pid \ <%= @ports.map { |p| "-a :"+p }.join(" ") -%> \ -T 127.0.0.1:<%= @admin_port -%> \ -- To view, visit https://gerrit.wikimedia.org/r/362439 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie67991ab785714e4c0e27f14b5081b8148e3fba6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack <bbl...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits