BBlack has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/379799 )
Change subject: Global: Turn off ethernet flow for all interfaces at boot time
......................................................................
Global: Turn off ethernet flow for all interfaces at boot time
Most switches do not send flow control pause frames anyways, but
they can honor ones sent by the host and start buffering up some
of the host's inbound traffic in the switch. This contributes to
bufferbloat. It's better to drop packets quickly and let the
higher-layer protocols (e.g. TCP congestion control algs)
intellgently detect this for throttling.
Change-Id: I43dfa167df05408c1d42e9d32c00ddc1cc2895f2
---
M modules/interface/manifests/manual.pp
A modules/interface/manifests/noflow.pp
M modules/profile/manifests/base.pp
3 files changed, 24 insertions(+), 0 deletions(-)
Approvals:
BBlack: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/interface/manifests/manual.pp
b/modules/interface/manifests/manual.pp
index 9ad6a0e..966bfec 100644
--- a/modules/interface/manifests/manual.pp
+++ b/modules/interface/manifests/manual.pp
@@ -10,4 +10,8 @@
context => '/files/etc/network/interfaces',
changes => $augeas_cmd;
}
+
+ interface::noflow { $interface:
+ require => Augeas["${interface}_manual"];
+ }
}
diff --git a/modules/interface/manifests/noflow.pp
b/modules/interface/manifests/noflow.pp
new file mode 100644
index 0000000..7a66b1c
--- /dev/null
+++ b/modules/interface/manifests/noflow.pp
@@ -0,0 +1,18 @@
+# Definition: interface::noflow
+#
+# Disable ethernet flow control at boot time via up-commands.
+#
+# Parameters:
+# - $interface=$name:
+# The network interface to operate on
+define interface::noflow($interface=$name) {
+ # Command will fail on some hosts, depending on kernel/driver revs and/or
+ # ethernet hardware capabilities, in which case we don't care, hence ||:
+ $cmd = "ethtool -A ${interface} autoneg off tx off rx off ||:"
+
+ # Add to ifup commands in /etc/network/interfaces
+ interface::up_command { "noflow-${interface}":
+ interface => $interface,
+ command => $cmd,
+ }
+}
diff --git a/modules/profile/manifests/base.pp
b/modules/profile/manifests/base.pp
index 59213e0..f4bc426 100644
--- a/modules/profile/manifests/base.pp
+++ b/modules/profile/manifests/base.pp
@@ -153,4 +153,6 @@
if $check_smart and $facts['is_virtual'] == false {
class { '::smart': }
}
+
+ interface::noflow { $facts['interface_primary']: }
}
--
To view, visit https://gerrit.wikimedia.org/r/379799
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I43dfa167df05408c1d42e9d32c00ddc1cc2895f2
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Mark Bergsma <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits