TCP tuning

TCP tuning techniques adjust the network congestion avoidance parameters of Transmission Control Protocol (TCP) connections over high-bandwidth, high-latency networks. Well-tuned networks can perform up to 10 times faster in some cases.[1] However, blindly following instructions without understanding their real consequences can hurt performance as well.

Network and system characteristics

Bandwidth-delay product (BDP)

Bandwidth-delay product (BDP) is a term primarily used in conjunction with TCP to refer to the number of bytes necessary to fill a TCP "path", i.e. it is equal to the maximum number of simultaneous bits in transit between the transmitter and the receiver.

High performance networks have very large BDPs. To give a practical example, two nodes communicating over a geostationary satellite link with a round-trip delay time (or round-trip time, RTT) of 0.5 seconds and a bandwidth of 10 Gbit/s can have up to 0.5×10 Gbits, i.e., 5 Gbit of unacknowledged data in flight. Despite having much lower latencies than satellite links, even terrestrial fiber links can have very high BDPs because their link capacity is so large. Operating systems and protocols designed as recently as a few years ago when networks were slower were tuned for BDPs of orders of magnitude smaller, with implications for limited achievable performance.

Buffers

The original TCP configurations supported TCP receive window size buffers of up to 65,535 (64 KiB - 1) bytes, which was adequate for slow links or links with small RTTs. Larger buffers are required by the high performance options described below.

Buffering is used throughout high performance network systems to handle delays in the system. In general, buffer size will need to be scaled proportionally to the amount of data "in flight" at any time. For very high performance applications that are not sensitive to network delays, it is possible to interpose large end to end buffering delays by putting in intermediate data storage points in an end to end system, and then to use automated and scheduled non-real-time data transfers to get the data to their final endpoints.

TCP speed limits

Maximum achievable throughput for a single TCP connection is determined by different factors. One trivial limitation is the maximum bandwidth of the slowest link in the path. But there are also other, less obvious limits for TCP throughput. Bit errors can create a limitation for the connection as well as RTT.

Window size

In computer networking, RWIN (TCP Receive Window) is the amount of data that a computer can accept without acknowledging the sender. If the sender has not received acknowledgement for the first packet it sent, it will stop and wait and if this wait exceeds a certain limit, it may even retransmit. This is how TCP achieves reliable data transmission.

Even if there is no packet loss in the network, windowing can limit throughput. Because TCP transmits data up to the window size before waiting for the acknowledgements, the full bandwidth of the network may not always get used. The limitation caused by window size can be calculated as follows:

where RWIN is the TCP Receive Window and RTT is the round-trip time for the path.

At any given time, the window advertised by the receive side of TCP corresponds to the amount of free receive memory it has allocated for this connection. Otherwise it would risk dropping received packets due to lack of space.

The sending side should also allocate the same amount of memory as the receive side for good performance. That is because, even after data has been sent on the network, the sending side must hold it in memory until it has been acknowledged as successfully received, just in case it would have to be retransmitted. If the receiver is far away, acknowledgments will take a long time to arrive. If the send memory is small, it can saturate and block emission. A simple computation gives the same optimal send memory size as for the receive memory size given above.

Packet loss

When packet loss occurs in the network, an additional limit is imposed on the connection.[2] In the case of light to moderate packet loss when the TCP rate is limited by the congestion avoidance algorithm, the limit can be calculated according to the formula (Mathis, et al.):

where MSS is the maximum segment size and Ploss is the probability of packet loss. If packet loss is so rare that the TCP window becomes regularly fully extended, this formula doesn't apply.

TCP options for high performance

A number of extensions have been made to TCP over the years to increase its performance over fast high-RTT links ("long fat networks" or LFNs).

TCP timestamps (RFC 1323) play a double role: they avoid ambiguities due to the 32-bit sequence number field wrapping around, and they allow more precise RTT estimation in the presence of multiple losses per RTT. With those improvements, it becomes reasonable to increase the TCP window beyond 64 kB, which can be done using the window scaling option (RFC 1323).

The TCP selective acknowledgment option (SACK, RFC 2018) allows a TCP receiver to precisely inform the TCP sender about which segments have been lost. This increases performance on high-RTT links, when multiple losses per window are possible.

Path MTU Discovery avoids the need for in-network fragmentation, increasing the performance in the presence of packet loss.

Tuning slow connections

The default IP queue length is 1000, which is generally too large. Imagine a Wi-Fi base station having a speed of 20 Mbit/s and an average packet size of 750 byte. How large should the IP queue be? A voice over IP client should be able to transmit a packet every 20 ms. The estimated maximum number of packets in transit would then be:

Estimated buffer size = 20000000 * 0,020 / 8 / 750 = 66

A better queue length would be:

ifconfig wlan0 mtu 1492 txqueuelen 100

See also

