Rate limit windows server

Ограничиваем пропускную способность IIS на сервере SCCM с ролью SUP (WSUS).

В процессе централизованной раздачи клиентам System Center 2012 R2 Configuration Manager (SCCM) очередной порции обновлений с сервера с ролью Software Update Point (SUP)столкнулись с ситуацией пиковой загрузки на канале передачи данных — участка с низкой пропускной способностью на канале между структурными подразделениями и площадкой, на которой был расположен сервер SCCM. По графику отдачи трафика на сервере SCCM было хорошо видно, что исходящий трафик “упёрся” в границу того самого “узкого места на канале. Разумеется таких ситуаций чаще всего можно избежать заранее настраивая приоритизацию трафика на разных уровнях, начиная с сетевого оборудования. Но что делать, если по какой-то причине проблема возникла прямо здесь и прямо сейчас, а доступа к сетевому оборудованию нет. То есть фактически нужно как-то оперативно “задушить” трафик отдачи обновлений Windows Update на определённый момент времени средствами Windows. Простое и эффективное решение подсказал автор заметки Ограничиваем аппетиты WSUS-а .

В качестве решения предлагается ограничение общей пропускной способности (в байтах) веб-сервера IIS. За это отвечает параметр maxGlobalBandwidth в разделе конфигурации IIS — system.applicationHost/webLimits .

Чтобы запросить текущие значения параметров в указанном разделе конфигурации IIS с помощью утилиты командной строки appcmd.exe выполним:

В полученном ответе мы увидим, что значение по умолчанию для интересующего нас параметра параметра – 4294967295:

Предположим, нам нужно уменьшить полосу пропускания трафика IIS до 20 Mbit/s. Рассчитаем необходимое значение параметра в байтах: (20 * 1024 * 1024)/8 = 2 621 440 байт.

Выполним команду установки рассчитанного значения:

В ответ получим сообщение об успешном применении параметра конфигурации:

Туже самую настройку можно выполнить и через консоль IIS Manager, перейдя на уровне веб-сервера в раздел Management > Configuration Editor

В поле Section из выпадающего дерева элементов конфигурации выберем system.applicationHost/webLimits , зададим значение интересующего нас параметра maxGlobalBandwidth и нажмём в правом меню действий Apply, чтобы изменения вступили в силу.

Результат сможем наблюдать сразу же. В нашем случае с настройками IIS по умолчанию отдача трафика клиентам была на пределе возможностей “узкого места” в сети, что вызывало ряд вытекающих проблем для пользователей находящихся в “задушенном” сегменте сети.

Сразу после применения рассчитанного нами параметра ситуация изменилась на глазах…

Таким образом критическая ситуация загрузки канала была ликвидирована.

У такого подхода к ограничению трафика в отличии от классического использования QoS есть преимущество в том, что в случае необходимости изменения пропускной способности по какому-то заданному расписанию, можно прибегнуть к помощи планировщика заданий Windows, запуская из него в нужное время вышеприведённую команду настройки IIS.

Frame rate is limited to 30 FPS in Windows 8 and Windows Server 2012 remote sessions

This article describes a workaround for independent software vendors (ISVs) of remote display protocols to change the frame rate limit in a remote session.

Original product version: В Windows 10 — all editions, Windows Server 2012 R2
Original KB number: В 2885213

Workaround

Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.

To work around the issue, create a DWMFRAMEINTERVAL entry in registry subkey HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations to change the maximum frame rate limit on the remote session host. To do this, follow these steps:

Читайте также:  Back up application windows

Start Registry Editor.

Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations

On the Edit menu, click New, and then click DWORD(32-bit) Value.

Type DWMFRAMEINTERVAL, and then press Enter.

Right-click DWMFRAMEINTERVAL, click Modify.

Click Decimal, type 15 in the Value data box, and then click OK. This sets the maximum frame rate to 60 frames per second (FPS).

This registry entry sets the maximum frame rate limit that the remote display protocol can deliver to the remote session client. This setting does not set the actual frame rate for the remote session client. The actual frame rate in the remote session depends on other factors such as application and computer hardware resources. Additionally, not all remote display protocols support a frame rate that is greater than 30 FPS. For example, Remote Desktop Protocol (RDP) limits the frame rate to 30 FPS. Please contact the remote display protocol providers for more information.

Exit Registry Editor, and then restart the computer.

Message rate limits and throttling

