Silly Window Syndrome
   HOME

TheInfoList



OR:

Silly window syndrome (SWS) is a problem in
computer networking A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
caused by poorly implemented TCP flow control. A serious problem can arise in the
sliding window A sliding window protocol is a feature of packet-based data transmission Protocol (computing), protocols. Sliding window protocols are used where reliable in-order delivery of packets is required, such as in the data link layer (OSI model#Laye ...
operation when the sending application program creates data slowly, the receiving application program consumes data slowly, or both. If a server with this problem is unable to process all incoming data, it requests that its clients reduce the amount of data they send at a time (the window setting on a TCP packet). If the server continues to be unable to process all incoming data, the window becomes smaller and smaller, sometimes to the point that the data transmitted is smaller than the packet header, making data transmission extremely inefficient. The name of this problem is due to the window size shrinking to a " silly" value. Since there is a certain amount of overhead associated with processing each packet, the increased number of packets means increased overhead to process a decreasing amount of data. The end result is thrashing.


Solution

When there is no synchronization between the sender and receiver regarding capacity of the flow of data or the size of the packet, the window syndrome problem is created. When the silly window syndrome is created by the sender, Nagle's algorithm is used. Nagle's solution requires that the sender send the first segment even if it is a small one, then that it wait until an ACK is received or a maximum sized segment (MSS) is accumulated. When the silly window syndrome is created by the receiver, David D Clark's solution is used. Clark's solution closes the window until another segment of maximum segment size (MSS) can be received or the buffer is half empty. There are 3 causes of SWS: # When the server announces Empty space as 0 # When client is able to generate only 1 byte at a time # When server is able to consume only 1 byte at a time During SWS, efficiency of communication is almost 0, so SWS duration should be short as possible.


Send-side silly window avoidance

A
heuristic A heuristic or heuristic technique (''problem solving'', '' mental shortcut'', ''rule of thumb'') is any approach to problem solving that employs a pragmatic method that is not fully optimized, perfected, or rationalized, but is nevertheless ...
method where the send TCP must allow the sending application to make "write" calls, and collect the data transferred in each call before transmitting it into a large segment. The sending TCP delays sending segments until it can accumulate reasonable amounts of data, which is known as ''clumping.''


Receive-side silly window avoidance

A heuristic method that a receiver uses to maintain an internal record of the available window, and delay advertising an increase in window size to the sender until it can advance a significant amount. This amount depends on the receiver's
buffer Buffer may refer to: Science * Buffer gas, an inert or nonflammable gas * Buffer solution, a solution used to prevent changes in pH * Lysis buffer, in cell biology * Metal ion buffer * Mineral redox buffer, in geology Technology and engineeri ...
size and maximum segment size. By using this method, it prevents small window advertisements where received applications extract data octets slowly.


References

* *{{cite IETF, rfc=801, last1=Postel, first1=J, title=NCP/TCP Transition Plan, accessdate=5 October 2016, page=6, date=1981, quote=Some TCP implementations did not protect against silly window syndrome.


External links


Explanation of the silly window syndrome

Recommended sender- and client-side solutions to silly window syndrome
Transmission Control Protocol