References

  1. ^ "High Performance SSH/SCP - HPN-SSH". Psc.edu. Retrieved January 23, 2020.
  2. ^ "The Macroscopic Behavior of the TCP Congestion Avoidance Algorithm". Psc.edu. Archived from the original on May 11, 2012. Retrieved January 3, 2017.

Read other articles:

Trevor NoahTrevor Noah pada tahun 2017Lahir20 Februari 1984 (umur 40) Johannesburg, Afrika SelatanMediaLawak tunggaltelevisifilmbukuTahun aktif2002–kiniGenrePolitik/satir beritakomedi observasihumor surealkomedi gelapkomedi hinaanhumor keringSubjekMedia massa/media berita/kritisisme mediaPolitik Amerika SerikatBudaya Afrika Selatanisu terkinihubungan rasbudaya populerDipengaruhiRichard PryorBill CosbyEddie MurphyChris RockDave ChappelleMemengaruhiMichelle WolfJordan KlepperOrang tuaRob...

 

Patung Yesus Institut Pastoral Indonesia (IPI) adalah sebuah lembaga pendidikan yang mendidik seseorang dalam bidang teologi untuk mengembangkan pengetahuan dan berkompetisi lebih dalam mengenai pastoral.[1] Sekolah ini terletak di Jl. Bunga Seruni 6 Jatimulyo, Sukun, Malang 65141 Jawa Timur.[2] Tujuan Didirikannya institute ini ditujukan untuk menghasilkan lulusan studi pastoral kateketik yang professional dalam karya kerasulan gereja.[1] Alumni dari nstitut ini, juga...

 

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Januari 2023. Sastra mahjar atau sastra diaspora adalah aliran sastra yang dihasilkan oleh sastrawan Arab yang hidup di berbagai negara tempat mereka bermigrasi, berpindah, atau berhijrah. Kata mahjar berasal dari kata هجر (hajara) yang memiliki arti ‘berpindah...

Prime Minister of India since 2014 (born 1950) Modi redirects here. For other uses, see Modi (disambiguation). Narendra ModiOfficial portrait, 202214th Prime Minister of IndiaIncumbentAssumed office 26 May 2014PresidentPranab MukherjeeRam Nath KovindDroupadi MurmuVice-PresidentMohammad Hamid AnsariM. Venkaiah NaiduJagdeep DhankharPreceded byManmohan Singh Additional ministries IncumbentAssumed office 26 May 2014Ministry and DepartmentsPersonnel, Public Grievances and Pensions; Dep...

 

يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة من خلال إضافة مصادر موثوق بها. أي معلومات غير موثقة يمكن التشكيك بها وإزالتها. (ديسمبر 2018) هذه المقالة تحتاج للمزيد من الوصلات للمقالات الأخرى للمساعدة في ترابط مقالات الموسوعة. فضلًا ساعد في تحس...

 

Годы 1073 · 1074 · 1075 · 1076 — 1077 — 1078 · 1079 · 1080 · 1081 Десятилетия 1050-е · 1060-е — 1070-е — 1080-е · 1090-е Века X век — XI век — XII век 2-е тысячелетие IX век X век XI век XII век XIII век 990-е 990 991 992 993 994 995 996 997 998 999 1000-е 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010-е 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020...

 or  mꜣꜥ-ḫrw (True of Voice)in hieroglyphs Cartouche of Ankhnesneferibre, called Maa Kheru just below it. Maa Kheru (Ancient Egyptian: mꜣꜥ ḫrw) is a phrase meaning true of voice or justified[1] or the acclaim given to him is 'right'.[2] The term is involved in ancient Egyptian afterlife beliefs, according to which deceased souls had to be judged morally righteous. Once the soul had passed the test, the Weighing of the Heart, they were judged to be mꜣ�...

 

Russian wheelchair fencer Artur YusupovYusupov in 2021Personal informationBorn (1983-12-20) 20 December 1983 (age 40)[1]RussiaSportCountryRussiaSportWheelchair fencingCoached byDmitry Telegin[1] Medal record Representing  RPC Paralympic Games 2020 Tokyo Épée team Artur Yusupov (Russian: Артур Юсупов, born 20 December 1983) is a Russian wheelchair fencer. He won a gold medal in the team épée event at the 2020 Summer Paralympics and placed fifth individu...

 

Artikel ini tidak memiliki referensi atau sumber tepercaya sehingga isinya tidak bisa dipastikan. Tolong bantu perbaiki artikel ini dengan menambahkan referensi yang layak. Tulisan tanpa sumber dapat dipertanyakan dan dihapus sewaktu-waktu.Cari sumber: Danau kawah – berita · surat kabar · buku · cendekiawan · JSTOR Segara Anak, danau kawah yang berada di kaldera Gunung Rinjani. Kawah Putih tampak dari permukaan dasar. Danau kawah (crater lake atau volc...

Mild chili pepper originating in Puebla, Mexico Not to be confused with pasilla. This article is about the chile pepper originating in Puebla, México. For persons from Puebla, called Poblanos in Spanish, see Puebla. This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Poblano – news · newspapers · books · scholar ...

 

French historian This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help improve this article by introducing more precise citations. (September 2020) (Learn how and when to remove this message) Gilbert Dagron (January 26, 1932 - August 4, 2015, Paris, France) was a French historian, Byzantine scholar, professor at the College de France (1975-2001), president of the International Association f...

 

Indian composer (1942–2007) L. VaidyanathanBornLakshminarayana Vaidyanathan(1942-04-09)9 April 1942Madras, Madras Presidency, British India (Now Chennai, India)Died19 May 2007(2007-05-19) (aged 65)Chennai, IndiaOccupation(s)Violinist, composerChildren2ParentV. LakshminarayanaMusical careerInstrumentsViolin, harmonium Musical artist Lakshminarayana Vaidyanathan (Tamil: லக்ஷ்மிநாராயண வைத்தியநாதன்; Kannada: ಎಲ್.ವೈದ್ಯನಾ�...

Strada A360 LenaLocalizzazioneStato Russia DatiClassificazionestrada federale InizioJakutsk FineSkovorodino Lunghezza1235 km Percorso Manuale Strada statale A360 «Lena» La strada federale A360 «Lena» (in russo Федеральная автомобильная дорога А360 «Лена»?) è una strada federale nella Repubblica della Sacha-Jacuzia che collega la città di Jakutsk con il corridoio della ferrovia Transiberiana vicino a Skovorodino, nell'Oblast' dell'Amur (Circ...

 

English footballer (born 1989) Liam Henderson Henderson in 2010Personal informationFull name Liam Marc Henderson[1]Date of birth (1989-12-28) 28 December 1989 (age 34)[1]Place of birth Gateshead, EnglandHeight 6 ft 1 in (1.85 m)[2]Position(s) StrikerTeam informationCurrent team Bishop AucklandYouth career Hartlepool United2006–2007 WatfordSenior career*Years Team Apps (Gls)2007–2011 Watford 18 (0)2008 → Wealdstone (loan) 10 (3)2009 → Hartlep...

 

This article does not cite any sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: South West Line, Chennai Suburban – news · newspapers · books · scholar · JSTOR (June 2019) (Learn how and when to remove this message) South-West LineOverviewStatusOperational till ArakkonamTerminiChennai Beach (Madras Beach)ArakkonamStations39ServiceTypeSuburban railwaySystemC...

American journalist and columnist (1931–2009) Robert NovakNovak in 2002BornRobert David Sanders Novak(1931-02-26)February 26, 1931Joliet, Illinois, U.S.DiedAugust 18, 2009(2009-08-18) (aged 78)Washington, D.C., U.S.Alma materUniversity of Illinois Urbana-ChampaignOccupationsJournalistcolumnistcommentatorpunditauthorSpousesRosanna Hall (div.) Geraldine (Williams) Novak ​ ​(m. 1962)​ This article is part of a series onConservatismin the United Stat...

 

Local government body in England Sefton CouncilTypeTypeMetropolitan borough council LeadershipMayorJune Burns, Labour since 16 May 2023[1][2] LeaderMarion Atkinson, Labour since 18 January 2024[3] Chief ExecutivePhil Porter since July 2023 StructureSeats66 councillors[4]Political groups Administration (48)   Labour (48) Other parties (16)   Liberal Democrats (9)   Conservative (4)   Independent (2)   Green (1) Vacant (2)   ...

 

Weather event characterized by freezing rain For other uses, see Ice storm (disambiguation). Devastation caused by an ice storm Part of a series onWeather Temperate and polar seasons Winter Spring Summer Autumn Tropical seasons Dry season Harmattan Wet season Storms Cloud Cumulonimbus cloud Arcus cloud Downburst Microburst Heat burst Derecho Lightning Volcanic lightning Thunderstorm Air-mass thunderstorm Thundersnow Dry thunderstorm Mesocyclone Supercell Tornado Anticyclonic tornado Landspout...

『シチリアの晩鐘』(イタリア語版)のリトグラフ 関連ポータルのリンク ウィキポータル クラシック音楽ウィキポータル 舞台芸術 『シチリアの晩鐘』(仏:Les vêpres siciliennes)は、ジュゼッペ・ヴェルディが作曲した5幕から構成されるオペラ。『シチリア島の夕べの祈り』や『シチリアの晩祷』とも訳され、前者が多く使用されるが一定しない。序曲は演奏会�...

 

Port authority in Toronto, Canada PortsTorontoToronto Port AuthorityPredecessorToronto Harbour CommissionEstablishedJune 8, 1999TypeGovernment-owned enterprisePurposePort authorityHeadquarters207 Queens Quay West,Suite 500,Toronto, Ontario, CanadaLeaderGeoffrey A. Wilson, CEOStaff 139 (120 full-time, 19 part-time)Websitewww.portstoronto.com The Toronto Port Authority (TPA), doing business as PortsToronto (PT),[1] is a port authority that is responsible for the management of the Port o...