Silly window syndrome
Encyclopedia
Silly window syndrome is a problem in computer networking caused by poorly-implemented TCP
flow control
. If a server
with this problem is unable to process all incoming data, it requests that its client
s 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.
is used. Nagle's solution requires that the sender sends the first segment even if it is a small one, then the sender waits 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.
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.
s slowly.
Transmission Control Protocol
The Transmission Control Protocol is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol , and therefore the entire suite is commonly referred to as TCP/IP...
flow control
Flow control
In data communications, flow control is the process of managing the pacing of data transmission between two nodes to prevent a fast sender from outrunning a slow receiver. It provides a mechanism for the receiver to control the transmission speed, so that the receiving node is not overwhelmed with...
. If a server
Server (computing)
In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients"...
with this problem is unable to process all incoming data, it requests that its client
Client (computing)
A client is an application or system that accesses a service made available by a server. The server is often on another computer system, in which case the client accesses the service by way of a network....
s reduce the amount of data they send at a time (the "window" setting
Congestion window
In Transmission Control Protocol , the congestion window is one of the factors that determines the number of bytes that can be outstanding at any time. This is not to be confused with the TCP window size which is maintained by the receiver. This is a means of stopping the link between two places...
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
Computational overhead
In computer science, overhead is generally considered any combination of excess or indirect computation time, memory, bandwidth, or other resources that are required to attain a particular goal...
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 algorithmNagle's algorithm
Nagle's algorithm, named after John Nagle, is a means of improving the efficiency of TCP/IP networks by reducing the number of packets that need to be sent over the network....
is used. Nagle's solution requires that the sender sends the first segment even if it is a small one, then the sender waits 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
David D Clark's algorithm
Clark's solution is to prevent the receiver from sending a window update for 1 byte. Instead it is forced to wait until it has a decent amount of space available and advertise that instead...
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.
Send-side silly window avoidance
A heuristicHeuristic
Heuristic refers to experience-based techniques for problem solving, learning, and discovery. Heuristic methods are used to speed up the process of finding a satisfactory solution, where an exhaustive search is impractical...
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 size and maximum segment size. By using this method, it prevents small window advertisements where received applications extract data octetOctet (computing)
An octet is a unit of digital information in computing and telecommunications that consists of eight bits. The term is often used when the term byte might be ambiguous, as there is no standard for the size of the byte.-Overview:...
s slowly.