Message throttling refers to a group of limits that are set on the number of messages and connections that can be processed by an Exchange server. These limits include message processing rates, SMTP connection rates, and SMTP session timeout values. These limits work together to protect an Exchange server from being overwhelmed by accepting and delivering messages. Although a large backlog of messages and connections may be waiting to be processed, the message throttling limits enable the Exchange server to process the messages and connections in an orderly manner.

Back pressure is another feature that helps to avoid overwhelming the system resources of an Exchange server. Key resources, such as available hard disk space and memory utilization are monitored, and when the utilization level exceeds the specified threshold, the server gradually stops accepting new connections and messages. For more information, see Understanding back pressure. There are also static limits that are available on messages, such as the maximum message size, the size of individual attachments, and the number of recipients. For more information about message size limits, see Message size and recipient limits in Exchange Server.

You can set the message rate limits and throttling options in the following locations:

Mailbox servers and Edge Transport servers. Collectively, we’ll refer to these as transport servers.

Message throttling on transport servers

The following table shows the message throttling options that are available on Mailbox servers and Edge Transport servers.

Rate limit Default value Exchange Management Shell configuration EAC configuration
Maximum concurrent mailbox deliveries: The maximum number of delivery threads that the Transport service and the Mailbox Transport Delivery service can have open at the same time to deliver message to mailboxes. 20
We recommend that you don’t modify this value unless you’re directed to do so by Microsoft Customer Service and Support.
Cmdlet: Set-TransportService and Set-MailboxTransportService
Parameter: MaxConcurrentMailboxDeliveries
Not available
Maximum concurrent mailbox submissions: The maximum number of submission threads that the Transport service and the Mailbox Transport Submission service can have open at the same time to send messages from mailboxes. 20
We recommend that you don’t modify this value unless you’re directed to do so by Microsoft Customer Service and Support.
Cmdlet: Set-TransportService and Set-MailboxTransportService
Parameter: MaxConcurrentMailboxSubmissions
Not available
Maximum connection rate per minute: The maximum rate that connections are allowed to be opened with the Transport service. 1200 Cmdlet: Set-TransportService
Parameter: MaxConnectionRatePerMinute
Not available
Maximum concurrent connections: The maximum number of outbound connections that the Transport service can have open at a time. 1000
This value must be greater than or equal to the MaxPerDomainOutboundConnections value.
Cmdlet: Set-TransportService
Parameter: MaxOutboundConnections
Servers > Servers > Properties > Transport limits section > Maximum concurrent connections.
Note: In the EAC, you can only set the values 100, 1000, 5000, or unlimited.
Maximum concurrent connections per domain: The maximum number of outbound connections that the Transport service can have open to a single domain at a time. 20
This value must be less than or equal to the MaxOutboundConnections value.
Cmdlet: Set-TransportService
Parameter: MaxPerDomainOutboundConnections
Servers > Servers > Properties > Transport limits section > Maximum concurrent connections per domain.
Note: In the EAC, you can only set the values 100, 1000, 5000, or unlimited.

To see the values of these server message throttling settings, run the following command in the Exchange Management Shell:

The Pickup directory and the Replay directory that are available on Edge Transport servers and Mailbox servers also have messages rate limits that you can configure. Typically, the Pickup directory and the Replay directory aren’t used in everyday mail flow. For more information, see Configure the Pickup Directory and the Replay Directory. The maximum number of message files per minute that can be processed by the Pickup directory and the Replay directory is 100. Each directory can independently process message files at this rate.

Message throttling on Send connectors

The following table shows the message throttling options that are available on Send connectors. Send connectors exist in the Transport service on Mailbox servers and on Edge Transport servers. For more information, see Send connectors.

Rate limit Default value Exchange Management Shell configuration EAC configuration
Connection inactivity time out: The maximum amount of time that an open SMTP connection with a source messaging server can remain idle before the connection is closed. 00:10:00 (10 minutes) Cmdlet: New-SendConnector and Set-SendConnector
Parameter: ConnectionInactivityTimeOut
Not available
Maximum messages per connection: The maximum number of messages that can be sent over a single connection 20 Cmdlet: New-SendConnector and Set-SendConnector
Parameter: SmtpMaxMessagesPerConnection
Not available

To see the values of these Send connector throttling settings, run the following command in the Exchange Management Shell:

Message throttling on Receive connectors

The following table shows the message throttling options that are available on Receive connectors. Receive connectors are available in the Front End Transport service on Mailbox servers, the Transport service on Mailbox servers, and on Edge Transport servers. For more information, see Receive connectors.

Rate limit Default value Exchange Management Shell configuration EAC configuration
Connection time out: The maximum amount of time that an SMTP connection with a source messaging server can remain open, even when the source messaging server is transmitting data. 00:10:00 (10 minutes) for Receive connectors on Mailbox servers.
00:05:00 (1 minute) for Receive connectors on Edge Transport servers.
This value must be greater than the ConnectionInactivityTimeOut value.
Cmdlet: New-ReceiveConnector and Set-ReceiveConnector
Parameter: ConnectionTimeout
Not available
Connection inactivity time out: The maximum amount of time that an open SMTP connection with a source messaging server can remain idle before the connection is closed. 00:05:00 (5 minutes) for Receive connectors on Mailbox servers.
00:01:00 (1 minute) for Receive connectors on Edge Transport servers.
This value must be less than the ConnectionTimeout value.
Cmdlet: New-ReceiveConnector and Set-ReceiveConnector
Parameter: ConnectionInactivityTimeOut
Not available
Maximum inbound connections: The maximum number of inbound SMTP connections that are allowed at the same time. 5000 Cmdlet: New-ReceiveConnector and Set-ReceiveConnector
Parameter: MaxInboundConnection
Not available
Maximum inbound connections per source: The maximum number of inbound SMTP connections that are allowed from a source messaging server at the same time. unlimited on the default Receive connector named Default in the Transport service on Mailbox servers.
20 on other Receive connectors on Mailbox servers and Edge Transport servers.
Cmdlet: New-ReceiveConnector and Set-ReceiveConnector
Parameter: MaxInboundConnectionPerSource
Not available
Maximum inbound connection percentage per source: The maximum percentage of inbound SMTP connections that are allowed from a source messaging server at the same time. 100 percent on the default Receive connector named Default in the Transport service on Mailbox servers.
2 percent on other Receive connectors on Mailbox servers and Edge Transport servers.
Cmdlet: New-ReceiveConnector and Set-ReceiveConnector
Parameter: MaxInboundConnectionPercentagePerSource
Not available
Message rate limit: The maximum number of messages per minute that can be sent by a single source. unlimited on the following default Receive connectors:
• Default in the Transport service on Mailbox servers.
• Default Frontend in the Front End Transport service on Mailbox servers.
• Outbound Proxy Frontend in the Front End Transport service on Mailbox servers.
5 on the following default Receive connectors:
• Client Proxy in the Transport service on Mailbox servers.
• Client Frontend in the Front End Transport service on Mailbox servers.
600 on the default Receive connector named Default internal Receive connector on Edge Transport servers.
Cmdlet: New-ReceiveConnector and Set-ReceiveConnector
Parameter: MessageRateLimit
Not available
Message rate source: This indicates how the message submission rate is calculated. Valid values are:
User : The rate is calculated for sending user (based on how user authenticates in the SMTP session).
• IPAddress : The rate is calculated for sending hosts.
• All : The rate is calculated for both sending users and sending hosts.
IPAddress on the following default Receive connectors:
• Default in the Transport service on Mailbox servers.
• Default Frontend in the Front End Transport service on Mailbox servers.
• Outbound Proxy Frontend in the Front End Transport service on Mailbox servers.
• Default internal Receive connector on Edge Transport servers.
User on the following default Receive connectors:
• Client Proxy in the Transport service on Mailbox servers.
• Client Frontend in the Front End Transport service on Mailbox servers.
Cmdlet: New-ReceiveConnector and Set-ReceiveConnector
Parameter: MessageRateSource
Not available
Tarpit interval: The amount of time to artificially delay SMTP responses to unauthenticated remote servers that appear to be abusing the connection. Authenticated connections are never delayed in this manner. 00:00:05 (5 seconds) Cmdlet: New-ReceiveConnector and Set-ReceiveConnector
Parameter: TarpitInterval
Not available

To see the values of these Receive connector message throttling settings, run the following command in the Exchange Management Shell:

Message throttling on users

The Microsoft Exchange Throttling service tracks resource settings for specific uses and caches the information in memory. Mail flow throttling settings are also known as a budget. Restarting the Microsoft Exchange Throttling service resets the mail flow throttling budgets.

Each mailbox has a ThrottlingPolicy setting. The default value for this setting is blank ( $null ). You can use the ThrottlingPolicy parameter on the Set-Mailbox cmdlet to configure a throttling policy for a mailbox.

For more information, see the following topics:

Читайте также:  Linux steam proton crash on launch
Оцените статью