Filippo Giunchedi has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/171547

Change subject: swift: report statsd data to localhost
......................................................................

swift: report statsd data to localhost

swift statsd traffic seems to account for >= 50% of the statsd traffic, thus
driving txstatsd cpu usage very high on tungsten. A more reasonable solution is
to have statsd locally and let txstatsd push it to tungsten.

NOTE: this works only because the swift metrics are per-machine, and thus don't
need to get aggregated across machines in a central statsd

Change-Id: Ia95564b1b2950d16d44c347e1a612ef5b079822c
---
M hieradata/codfw.yaml
M manifests/role/swift.pp
M modules/swift_new/manifests/params.pp
3 files changed, 19 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/171547/1

diff --git a/hieradata/codfw.yaml b/hieradata/codfw.yaml
index 72807ef..3468965 100644
--- a/hieradata/codfw.yaml
+++ b/hieradata/codfw.yaml
@@ -29,9 +29,9 @@
 #    search_backup: <key>
 
 swift_new::hash_path_suffix: 'de4227064232ed08'
-swift_new::storage::statsd_host: 'statsd.eqiad.wmnet'
+swift_new::storage::statsd_host: 'localhost'
 swift_new::proxy::proxy_address: 'http://ms-fe.svc.codfw.wmnet'
-swift_new::proxy::statsd_host: 'statsd.eqiad.wmnet'
+swift_new::proxy::statsd_host: 'localhost'
 swift_new::proxy::backend_url_format: 'sitelang'
 swift_new::proxy::rewrite_thumb_server: 'rendering.svc.eqiad.wmnet'
 swift_new::proxy::dispersion_account: 'dispersion'
diff --git a/manifests/role/swift.pp b/manifests/role/swift.pp
index e136030..75a2efe 100644
--- a/manifests/role/swift.pp
+++ b/manifests/role/swift.pp
@@ -358,6 +358,14 @@
         memcached_port => '11211',
     }
 
+    class { '::txstatsd':
+        settings => {
+            statsd => {
+                'carbon-cache-host' => "${::swift_new::params::graphite_host}",
+            },
+        },
+    }
+
     monitor_service { 'swift-http-frontend':
         description   => 'Swift HTTP frontend',
         check_command => 
"check_http_url!${swift_check_http_host}!/monitoring/frontend",
@@ -385,6 +393,14 @@
     include ::swift_new::container_sync
     include ::swift_new::storage::monitoring
 
+    class { '::txstatsd':
+        settings => {
+            statsd => {
+                'carbon-cache-host' => "${::swift_new::params::graphite_host}",
+            },
+        },
+    }
+
     $all_drives = hiera('swift_storage_drives')
 
     swift_new::init_device { $all_drives:
diff --git a/modules/swift_new/manifests/params.pp 
b/modules/swift_new/manifests/params.pp
index a946632..c41c6f7 100644
--- a/modules/swift_new/manifests/params.pp
+++ b/modules/swift_new/manifests/params.pp
@@ -4,6 +4,7 @@
   $account_keys = {},
   $replication_accounts = {},
   $replication_keys = {},
+  $graphite_host = 'graphite-in.eqiad.wmnet',
 ) {
     # Noop class
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia95564b1b2950d16d44c347e1a612ef5b079822c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to