特殊:Badtitle/NS100:UbuntuLTSP/FlowControl
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/UbuntuLTSP/FlowControl }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/af | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|Afrikaans| [[::UbuntuLTSP/FlowControl/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/ar | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|العربية| [[::UbuntuLTSP/FlowControl/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/az | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|azərbaycanca| [[::UbuntuLTSP/FlowControl/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/bcc | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|جهلسری بلوچی| [[::UbuntuLTSP/FlowControl/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/bg | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|български| [[::UbuntuLTSP/FlowControl/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/br | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|brezhoneg| [[::UbuntuLTSP/FlowControl/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/ca | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|català| [[::UbuntuLTSP/FlowControl/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/cs | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|čeština| [[::UbuntuLTSP/FlowControl/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/de | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|Deutsch| [[::UbuntuLTSP/FlowControl/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/el | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|Ελληνικά| [[::UbuntuLTSP/FlowControl/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/es | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|español| [[::UbuntuLTSP/FlowControl/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/fa | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|فارسی| [[::UbuntuLTSP/FlowControl/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/fi | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|suomi| [[::UbuntuLTSP/FlowControl/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/fr | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|français| [[::UbuntuLTSP/FlowControl/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/gu | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|ગુજરાતી| [[::UbuntuLTSP/FlowControl/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/he | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|עברית| [[::UbuntuLTSP/FlowControl/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/hu | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|magyar| [[::UbuntuLTSP/FlowControl/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/id | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|Bahasa Indonesia| [[::UbuntuLTSP/FlowControl/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/it | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|italiano| [[::UbuntuLTSP/FlowControl/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/ja | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|日本語| [[::UbuntuLTSP/FlowControl/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/ko | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|한국어| [[::UbuntuLTSP/FlowControl/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/ksh | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|Ripoarisch| [[::UbuntuLTSP/FlowControl/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/mr | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|मराठी| [[::UbuntuLTSP/FlowControl/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/ms | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|Bahasa Melayu| [[::UbuntuLTSP/FlowControl/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/nl | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|Nederlands| [[::UbuntuLTSP/FlowControl/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/no | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|norsk| [[::UbuntuLTSP/FlowControl/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/oc | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|occitan| [[::UbuntuLTSP/FlowControl/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/pl | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|polski| [[::UbuntuLTSP/FlowControl/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/pt | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|português| [[::UbuntuLTSP/FlowControl/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/ro | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|română| [[::UbuntuLTSP/FlowControl/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/ru | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|русский| [[::UbuntuLTSP/FlowControl/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/si | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|සිංහල| [[::UbuntuLTSP/FlowControl/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/sq | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|shqip| [[::UbuntuLTSP/FlowControl/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/sr | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|српски / srpski| [[::UbuntuLTSP/FlowControl/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/sv | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|svenska| [[::UbuntuLTSP/FlowControl/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/th | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|ไทย| [[::UbuntuLTSP/FlowControl/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/tr | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|Türkçe| [[::UbuntuLTSP/FlowControl/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/vi | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|Tiếng Việt| [[::UbuntuLTSP/FlowControl/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/yue | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|粵語| [[::UbuntuLTSP/FlowControl/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/zh | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|中文| [[::UbuntuLTSP/FlowControl/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/zh-hans | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|中文(简体)| [[::UbuntuLTSP/FlowControl/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UbuntuLTSP/FlowControl | UbuntuHelp:UbuntuLTSP/FlowControl | {{#if: | :}}UbuntuLTSP/FlowControl}}/zh-hant | • {{#if: UbuntuHelp:UbuntuLTSP/FlowControl|中文(繁體)| [[::UbuntuLTSP/FlowControl/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:UbuntuLTSP/FlowControl|:UbuntuLTSP/FlowControl|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :UbuntuLTSP/FlowControl/zh | | {{#ifexist: UbuntuLTSP/FlowControl/zh | | {{#ifeq: {{#titleparts:UbuntuLTSP/FlowControl|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:UbuntuLTSP/FlowControl|1|-1|}} | zh | | }}
This page is specific to Ubuntu versions 8.04, 8.10, 9.04, 10.04 |
If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.
Introduction
Ethernet flow control, or 802.3x, is a way for a network device to tell its immediate neighbor that it is overloaded with data, such as when a device is receiving data faster than it can process it. Unfortunately, if flow control is enabled on a gigabit switch with a gigabit server and 100Mbps clients, it may bring down the whole network bandwidth to 100Mbps. So flow control should be disabled for mixed-speed LTSP networks.
Disabling flow control on the switch
If your switch is managed, the easiest way would be to disable flow control from its configuration interface.
Disabling flow control with module parameters
For modules that support it, the appropriate parameters may be appended to /etc/modprobe.d/options. NOTE: The file /etc/modprobe.d/options no longer exists in newer versions of Ubuntu. It is still supported by the kernel, however the filename needs the .conf extension, i.e. /etc/modprobe.d/options.conf would be the file you create to save your options. Actually the filename doesn't matter as long as the .conf extension is used. NOTE: if you find the correct parameter for your module (hint: modinfo e1000 | grep ^parm), please edit the page and append the correct line below:
Driver | /etc/modprobe.d/options line |
e1000 | options e1000 !FlowControl=2 |
3c59x | options 3c59x flow_ctrl=0 |
Disabling flow control with ethtool
For drivers that support ethtool, the following command can be used to disable flow control on the server NIC:
sudo ethtool -A eth0 autoneg off rx off
To see if flow control is currently disabled, you may execute:
ethtool -a eth0
One place to insert this command could be in a new /etc/network/if-up.d/flow-control script. Remember to do chmod +x flow-control. (Note that in the following script you must delete the space between "#" and "!" on the first line. Please edit this section if you know how to make these two characters display side by side.)
# !/bin/sh # Disable flow control. For more info, see # https://help.ubuntu.com/community/UbuntuLTSP/FlowControl set -e # Don't do anything for the lo interface. if [ "$IFACE" = lo ]; then exit 0 fi # Only run from ifup. if [ "$MODE" != start ]; then exit 0 fi # Only care about inet and inet6. if [ "$ADDRFAM" != inet ] && [ "$ADDRFAM" != inet6 ]; then exit 0 fi # Is /usr mounted? if [ ! -e /usr/sbin/ethtool ]; then exit 0 fi /usr/sbin/ethtool -A eth0 autoneg off rx off >/dev/null 2>&1 || true exit 0
In case it will not be applied after startup and flow control still is enabled (e.g in lucid, 10.04) here is a small workaround to disable flow control with ubuntu startup scripts. You can solve it simply by adding "/etc/init.d/networking restart" to the "/etc/rc.local" file. Don't forget setting it executable: "chmod +x /etc/rc.local". Of course the script above ("Disabling flow control with ethtool") must be installed.
Disabling flow control with mii-tool
TODO (please edit the page if you have information on this)
Benchmarks
A real-life benchmark showed that with flow control on, a 100/1000 mixed speed network operated at 90Mbps, and with flow control off the bandwidth increased to 900Mbps.
See Also
- UbuntuLTSP - Community Ubuntu LTSP Documentation.
External Links
- Beware Ethernet flow control - A detailed explanation of the problem.
- Ethernet flow control - An article about Ethernet flow control from !WikiPedia.
- Discussion - A discussion about the problem in the ltsp-discuss mailing list.