Содержание
- Windows 10. Отключение интернета каждые
- Ecn capability как отключить в windows 10
- Что сделать в первую очередь
- Нужно ли отключить защитник Windows 10
- Какие службы нужно отключить в windows 10
- Нужно ли отключать обновления Windows 10
- Нужно ли отключать брандмауэр Windows 10
Windows 10. Отключение интернета каждые
vladi105/09.01.2016, 17:46 писал: Может сбросить настройки сети к дефолтным?!
Выполните сброс параметров сетевого адаптера, маршрутов, очистке DNS и Winsock.
Отключите сетевой кабель.
Нажмите Win+X, выберите Командная строка администратор, в командной строке выполните последовательно команды:
route f
ipconfig /flushdns
netsh int ip reset
netsh int ipv4 reset
netsh int tcp reset
netsh winsock reset
Перезагрузите компьютер и настройте параметры сетевой карты.
Подключите сетевой кабель.
В общем моя ОС Win 10 в очередной раз обновилась, ну как сказать, прилетело обновление обновление и я обновил 🙂 И опять начались танцы с Ethernet адаптером. Он просто выключается спустя некоторое время, как только я запускаю торрент и начинаю скачивать большие файлы и при этом одновременно ползать в инете. Пробовал откатить драйвер, не помогло, переустановка тоже не помогла (хотя в прошлый раз этот вариант спас).
Проверим глобальные настройки TCP/IP
netsh int tcp show global
Состояние разгрузки TCP Chimney : enabled
(Chimney offload State)
Все сетевые соединения обрабатываются в сетевой карте.
netsh int tcp set global chimney=enabled (disable)
Поставщик надстройки контроля перегрузки : ctcp
(Add-On Congestion Control Provider)
CTCP увеличивает темп передачи с одновременным контролем размера окна и пропускной способности.
netsh int tcp set global congestionprovider=ctcp (none, ctcp, default)
Мощность ECN : enabled
(ECN Capability)
Просто говоря заминка на маршрутизаторе, снижаем передачу (пробки на дорогах).
netsh int tcp set global ecncapability=enabled (enabled, disabled, default)
Штампы времени RFC 1323 : enabled
(RFC 1323 Timestamps)
В паре с Auto-Tuning Level, включает Window Scale (динамическое изменение размера окна приема). Windows пытается сделать размер окна наиболее разумным, учитывая задержки, помехи.
Источник
Ecn capability как отключить в windows 10
Все пользователи должны знать, что нужно отключить в windows 10, дабы работа стала еще проще и безопаснее. На самом деле человек, работающий с Виндовс, обязательно должен настроить ОС под себя. Давайте поподробнее разберемся с теми службами, которые нужно отключить для более комфортного использования компьютера.
На данный момент операционная система Windows считается наиболее популярной среди пользователей компьютеров. Последней версий ОС является Windows 10, она более практичная и адаптивная, нежели прошлая версия.
Что сделать в первую очередь
Попробуйте более эффективные средства, перед тем как начнете отключать службы, которые практически не влияют на производительность.
Обе программы разработаны официальными партнерами Microsoft!
Нужно ли отключить защитник Windows 10
В современном компьютерном мире существует множество разных вирусов. Они могут встречаться и в скачанных файлах и на потенциально опасных сайтах. На данный момент существуют программы «Антивирусы», которые способны предупреждать об опасных файлах и сайтах, а так же находить и удалять вирусы на компьютере.
Поэтому хорошенько подумайте, нужно ли отключить защитник windows 10? Ведь без участия антивируса, устройство быстро наполнится различными вирусными файлами, которые смогут вызвать сбой системы. Если все-таки решите отключить, то рекомендуем купить лицензионный антивирус стороннего производителя. Поэтому не рекомендуется отключать защищающие программы, а наоборот установить одну, и постоянно сканировать ПК на наличие вредоносных файлов.
Какие службы нужно отключить в windows 10
Для того чтоб выявить все действующие программы, нужно одновременно нажать кнопки «Win» и «R». Данная комбинация вызывает командную строку, в которую нужно будет вписать «services.msc».
Далее на экране должен появиться список всех служб, которые есть на устройстве. Остановка или отключение службы происходит двойным кликом мыши. После отключения служб, обязательно нажимаем «Применить», иначе изменения не сохранятся.
Давайте посмотрим, какие службы нужно отключить в windows 10:
Все вышеперечисленные службы могут быль отключены по желанию пользователя, ведь они только тормозят производительность устройства.
Нужно ли отключать обновления Windows 10
Для любого устройства обновления очень важны. Они помогают усовершенствовать программы, делая их более продвинутыми и функциональными. Но часто бывает, особенно на более устаревших моделях компьютеров, что после обновлений устройство начинает выдавать малую производительность, постоянно зависать и потреблять больше трафика.
И тут у многих стает вопрос, нужно ли отключать обновления windows 10? Конечно же, этого не рекомендуется делать, ведь без обновлений компьютер быстро устареет и не сможет выполнять некоторые функции. Но для тех пользователей, которые сильно ограничены в трафике, могут отключить обновления.
Нужно ли отключать брандмауэр Windows 10
Брандмауэр – это современный метод защиты информационных данных на компьютере. Но если вы задаетесь вопросом, нужно ли отключать брандмауэр на windows 10? То этого категорически не рекомендуется делать во всех случаях.
Только если у пользователя есть аналогичная замена способа защиты информационных данных, тогда можно провести отключение.
Для отключения достаточно зайти в «Панель Управления» на своем компьютере и выбрать соответствующий пункт. После отключения не забываем нажать кнопку «Применить», дабы сохранить все изменения.
Источник
Экспериментальные твики
Данные настройки не обязательны, но в них есть немного для каждого.
- Отключение патчей Meltdown, Spectre, Zombieload v2
- Настройка сети
Отключение патчей Meltdown, Spectre, Zombieload v2
💡 Для дальнейшей настройки необходимо ознакомиться c
Работа с реестром.
Windows Registry Editor Version 5.00 ; отключение патчей Meltdown и Spectre [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemory Management] "FeatureSettings"=dword:00000001 "FeatureSettingsOverride"=dword:00000003 "FeatureSettingsOverrideMask"=dword:00000003 ; отключение патча Zombieload v2 [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerKernel] "DisableTsx"=dword:00000001
Значения по-умолчанию:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemory Management] "FeatureSettings"=dword:00000000 "FeatureSettingsOverride"=- "FeatureSettingsOverrideMask"=- [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerKernel] "DisableTsx"=-
В своё время обнаружение Meltdown [?] и Spectre [?] наделало не мало шума, и зачастую противники этих патчей выдвигают основной аргумент в пользу его отключения – уменьшение производительности CPU. С одной стороны некоторое падение производительности действительно есть [?], тоже самое касается и Zombieload [?] – что-то в районе пары процентов, что не критично и в пределах погрешности, с другой стороны это всё же потенциальная дыра и в приличном обществе такое выставлять на показ не принято.
✨ На слабых CPU есть смысл поэкспериментировать с данной настройкой.
Настройка сети
💡 Для дальнейшей настройки необходимо ознакомиться c
Работа с реестром,
Определение Class GUID.
⚠️ Все настройки сети необходимо тестировать, чтобы определить оптимальные для вашего качества соединения.
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionMultimediaSystemProfile] "NetworkThrottlingIndex"=dword:ffffffff
Значения по-умолчанию:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionMultimediaSystemProfile] "NetworkThrottlingIndex"=dword:0000000a
По-умолчанию в Windows используется механизм регулирования сети, где ограничивается обработка не мультимедийного сетевого трафика до 10 пакетов в миллисекунду (чуть больше 100 Mb/s). Смысл такого регулирования заключается в том, что обработка сетевых пакетов может быть ресурсоёмкой задачей, и может потребоваться регулирование, чтобы обеспечить приоритетный доступ CPU к мультимедийным программам. Но т.к. мы хотим избавиться от дополнительных вмешательств, то данную настройку так же рекомендуется отключить, особенно при наличии гигабитной сети.
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersInterfaces***] "TCPNoDelay"=dword:00000001 "TcpAckFrequency"=dword:00000001 "TcpDelAckTicks"=dword:00000000 "MTU"=dword:000005dc
Значения по-умолчанию:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersInterfaces***] "TCPNoDelay"=- "TcpAckFrequency"=- "TcpDelAckTicks"=- "MTU"=-
В качестве части имени ветки мы используем ***
, где ***
надо заменить на Class GUID нашего сетевого адаптера.
Параметр TCPNoDelay
отвечает за включение Алгоритма Нейгла [?], который предназначен для повышения эффективности протокола TCP [?] за счёт уменьшения количества сетевых пакетов, путём объединения несколько небольших пакетов в один крупный пакет для более эффективной передачи (nagling
). Однако было доказано [?], что в некоторых играх он увеличивает сетевую задержку, поэтому рекомендуется отключить его.
⚠️ Имейте в виду, что отключение данной функции уменьшит скорость загрузки/отдачи из-за меньшего количества данных, передаваемых за пакет.
Параметр TcpAckFrequency
определяет количество подтверждений TCP (ACK), чтобы уменьшить количество пакетов [?]. Для увеличения пропускной способности можете поэкспериментировать с небольшими значениями, превышающими 2
. Производительность Wi-Fi также может немного улучшиться, если с отключить данную функцию установив 1
.
Параметр TcpDelAckTicks
служит для настройки тайм-аута TCP (ACK) [?]. Если вы отключили nagling
, то данный параметр так же стоит отключить установив параметр в 0
.
⚠️ Вы также можете установить значение параметра
1
, чтобы уменьшитьnagling
с 200ms по умолчанию, не отключая его.
Параметр MTU
, как ясно из названия, явно задаёт использовать MTU
[?] равный 1500
байт [?] для избежания авто-установки в не правильное значение, т.к. по-умолчанию все сетевые устройства используют это значение равное 1500, а разные значения на устройствах могут привести с потери пакетов.
Congestion Control Provider
[?] – специальные алгоритмы используемые чтобы улучшить пропускную способность. Доступны несколько вариантов:
CTCP
[?] – может улучшить пропускную способность при более высоких задержках или широкополосном соединении.DCTCP
– используется для повышения пропускной способности на локальных каналах с низкой задержкой, если у вас есть LAN-сеть или гигабитное соединение. Используется на серверах.NewReno
– аналогиченCTCP
, но так же использует дополнительные алгоритмы Fast Retransmit & Fast Recovery.
Включение CTCP:
netsh int tcp set supplemental Internet congestionprovider=ctcp > nul netsh int tcp set heuristics disabled > nul
Включение DCTCP:
netsh int tcp set supplemental Internet congestionprovider=dctcp > nul netsh int tcp set heuristics disabled > nul
Включение NewReno (по-умолчанию):
netsh int tcp set supplemental Internet congestionprovider=NewReno > nul netsh int tcp set heuristics disabled > nul
Автоматическая настройка TCP [?] — поможет улучшить пропускную способность в сетях с высокой пропускной способностью и большими задержками. Отключение фиксирует значение для TCP Window ограничивая его до 64Kb. Normal
обычно является лучшим выбором, но, возможно, стоит попробовать отключить эту настройку.
Отключение:
netsh int tcp set global autotuninglevel=disabled > nul netsh int tcp set global chimney=disabled > nul netsh int tcp set global rss=enabled > nul netsh int tcp set global rsc=disabled > nul
Режим Normal (по-умолчанию):
netsh int tcp set global autotuninglevel=normal > nul netsh int tcp set global chimney=disabled > nul netsh int tcp set global rss=enabled > nul netsh int tcp set global rsc=disabled > nul
ECN Capability
[?] – это механизм, который предоставляет маршрутизаторам альтернативный метод сообщения о перегрузке сети. Используется для уменьшения повторных передач пакетов. ECN
предполагает, что причиной потери пакетов является перегрузка маршрутизатора, что позволяет им, испытывающим перегрузку, маркировать пакеты, из-за чего клиенты автоматически снижают скорость передачи данных, чтобы избежать дальнейшую потерю пакетов.
Включить ECN Capability
:
netsh int tcp set global ecncapability=enabled > nul netsh int tcp set global timestamps=disabled > nul
Отключить ECN Capability (по-умолчанию):
netsh int tcp set global ecncapability=disabled > nul netsh int tcp set global timestamps=disabled > nul
Рекомендуется включать только при наличии перегрузки, потери пакетов или при нестабильном подключении.
⚠️ Не включайте эту настройку, если вы используете старый маршрутизатор или компьютер.
Retransmit TimeOut (RTO)
[?] – сколько времени неподтверждённые пакеты будут бегать по сети, прежде чем соединение будет прервано. В сетях с высокой задержкой это может увеличить количество повторных передач пакетов.
Установить таймаут в 2s
:
netsh int tcp set global initialRto=2000 > nul powershell -Command "Set-NetTCPSetting -SettingName InternetCustom -MinRto 300" > nul
Установить таймаут в 3s (по-умолчанию):
netsh int tcp set global initialRto=3000 > nul powershell -Command "Set-NetTCPSetting -SettingName InternetCustom -MinRto 300" > nul
⚠️ Рекомендуется уменьшить таймаут для современных широкополосных сетей с малой задержкой.
После установки операционной системы Windows 7 и драйверов для сетевой карты можно попытаться настроить ОС для более продуктивной работы в локальной сети, если по каким соображениям настройки по умолчанию вас не устраивают на что нужно обратить внимание. Прежде чем менять рекомендуется сохранить уже установленные настройки.
1.Драйвера, обратить внимание в разделе свойства драйвера
Сетевые подключения -> пр.кн.мыши выбираем драйвер сетевой который необходимо «подстроить». Закладка «Дополнительно», обратить внимание на параметр «Большой кадр» (Jumbo frame) выбрать максимальное кол-во обычно не более 9000байт. Оптимально использование в локальных сетях до маршрутизатора, при условие что кроме вашего ПК есть еще которые могут использовать данную опцию, актуально на каналах от 100Мбит и выше.
2.Для данного пункта интересны параметры — Буферы передачи/приема, Система разгрузки, Модерация прерывания, Управление потоком. Все это относится к самой сетевой карте, а точнее как бы сказать к ее «железу» т.е. наличие цпу, и возможность самой сетевой карты выполнять некоторые функции по обслуживанию данных таких как например подсчет контрольных сумм при приеме пакетов. Отправка и прием пакетов осуществляется через буфера обычно в режиме Polling — например при получении пакета будет вызвано прерывание, драйвер начнет обработку, но при очень загруженной системе где большой трафик, а следствие и очень большое количество прерываний это будет узким местом, в данном режиме сетевая карта не создает прерывание, а ждет, когда ОС опросит карту, и в данный момент происходит накапливание принятой информации в буфере. Буфер должен быть обслужен в противном случае будет переполнение, чтоб этого не происходило за этим следит система но и алгоритм протокола TCP/IP.
3.Настройки самой системы. В новой ОС Windows 7 в связи с переписанным заново сетевым стеком появились ряд новых настроек которых ранее не было.
cmd>netsh int tcp show global
Глобальные параметры TCP
———————————————-
Receive-Side Scaling State : enabled
Chimney Offload State : automatic
NetDMA State : enabled
Direct Cache Acess (DCA) : enabled
Receive Window Auto-Tuning Level : normal
Add-On Congestion Control Provider : ctcp
ECN Capability : disabled
RFC 1323 Timestamps : enabled
Просмотр команд
cmd>netsh int tcp set global
Receive-Side Scaling State : enabled
Состояние масштабирования на принимающей стороне — разрешено (параметры enabled/disable)
netsh int tcp set global rss=enabled (disable)
использование нескольких процессов для обработки входящего потока, без RSS TCP/IP работает всегда только на одном процессоре даже если ПК многопроцессорный.
Chimney offload State : automatic
Состояние разгрузки TCP Chimney — автомат (параметры). Как ясно из самого названия TCP Chimney Offload или TCP Offload Engine эта технология, встраиваемая в сетевой адаптер, которая позволяет разгрузить CPU от задачи по обработке сетевых пакетов, т.е. все соединения будут обрабатываться в сетевой карте.
netsh int tcp set global chimney=automatic (параметры enabled/disable/automatic)
так же интересна такая команда как cmd>netsh int tcp show chimneyapplications (chimneystats)
NetDMA State : enabled
NetDMA это использование механизма DMA обмен информацией между сетевой платой и памятью ОЗУ без участия CPU.
Ключ в реестре HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
EnableTCPA=1
netsh int tcp set global netdma=enable (параметры enable/disable)
так же интересна такая команда как cmd>netsh int tcp show netdmastats
Direct Cache Acess (DCA) : enabled
Прямой доступ к кэшу NETDMA 2.0 только Windows 7 и 2008
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
EnableDCA=1
netsh int tcp set global dca=enable (параметры enable/disable)
Receive Window Auto-Tuning Level : normal
Уровень автонастройки окна приема пакетов
netsh int tcp set global autotuninglevel=normal (параметры disabled/higlyrestricted/restricted/normal/experimental)
Add-On Congestion Control Provider : ctcp
Поставщик надстройки контроля перегрузки, CTCP увеличивает темп передачи с одновременным контролем размера окна и пропускной способности.
netsh int tcp set global congestionprovider=ctcp (параметры none, ctcp, default)
ECN Capability : disabled
ECN — это механизм взаимодействия маршрутизаторов о заторах в сети. Он предназначен для уменьшения ретрансляции пакетов. Это позволяет автоматически снижать скорость передачи данных для предотвращения потерь данных.
netsh int tcp set global ecncapability=disable (параметр enabled/disabled)
RFC 1323 Timestamps : enabled
Штампы времени при установки с ключами как Auto-Tuning Level оптимальный выбор размера окна приема.
netsh int tcp set global timestamps=enable (параметр enabled/disabled)
4.Некоторые параметры присутствуют в реестре ветки
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
DisableTaskOffload=0 (если нет то создать)
Позволяет разгрузить центральный процессор, освободив его от вычислений контрольных сумм для протокола TCP, переложив эту задачу на сетевой адаптер.
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersInterfaces{NIC-id}
TcpAckFrequency=2 (данный параметр влияет на производительность в сетевых играх, так как там нужно получать и отправлять маленькие пакеты)
Значение TcpAckFrequency определяет частоту отправки TCP/IP подтверждающего сообщения. Если значение равно 2, TCP/IP будет отправлять подтверждение после 2 принятых сегментов или после принятия 1 сегмента и отсутствия второго сегмента на протяжении 200 миллисекунд.
Если значение равно 3, TCP/IP отправляет подтверждение после приема 3 сегментов, или после приема 1 или 2 сегментов и отсутствии последующих сегментов на протяжении 200 миллисекунд. Если требуется сократить время ответа за счет удаления задержек отправки подтверждений TCP/IP, задайте это значение равным 1. В таком случае TCP/IP будет немедленно отправлять подтверждение для каждого сегмента.
В интернете много споров по поводу использования Receive-Side Scaling State и Receive Window Auto-Tuning Level у некоторых пользователей происходит разрыв соединения по VPN при применении данных параметров настройки. Хотя у меня проблем с этим нет.
TcpAckFrequency — Данная настройка задает количество TCP пакетов, которые Windows накапливает (в целях оптимизации) перед отсылкой. Выставление этой настройки в 1 приводит к отсылке нового пакета без накопления нескольких следующих.
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServic esTcpipParametersInterfaces
Дочерними элементами этого ключа будет несколько ключей вида {7DBA6DCA-FFE8-4002-A28F-4D2B57AE8383} у вас другие определяется по вашему IP. Кликните правой кнопкой мыши по свободном пространству в правой части окна. Появиться меню, в котором надо выбрать пункт «Создать/Параметр DWORD». Появится новый параметр, назвать «TcpAckFrequency». Кликните правой клавишей на созданном параметре и выберите пункт меню «Изменить»
В открывшемся окне введите значение 1
TCPNoDelay Идея: Данная настройка снижает Latency за счет отключения одного из внутренних алгоритмов Windows (Nagle algorithm).
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSMQParameters
Найдите параметр (или создайте новый типа DWORD, если не нашли) TCPNoDelay
Измените значение найденного параметра на 1
//Уменьшение ping с 200-300ms до 50-60ms, но повторюсь теряете скорость на торрент, download и им подобные, так как на каждый свой пакет ждем подтверждения.
Попробовать можно, сделав сначала команду
cmd>netsh int tcp show global
чтоб не записывать, делаете скрин экрана, далее выполняете команду
cmd>netsh int tcp set global rss=enabled autotuninglevel=normal
проверяем работу, если что-то не устраивает, то делаем ход обратно например
cmd>netsh int tcp set global rss=disable autotuninglevel=disable
Еще раз повторюсь про Receive Window Auto-Tuning Level. На пальцах выглядит так:
Представьте себе поезд который сформирован на станции «А» и который пойдет до станции «B», чтоб достичь конечного пункта ему нужно время, и перед отправкой делаем запрос на станцию «В» сколько она сможет принять вагонов (естественно если из например 50 она сможет принять 30, то 20 будут потеряны и их эти 20 придется повторять заново) . Есть варианта например 2:
1- состав из 10 вагонов идет 1час. до станции «В» и 1час. идет подтверждение от станции «В» до станции «А»
2- состав из 50 вагонов идет 1час. до станции «В» и 1час. идет подтверждение от станции «В» до станции «А»
есть только одно условие, последний вагон должен уйти со станции «А» в то время пока первый не дошел до станции «В».
Следующий состав по данному маршруту будет сформирован после прихода подтверждения со станции «В» на станцию «А»
Если в момент движения вагонов произойдет проблема в «вагоне», то нет смысла гнать состав заново, достаточно повторить только проблемный «вагон» выигрыш на лицо.
Пропускная способность дороги в варианте 1 очень низка.
Windows 7, Vista, 2008, R2 2008Tweaks
Tweaking Windows 7 / Vista TCP/IP settings for broadband internet connections
2008.04.24 10:40 by Philip
Keywords: patch, Nagle, QoS, SynAttackProtect, DNS, DefaultTTL, NetDMA, TCP 1323 Options, MTU, auto-tunning, Compound TCP, Chimney Offload, CTCP, TCP Window, Registry, TCP/IP, tweak, Vista, Windows 7
Windows Vista introduces a number of new features to the TCP/IP stack, including CTCP, and TCP Window Auto-Tuning. This new implementation works much better by default than previous Windows versions with broadband internet connections, and is able to adjust the RWIN value on the fly, depending on the BDP (bandwidth-delay product). This, however, introduces some problems with older routers and restricts the user from tweaking some of the TCP/IP parameters. Still, there is always some room for improvement, and this article explains the known tweakable TCP/IP parameters.
To enter some of the commands below, you will need to run «elevated» command prompt. To do so, click the Start icon > Run > type: cmd , then click CTRL+SHIFT+ENTER. Alternatively, you can navigate to Start > All Programs > Accessories > right-click Command Prompt and choose «Run as Administrator».
Check the TCP/IP state
To check the current status of the Vista TCP/IP tweakable parameters, in elevated command prompt type the following command:
netsh int tcp show global
You will be presented with something like the following:
The settings, as well as their default and recommended state are explained below. The two most important tweakable parameters are «Auto-Tuning Level» and «Congestion Control Provider».
When checking the TCP state with the «netsh int tcp show global» command, it is also possible to see the following message below all those parameters:
** The above autotuninglevel setting is the result of Windows Scaling heuristics overriding any local/policy configuration on at least one profile.
It is displayed when the «Receive Window Auto-Tuning Level» is not explicitly set, or if the system deemed it necessary to make a change because of user prompted «repairing» of your network connection, for example.
Disable Windows Scaling heuristics
Windows Vista/7 has the ability to automatically change its own TCP Window auto-tuning behavior to a more conservative state regardless of any user settings. It is possible for Windows to override the autotuninlevel even after an user sets their custom TCP auto-tuning level. When that behavior occurs, the «netsh int tcp show global» command displays the following message:
** The above autotuninglevel setting is the result of Windows Scaling heuristics
overriding any local/policy configuration on at least one profile.
To prevent that behavior and enforce any user-set TCP Window auto-tunning level, you should execute the following command:
netsh int tcp set heuristics disabled
possible settings are: disabled,enabled,default (sets to the Windows default state)
recommended: disabled (to retain user-set auto-tuning level)
Note this should be executed in elevated command prompt (with admin priviledges) before setting the autotuninlevel in next section. If the command is accepted by the OS you will see an «Ok.» on a new line.
The corresponding Registry value (not necessary to edit if setting via netsh) is located in:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesTcpipParameters
EnableWsd=0 (default: 1, recommended: 0)
TCP Auto-Tuning
To turn off the default RWIN auto tuning behavior, (in elevated command prompt) type:
netsh int tcp set global autotuninglevel=disabled
The default auto-tuning level is «normal», and the possible settings for the above command are:
disabled: uses a fixed value for the tcp receive window. Limits it to 64KB (limited at 65535).
highlyrestricted: allows the receive window to grow beyond its default value, very conservatively
restricted: somewhat restricted growth of the tcp receive window beyond its default value
normal: default value, allows the receive window to grow to accommodate most conditions
experimental: allows the receive window to grow to accommodate extreme scenarios (not recommended, it can degrade performance in common scenarios, only intended for research purposes. It enables RWIN values of over 16 MB)
Our recommendation: normal (unless you’re experiencing problems).
If you’re experiencing problems with your NAT router or SPI firewall, try the «restricted», «highlyrestricted», or even «disabled» state.
Notes:
— Reportedly, some older residential NAT routers with a SPI firewall may have problems with enabled tcp auto-tuning in it’s «normal» state, resulting in slow speeds, packet loss, reduced network performance in general.
— auto-tuning also causes problems with really old routers that do not support TCP Windows scaling. See MSKB 935400
— netsh set commands take effect immediately after executing, there is no need to reboot.
— sometimes when using «normal» mode and long lasting connections (p2p software / torrents), tcp windows can get very large and consume too much resources, if you’re experiencing problems try a more conservative (restricted) setting.
If you’re experiencing problems with Auto-Tuning, see also:
MSKB 835400 — email issues
MSKB 934430 — network connectivity behind firewall problems
MSKB 940646 — 3G WWAN throughput issues
MSKB 929868 — web browsing issues
MSKB 932170 — slow network file transfer
Compound TCP — Improve throughput
Add-On Congestion Control Provider
The traditional slow-start and congestion avoidance algorithms in TCP help avoid network congestion by gradually increasing the TCP window at the beginning of transfers until the TCP Receive Window boundary is reached, or packet loss occurs. For broadband internet connections that combine high TCP Window with higher latency (high BDP), these algorithms do not increase the TCP windows fast enough to fully utilize the bandwidth of the connection.
Compound TCP (CTCP) is a newer method, available in Vista and Server 2008 (there is also a hotfix available for XP x64 and 2003 Server — MSKB 949316). CTCP increases the TCP send window more aggressively for broadband connections (with large RWIN and BDP). CTCP attempts to maximize throughput by monitoring delay variations and packet loss. It also ensures that its behavior does not impact other TCP connections negatively.
By default, Vista and Windows 7 have CTCP turned off, it is only on by default under Server 2008. Turning this option on can significantly increase throughput and packet loss recovery.
To enable CTCP, in elevated command prompt type:
netsh int tcp set global congestionprovider=ctcp
To disable CTCP:
netsh int tcp set global congestionprovider=none
Possible options are: ctcp, none, default (restores the system default value).
Recommended setting: ctcp
It is better to use this newer generation CTCP congestion control algorithm for most broadband connections, we highly recommend it being turned on.
ECN Capability
ECN (Explicit Congestion Notification, RFC 3168) is a mechanism that provides routers with an alternate method of communicating network congestion. It is aimed to decrease retransmissions. In essence, ECN assumes that the cause of any packet loss is router congestion. It allows routers experiencing congestion to mark packets and allow clients to automatically lower their transfer rate to prevent further packet loss. Traditionally, TCP/IP networks signal congestion by dropping packets. When ECN is successfully negotiated, an ECN-aware router may set a bit in the IP header (in the DiffServ field) instead of dropping a packet in order to signal congestion. The receiver echoes the congestion indication to the sender, which must react as though a packet drop were detected.
ECN is disabled by default in Vista and other modern TCP/IP implementations, as it is possible that it may cause problems with some outdated routers that drop packets with the ECN bit set, rather than ignoring the bit. To check whether your router supports ECN, you can use the Microsoft Internet Connectivity Evaluation Tool. The results will be displayed under «Traffic Congestion Test».
To change ECN, in elevated command prompt type:
netsh int tcp set global ecncapability=default
Possible settings are: enabled, disabled, default (restores the state to the system default).
The default state is: disabled
Recommendation: enabled (only for short-lived, interactive connections and HTTP requests with routers that support it, in the presense of congestion/packet loss), disabled otherwise (for pure bulk throughput with large TCP Window, no regular congestion/packet loss, or outdated routers without ECN support).
Notes: ECN is only effective in combination with AQM (Active Queue Management) router policy. It has more noticeable effect on performance with interactive connections and HTTP requests, in the presense of router congestion/packet loss. Its effect on bulk throughput with large TCP Window are less clear.
Currently, we do not recommend enabling this setting, as reportedly it has negative impact on throughput with some residential US ISPs. EA multiplayer games that require a profile logon do not support ECN as well (you will not be able to logon).
More information on ECN: Explicit Congestion Notification (ECN) for TCP/IP
RSS — Receive-side Scaling
The receive-side scaling setting enables parallelized processing of received packets on multiple processors, while avoiding packet reordering. It avoids packet reordering y separating packets into «flows», and using a single processor for processing all the packets for a given flow. Packets are separated into flows by computing a hash value based on specific fields in each packet, and the resulting hash values are used to select a processor for processing the flow. This approach ensures that all packets belonging to a given TCP connection will be queued to the same processor, in the same order that they were received by the network adapter.
To set RSS:
netsh int tcp set global rss=enabled
Possible rss settings are: disabled, enabled, default (restores rss state to the system default).
Default state is: enabled
Recommended: enabled (if you have 2 or more processor cores and a NIC that can handle RSS)
TCP Chimney Offload
TCP chimney offload enables Windows to offload all TCP processing for a connection to a network adapter. Offloads are initiated on a per-connection basis. Compared to task offload, TCP chimney offload further reduces networking-related CPU overhead, enabling better overall system performance by freeing up CPU time for other tasks.
To set TCP Chimney Offload:
netsh int tcp set global chimney=enabled
Default state: disabled (under Vista), automatic (under Windows 7 and 2008 Server)
Recommended: enabled
The possible states are disabled, enabled, default (Vista), automatic (only Windows 7 and 2008 Server) as follows:
automatic — This default setting is only available under Windows 7 and 2008 Server, it is not available udner Vista. It offloads if the connection is 10 GbE, has a RTT < 20ms, and the connection has exchanged at least 130KB of data. The device driver must also have TCP Chimney enabled.
default — this setting restores chimney offload to the system default. Setting this «default» state under Windows 7 and 2008 Server is possible, but it sets the system to the «automatic» mode described above.
disabled — this setting is maually configured as disabled.
enabled — this setting is manually configured as enabled.
Notes:
Under Windows 7 and Server 2008 the «default» and the additional «automatic» parameter set the system to the same «automatic» state.
For Chimney Offload to work, it needs to be enabled in both the OS and NIC. To enable the «TCP Offloading» setting in your NIC, navigate to the Device Manager, under Network Adapters, in the Advanced tab, and check «Enabled» in the box next to the TCP offload entry.
Direct Cache Access (DCA)
Windows 7 and 2008 Server (but not Vista) add NETDMA 2.0 Direct cache access support. Direct Cache Access (DCA) allows a capable I/O device, such as a network controller, to deliver data directly into a CPU cache. The objective of DCA is to reduce memory latency and the memory bandwidth requirement in high bandwidth (Gigabit) environments. DCA requires support from the I/O device, system chipset, and CPUs.
To enable DCA:
netsh int tcp set global dca=enabled
Available states are: enabled, disabled.
Default state: disabled
Recommended: enabled (provided the CPU/Chipset/NIC support it)
It is also possible to enable this setting by editing the Windows Registry instead of using netsh as follows:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
EnableDCA=1 (DWORD, entry does not exist by default. Set to 1 to enable, 0 to disable)
Setting MTU
It is sometimes useful to view and set the MTU value for a specific network interface manually. To view a list of active network interfaces and their MTU values in Vista using netsh, open command prompt as administrator and execute the following command:
netsh interface ipv4 show subinterface
You will be presented with a list of interfaces, and their respective MTU values as follows:
To change the MTU value of a specific network card, type the following in command prompt:
netsh interface ipv4 set subinterface «network interface name» mtu=#### store=persistent
Where «network interface name» is your specific network adapter name as obtained above (or viewable under Network adapters), and mtu=#### is the desired MTU value.
For example, if the name of your network card is «Wireless Network Connection» and you’d like to set its MTU to 1500, you’d have to type:
netsh interface ipv4 set subinterface «Wireless Network Connection» mtu=1500 store=persistent
Note: The maximum MTU value is usually 1500, and up to 1492 for PPPoE connections.
Manually tuning Registry Parameters
Many of the registry keys tuning TCP/IP parameters from previous Windows versions no longer work in Vista and Server 2008. Below is a list of the few we’ve confirmed to still work. Note that for changes to these settings to take effect the computer needs to be rebooted. As always, a registry backup is recommended if making any changes, and some proficiency in using regedit is required.
In regedit (Start icon > Run > type: regedit while logged in as administrator), you can navigate and edit the following keys.
MTU (Maximum Transmission Unit) — the maximum packet size.
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersInterfaces{…}
MTU=1500 (DWORD, entry does not exist by default)
The {….} part of the above path is the unique identifier of your network adapter. You can recognize the correct adapter by looking at it’s IP address, if obtaining IP automatically labeled by: DhcpIPAddress=192.168.x.x text value, for example.
We recommend leaving this at default, unless you want to lower it. Vista uses the largest possible packet size for the underlying network by default.
Note: In some test environments, the correct MTU entry may be offset by 8. The 8 offset seems to coincide with the size of the PPPoE overhead. Check the result with the TCP Analyzer.
TCP 1323 Options
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
Tcp1323Opts=1 (DWORD, entry created automatically by Windows when you run the «netsh int tcp set global autotuninglvl=…» command, set to 0 by default).
Setting this seems to have no effect, since auto-tuning uses the TCP 1323 scale factor and changes it on the fly, disregarding this setting. Additional testing may be required to determine it’s effect if auto-tuning is turned off. Setting it to 1 is best for broadband connections.
NetDMA (TCPA)
NetDMA enables support for advanced direct memory access. In essence, it provides the ability to more efficiently move network data by minimizing CPU usage. NetDMA frees the CPU from handling memory data transfers between network card data buffers and application buffers by using a DMA engine.
Under Windows 7, NetDMA can be set directly using the netsh interface (not available under Vista):
netsh int tcp set global netdma=enabled
Under Vista/2008/7, you can set NetDMA/TCPA using the following Registry parameter:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
EnableTCPA=1 (DWORD, not in registry by default. Set to 1 to enable, 0 to disable NetDMA)
Recommended setting is 1 (if not using Chimney Offload), zero otherwise. A new DWORD value may need to be created if not already present in the registry.
For NetDMA to work, it must be enabled in BIOS, your CPU must support Intel I/O Acceleration Technology (I/OAT), and it does not work together with Chimney Offload. More info available -here-
Checksum Offloading (DisableTaskOffload)
This NDIS 5 setting allows for reducing CPU load by offloading some tasks required to maintain the TCP/IP stack to the network card. Theoretically, Widnows should automatically detect capable network hardware.
The tasks offloaded are as follows:
— TCP/IP checksum calculation — each packet sent includes a verification checksum.
— TCP/IP segmentation — also known as «TCP Large Send» where Windows sends a large amount of data to the network card, and the NIC is then responsible for dividing it according to the network MTU. Experimental feature, not enabled by default
— IPSec Encryption cyphers and message digests — provides encryption of packets at the hardware level.
To change the checksum offloading setting in the Windows Registry:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
DisableTaskOffload=0 (DWORD value, default: not set, recommended: 0=enable offload, 1=disable offload)
Also see: MS KB 888750, MS KB 904946, MS KB 936702
DefaultTTL
TTL can be safely left alone in many cases. It is a limit to the time and number of hops/routers a packet will travel before being discarded. A number that’s too small risks packets being discarded before reaching their destination. A number that’s too large (over 128) will cause delay in when lost IP packets are discarded.
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
DefaultTTL=64 (DWORD, set to a decimal value between 32 and 128. Recommended: 64)
TcpMaxDataRetransmissions
Determines how many times unacknowledged data (non-connect segment) is retransmitted before TCP aborts the connection. The retransmission timeout is doubled with each successive retransmission on a connection. It is reset when responses resume.
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
TCPMaxDataRetransmissions=7 (DWORD, recommended: between 3 and 10, not present in registry by default)
Note: When not present in the registry, the default behavior is 255 retransmissions (5 in documentation).
SynAttackProtect
This undocumented setting provides protection against SYN denial of service (DoS) attacks. When enabled, connections timeout sooner if SYN attack is detected. When set at 1, TCPMaxDataRetransmissions can be lowered further.
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
SynAttackProtect=1 (DWORD, recommended: 1, not present in registry by default)
Network Throttling Index
By default, Windows Vista/7 implements a network throttling mechanism to restrict the processing of non-multimedia network traffic to 10 packets per millisecond (a bit over 100 Mbits/second). The idea behind such throttling is that processing of network packets can be a resource-intensive task, and it may need to be throttled to give prioritized CPU access to multimedia programs. In some cases, such as Gigabit networks and some online games, for example, it may be benefitial to turn off such throttling all together.
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionMultimediaSystemProfile
NetworkThrottlingIndex=ffffffff (DWORD, default: 10 hex, recommended: 10 hex for media sharing, ffffffff for gaming and max throughput, valid range: 1 through 70 decimal or ffffffff to completely disable throttling)
It is only recommended to change this setting in saturated Gigabit LAN environments, where you do not want to give priority to multimedia playback. Reportedly, disabling throttling by using ffffffff can also help reduce ping spikes in some online games.
Notes: Setting is available in Windows 7, Vista (SP1), 2008 Server. Default value is 10 under Windows 7, similar behavior if the setting is not present in the Registry.
Games that may be affected by this throttling: Source Engine games (TF2, Left 4 Dead, CS:S), HoN, CoD, Overlord series.
Reference: MSKB 948066
Set DNS and Hosts Priority
As with previous versions of Windows, one can improve DNS and hostname resolution by increasing the priority of of related services, while keeping their order. This is explained in more defail in our Host Resolution article. Lower numbers mean higher process priority. The corresponding registry settings in Vista are as follows:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipServiceProvider
LocalPriority=4 (DWORD, recommended: 4, default: 499) — local names cache
HostsPriority=5 (DWORD, recommended: 5, default: 500) — the HOSTS file
DnsPriority=6 (DWORD, recommended: 6, default: 2000) — DNS
NetbtPriority=7 (DWORD, recommended: 7, default: 2001) — NetBT name resolution, including WINS
TcpTimedWaitDelay (port allocation)
Short lived (ephemeral) TCP/IP ports above 1024 are allocated as needed by the OS. The default Vista values have improved from previous Windows versions, and are usually sufficient under normal load. However, in some instances under heavy load it it may be necessary to adjust the settings below to tweak the availability of user ports requested by an application.
If the default limits are exceeded under heavy loads, the following error may be observed: «address in use: connect exception». By default under Vista (when the values are not presend in the registry), the OS can allocate up to 16384 ephemeral ports above port 1024, and the OS waits for 120 seconds before reclaiming ports after an application closes the TCP connection. This is a considerable improvement over older Windows versions. However, if necessary, the following registry values can be added/edited:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
MaxUserPort=65534 (DWORD, not in the registry by default. Recommended: leave at default, or use a number above 16384 up to 65534 decimal as necessary) — maximum number of ports to use. 1024 is automatically subtracted from entered value to allow for reserved ports under 1024.
TcpTimedWaitDelay=30 (DWORD, not present or 0xffffffff in registry by default. Recommended: 30 decimal, denoting 30 seconds) — time to wait before reclaiming ports, in seconds. Default time before reclaiming ports, if value is at 0xffffffff or not present in the registry is 120 seconds. Just reducing the delay is often sufficient without changing MaxUserPort, as it allows for reusing ports more efficiently.
Ephemeral ports can be checked and changed using netsh as well.
To query the current values, in command prompt, type:
netsh int ipv4 show dynamicportrange tcp (for UDP, use the same command, replacing only «tcp» with «udp» at the end)
To set both the starting, and max user port using netsh, in elevated command prompt run:
netsh int ipv4 set dynamicportrange protocol=tcp start=1025 num=64511 (start=NNN denoting the starting port, and num=NNN denoting the number of ports)
Notes:
By default, dynamic ports are allocated between ports 49152 and 65535 (for a total of 16384 ephemeral ports).
Using netsh allows to set both the starting port and port range. Editing the Registry allows for setting the port range, and the starting port is fixed at 1025. Deleting the MaxUserPort registry entry (or setting it to a value outside the allowed range) causes the OS to revert to using the default values.
Some system processes can install port filters to block certain port ranges. If ephemeral ports run into these filtered port ranges, TCP/IP applications will be unable to bind to any ports.
See also: TechNet article, MSKB 328476, MSKB 319502
QoS Reserved Bandwidth
As with Windows XP, nework adapters have a «QoS Packet Scheduler» enabled by default, which reserves 20% of bandwidth by default for QoS applications that request priority traffic. Note this only has effect in the presence of running QoS applications that request priority traffic. Registry value is undocumented for the Vista version of Windows. To customize this setting, in the Windows Registry:
HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsPsched
NonBestEffortLimit=0 (DWORD, not present in the registry by default. Recommended: 0 , possible values between 0 and 100) — indicates the percentage value of reserved bandwidth for QoS applications. Set to 0 to disable.
Notes: This tweak applies only to Windows versions that have Qos Packet Scheduler enabled. It will ONLY have effect in the presense of running QoS applications.
Network Memory Allocation (Event ID 2017 error)
When using Windows Vista/7 to serve many/large files over the local network, it is possible to sometimes run into memory allocation errors related to the Windows share. This can happen with Linux, Mac, or Windows XP clients. When this happens, you can usually see the following error in the Event Viewer System log:
Source: srv
Event ID: 2017
Level: Error
The server was unable to allocate from the system nonpaged pool because the server reached the configured limit for nonpaged pool allocations.
It is also possible to get an error indicating that: «Not enough server storage is available to process this command». To avoid those errors, you need to change the way Windows allocates memory for network services and file sharing. The below settings optimze the machine as a file server so it would allocate resources accordingly. There are two related registry settings:
HKLMSYSTEMCurrentControlSetControlSession ManagerMemory Management
LargeSystemCache=1 (DWORD, default value: 0, recommended value: 1)
A value of zero above establishes a cache of ~8 MB, a value of 1 allows the cache to expand to physical memory minus 4 MB, if needed.
HKLMSYSTEMCurrentControlSetServicesLanmanServerParameters
Size=3 (DWORD, default value: 1, recommended value: 3)
Size=1 minimizes used memory
Size=2 balance used memory
Size=3 optimal setting for file sharing and network applications
Note: Even though this tweak is from older Windows server OSes, it works on workstation versions, as well as Windows Vista and 7 (32 and 64 bit).
Gaming Tweak — Disable Nagle’s algorithm
The tweak below allows for tweaking or disabling Nagle’s alogrithm. Disabling «nagling» allows for very small packets to be transferred immediately without delay. Note that disabling Nagle’s algorithm is only recommended for some games, and it may have negative impact on file transfers/throughput. The dafault state (Nagling enabled) improves performance by allowing several small packets to be combined together into a single, larger packet for more efficient transmission. While this improves overall performance and reduces TCP/IP overhead, it may briefly delay transmission of smaller packets. Keep in mind that disabling Nagle’s algorithm may have some negative effect on file transfers, and can only help reduce delay in some games. To implement this tweak, in the registry editor (Start>Run>regedit) find:
This setting configures the maximum number of outstanding ACKs in Windows XP/2003/Vista/2008:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersInterfaces{NIC-id}
There will be multiple NIC interfaces listed there, for example: {1660430C-B14A-4AC2-8F83-B653E83E8297}. Find the correct one with your IP address listed. Under this {NIC-id} key, create a new DWORD value:
TcpAckFrequency=1 (DWORD value, 1=disable, 2=default, 2-n=send ACKs if outstanding ACKs before timed interval. Setting not present by default).
For gaming performance, recommended is 1 (disable). For pure throughput and data streaming, you can experiment with values over 2. If you try larger values, just make sure TcpAckFrequency*MTU is less than RWIN, since the sender may stop sending data if RWIN fills witout acknowledgement.
Also, find the following key (if present):
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSMQParameters
Add a new DWORD value:
TCPNoDelay=1 (DWORD value, 0 to enable Nagle’s algorithm, 1 to disable, not present by default)
To configure the ACK interval timeout (only has effect if nagling is enabled), find the following key:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersInterfaces{NIC-id}
TcpDelAckTicks=0 (DWORD value, default=2, 0=disable nagling, 1-6=100-600 ms). Note you can also set this to 1 to reduce the nagle effect from the default of 200ms without disabling it.
Notes:
Reportedly, the above gaming tweak (disabling nagle’s algorithm) can reduce WoW (World of Warcraft) latency by almost half!
XP/2003 needs hotfix or SP2 for it to work (MS KB 815230)
Vista needs hotfix or SP1 for it to work (MS KB 935458)
See also: NetworkThrottlingIndex setting above
SG TCP Optimizer (version 3.x)
The TCP Optimizer version 3.x allows for easy application of the above settings under all current Windows versions. This free software provides an intuitive interface for tunning your internet connection, backing up/restoring to the Windows defaults, etc. There is no installation required, you can just save it to the desktop, right-click > run as administrator and choose your settings. More detailed information about all available options is provided in the online documentation, answers to frequently asked questions are available in the Optimizer FAQ, and personalized help is available through our broadband tweaking forum.
SG TCP Optimizer download
For user convenience, we also provide a quick way to apply all optimal values as recommended above using our SG Vista TCP/IP Patch. It allows for tweaking all the above netsh settings and registry values in one simple step (with the exception of the «gaming tweak» section). The patch also provides for easily reverting the settings to their Windows default values. To apply, save to your desktop and run as administrator (right-click -> run as administrator). Click Y when prompted to apply settings.
Note: If for some reason Windows renames the file and adds .txt extension to it, you may have to manually rename it back to have a .cmd (or .bat) extension before running it as administrator.
See Also
Windows Vista tcpip.sys connection limit patch for Event ID 4226 — removing the limit on half-open TCP connections.
References
Windows Server 2008 Network Shell (Netsh) Technical Reference
Microsoft KB951037
RFC 2581
Wikipedia: Nagle’s algorithm
Technet: TCPNoDelay
Technet: LargeSystemCache
MS KB 311833
MS KB 328890
MS KB 321098
MS KB 321169
MS KB 951037 — TCP Chimney Offload, Receive Side Scaling, and Network DMA in Windows Server 2008
Windows Server 2012 is the first Windows Server version to enable Explicit Congestion Notification, or ECN, in the TCP stack. This is also known as ECN Capability. Explicit Congestion Notification is an extension to the Internet Protocol and to the Transmission Control Protocol and is defined in RFC 3168. ECN allows end-to-end notification of network congestion without dropping packets.
ECN is an optional feature that may be used between two ECN-enabled endpoints when the underlying network infrastructure also supports it.
Outdated network equipment dropping packets that have ECN bits set
Unfortunately, rather than responding properly or ignoring the bits, some outdated or faulty network equipment drop packets that have ECN bits set. This slows down your outbound connections, because packets need to be retransmitted without ECN bits. As retransmission intervals increase, it may take up to 10 seconds before a connection is made.
Until most network equipment supports ECN bits in packets, my advise is to disable ECN on Windows Server 2012 (R2) server. This is easily done with netsh
:
Disable Windows Server Explicit Congestion Notification (ECN) capabilities
You may choose to disable Explicit Congestion Notification support on Windows Server 2012 if you experience slow outbound connections. Connections with up to a 10 second delay.
Here is how to disable ECN Capability using netsh
. A reboot is not required.
First verify ECN Capability is enabled. Look for “Enabled” in the command output from
Code language: PowerShell (powershell)
netsh interface tcp show global
If ECN Capability is enabled, you can disable it:
Code language: PowerShell (powershell)
netsh interface tcp set global ecncapability=disabled
A reboot is not required.
Enjoy your fast(er) outbound connections from now on!
A note on Windows TCP AutoTuningLevel: Like all modern operating systems Windows has receive window auto-tuning to dynamically adjust the receive buffer size to the throughput and latency of the link. Disabling this feature will definitely limit your Internet speeds. Auto-tuning is consistent throughout all variants of TCP and present in all modern operating systems. Read An Update on Windows TCP AutoTuningLevel (Wayback Machine archived link) for more information.
Reset TCP parameters and re-enable ECN
You can use the following netsh
command to reset all TCP parameters to their default values:
Code language: PowerShell (powershell)
netsh interface tcp reset
Or if you just wish to re-enable ECN:
Code language: PowerShell (powershell)
netsh interface tcp set global ecncapability=enabled
I like tinkering with my operating systems. I change many settings from their defaults, and sometimes the settings improve things, while other times it may break something. After I recently began exploring Windows 7, I began tinkering with some connection settings to see what they do.
Unfortunately, I had changed several settings and then realized that my broadband Internet had slowed down to a crawl. My highspeed became dialup speed. In order to solve the problem I began to undo some of the changes until I found the culprit. I eventually found the problem, which I explain in this post.
The Need for Speed
While the networking settings for Windows 7 are good on their default settings, there are many that try to get every once of speed out of the connection. I am one of them. Many times changing a setting may increase the speed, marginally, while other times it would make it worse. I learn best when something breaks – such as I learn not to do it again.
I recently began changing some of the TCP settings within Windows 7, and brought my highspeed Internet down to dialup speed. It took forever for pages to be displayed in my web browser.
In order to fix the problem, I began to slowly reverse the settings I had change – luckily I had remembered what I changed. When I reset one setting back to the default value, I then tested my Internet to see the impact. It wasn’t until I changed the “ECN Capability” setting that my connection speed returned to normal.
Like everything else, I decided to look up the setting to see what it acually does.
ECN Capability
Explicit Congestion Notification, or ECN for short, provides routers with an alternate method of communicating network congestion. ECN assumes that router congestion is the cause of any packet loss, so it attempts to decrease the number of retransmissions.
This capability allows routers to mark packets, and allows clients to reduce their transfer rate to reduce any more packet loss. ECN-aware routers may set a bit in the IP-header, instead of dropping a packet, that signals network congestion. The sender must then react as if a packet had been dropped, once the congestion has been echoed by the receiver.
By default, ECN capability is disabled for both Windows Vista and Windows 7. The reason for this is because many outdated routers may drop the packets with the ECN bit set, instead of ignoring the bit.
Note:
If you are unsure if your router supports ECN capability, you can use Microsoft’s Internet Connectivity Evaluation Tool to find out.
In my case, in order to find out the problem with my Internet speed, I ran a tool that mapped out my connection on the Internet, and I noticed that each time I tried to download a web page, I would have unusually high packet loss. This was probably because my router dropped packets that had the ECN bit set.
Setting ECN Capability
In order to solve the problem, I reset the “ECN Capability” setting back to default using the following steps:
- I clicked the Windows button and then entered “cmd.exe” in the search bar. I pressed CTRL+Shift and ENTER to open the command prompt window..
Note:
I use CTRL+Shift to open the command prompt with administrator access so I can change the TCP settings.
- I typed the following to view my settings:
netsh int tcp show global
- I then entered the following command to disable “ECN Capability”:
netsh int tcp set global ecncapability=disabled
- I retyped the following to ensure “ECN Capbility” was disabled:
netsh int tcp show global
- I then closed the command prompt.
After changing the setting, I noticed that the speed of my Internet connection was back to normal, without any problems. I will, of course, continue to change settings now and then, as that is the best way I learn.
Follow Me
?
Log in
If this type of authorization does not work for you, convert your account using the link
-
-
May 19 2014, 11:57
- Компьютеры
- Cancel
Параметр Recieve Window Auto-Tuning Level
Этот параметр определяет, будет ли использоваться новейшая технология — эвристическое авто-определение размера окна TCP. Для увеличения скорости локальной сети лучше эту возможность отключить.
Через командную строку: netsh int ip set heuristics disabled
Возможные значения — default, enable, disable.
Параметр TCP Auto-Tuning
Определяет включена ли автонастройка размера приемного окна TCP. Для увеличения скорости локальной сети лучше эту возможность отключить.
Через командную строку: netsh int ip set global autotuninglevel disabled
Возможные значения:
disabled: используется фиксированное значение размера приемного окна TCP — 64KB.
higlyrestricted: позволяет размеру приемного окна выходить за пределы значения по умолчанию, очень ограниченно превышая его.
restricted: допускает более существенный рост размера окна относительно значения по умолчанию.
normal: значение по умолчанию. Позволяет менять размер окна в зависимости от различных условий работы.
experimental: позволяет увеличивать размер окна до очень больших. Применять очень осторожно, поскольку может замедлять работу всей системы.
Параметр Add-On Congestion Control Provider
Определяет применение новых алгоритмов изменения размеров окна TCP с учетом наступающих потерь пакетов и контроля задержек приема-передачи. Может существенно увеличить пропускную способность сети.
Через командную строку: netsh int ip set global congestionprovider ctcp
Возможные значения: ctcp, none.
Рекомендуемое значение: ctcp
Параметр ECN Capability
ECN — это альтернативный механизм взаимодействия маршрутизаторов для передачи информации о заторах в сети. Он предназначен для уменьшения ретрансляции пакетов. Это позволяет маршрутизаторам и клиентам, в случае определения потерь пакетов, автоматически снижать скорость передачи данных для предотвращения дальнейших потерь данных. Т.е. это более актуально для интернета, но не для локальной сети. Лучше этот параметр выключить.
Значение по умолчанию — enabled.
Командная строка: netsh int ip set global ecncapability disabled
Возможные значения: enabled, disabled.
Параметр RSS
Позволяет использовать несколько процессоров для обработки полученных пакетов (где сетевой адаптер распределяет нагрузку на доступные процессоры). Лучше его включить.
Командная строка: netsh int ip set global rss enabled
Возможные значения: enabled, disabled.
Параметр TCP Chimney Offload
TCP Chimney Offload позволяет переложить всю обработку подключений TCP на сетевой адаптер, что позволяет улучшить общую производительность системы за счет высвобождения процессора для выполнения других задач.
Командная строка: netsh int ip set global chimney enabled
Значение по умолчанию: disabled (Vista), automatic (Windows 7, 2008 Server)
Рекомендуется: enabled (Vista), automatic (Windows 7, 2008 Server)
Возможные значения: disabled, enabled, automatic (только Windows 7 и 2008 Server):