Jump to content

aelius

Administrators
  • Posts

    4970
  • Joined

  • Last visited

  • Days Won

    372

Everything posted by aelius

  1. Tuning the initial congestion window parameter (initcwnd) on the server can have a significant improvement in TCP performance, resulting in faster downloads and faster webpages. In this article, I will start with an introduction to how TCP/IP connections work with regards to HTTP. Then I will go into TCP slow start and show how tuning the initcwnd setting on the (Linux) server can greatly improve page performance. In our follow-up article we show data on the value of the initcwnd setting for the various CDNs: Initcwnd settings of major CDN providers. Three-way handshake Imagine a client wants to request the webpage Example Domain from a server. Here is an over simplified version of the transaction between client and server. The requested page is 6 KB and we assume there is no overhead on the server to generate the page (e.g. it's static content cached in memory) or any other overhead: we live in an ideal world ;-) Step 1: Client sends SYN to server - "How are you? My receive window is 65,535 bytes." Step 2: Server sends SYN, ACK - "Great! How are you? My receive window is 4,236 bytes" Step 3: Client sends ACK, SEQ - "Great as well... Please send me the webpage http://www.example.com/" Step 4: Server sends 3 data packets. Roughly 4 - 4.3 kb (3*MSS1) of data Step 5: Client acknowledges the segment (sends ACK) Step 6: Server sends the remaining bytes to the client 1. MSS = Maximum Segment Size After step 6 the connection can be ended (FIN) or kept alive, but that is irrelevant here, since at this point the browser has already received the data. The above transaction took 3*RTT (Round Trip Time) to finish. If your RTT to a server is 200ms this transaction will take you at least 600ms to complete, no matter how big your bandwidth is. The bigger the file, the more round trips and the longer it takes to download. Congestion control/TCP Slow Start As illustrated in the video and as you have seen in our example transaction in the section above, a server does not necessarily adhere to the client's RWIN (receivers advertised window size). The client told the server it can receive a maximum of 65,535 bytes of un-acknowledged data (before ACK), but the server only sent about 4 KB and then waited for ACK. This is because the initial congestion window (initcwnd) on the server is set to 3. The server is being cautious. Rather than throw a burst of packets into a fresh connection, the server chooses to ease into it gradually, making sure that the entire network route is not congested. The more congested a network is, the higher is the chances for packet loss. Packet loss results in retransmissions which means more round trips, resulting in higher download times. Basically, there are 2 main parameters that affect the amount of data the server can send at the start of a connection: the receivers advertised window size (RWIN) and the value of the initcwnd setting on the server. The initial transfer size will be the lower of the 2, so if the initcwnd value on the server is a lot lower than the RWIN on the computer of the user, the initial transfer size is less then optimal (assuming no network congestion). It is easy to change the initcwnd setting on the server, but not the RWIN. Different OSes have different RWIN settings, as shown in the table below. OS RWIN Linux 2.6.32 3*MSS (usually 5,840) Linux 3.0.0 10*MSS (usually 14,600) Windows NT 5.1 (XP) 65,535^2 Windows NT 6.1 (Windows 7 or Server 2008 R2) 8,192^2 Mac OS X 10.5.8 (Leopard) 65,535^2 Mac OS X 10.6.8 (Snow Leopard) 65,535^2 Apple IOS 4.1 65,535^2 Apple IOS 5.1 65,535^2 2. Some Operating Systems dynamically calculate RWIN based on external factors. The value here is based on SYN packets sent to CDN Planet. The Win flag can also be increased by the client before the transfer actually starts. A you can see from the table, Windows and Mac users would benefit most from servers sending more bytes in the initial transfer (which is almost everybody!) Changing initcwnd Adjusting the value of the initcwnd setting on Linux is simple. Assuming we want to set it to 10: Step 1: check route settings. sajal@sajal-desktop:~$ ip route show 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100 metric 1 169.254.0.0/16 dev eth0 scope link metric 1000 default via 192.168.1.1 dev eth0 proto static sajal@sajal-desktop:~$ Make a note of the line starting with default. Step 2: Change the default settings. Paste the current settings for default and add initcwnd 10 to it. sajal@sajal-desktop:~$ sudo ip route change default via 192.168.1.1 dev eth0 proto static initcwnd 10 Step 3: Verify sajal@sajal-desktop:~$ ip route show 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100 metric 1 169.254.0.0/16 dev eth0 scope link metric 1000 default via 192.168.1.1 dev eth0 proto static initcwnd 10 sajal@sajal-desktop:~$ Results The entire transaction now happened in 400ms, rather than 600ms. That is a big win and this is just for one HTTP request. Modern browsers open 6 connections to a host which means you will see a faster load time for 6 objects Here is a before and after comparison of accessing a 14 KB file (13,516 bytes transfered ~10*MSS) from across the globe with different settings. It is clear that when initcwnd is larger than the payload size, the entire transaction happens in just 2*RTT. The graph shows that the total load time of this object was reduced by ~50% by increasing initcwnd to 10. A great performance gain! Interested in more info and insight on tuning initcwnd? Read Google's paper An Argument for Increasing TCP's Initial Congestion Window. It's a great resource. Source: Tuning initcwnd for optimum performance - CDN Planet
  2. Merci, am de toate. Dam un ban permanent la Onbuxuser, da-l in ma-sa )
  3. Adica ... ban. Conform regulamenului orice rahat ce faciliteaza intr-un fel sau altul frauda atrage ban permanent. Asa cum ai mentionat, ai blat western union si moneygram. Astea doua nu sunt buticuri cu gogosi calde, sunt institutii ce se ocupa de transfer de bani. Sanatate si drum bun.
  4. Matzo, da-i edit la post cand vrei sa mai adaugi ceva, ai 6 posturi unu dupa altu
  5. ))))) Da-l in cacat si pe Ponta si biserica ortodoxa si pe tine. Decat cu un fost procuror cu diplome luate prin spaga mai bine cu un neamt. Cred ca ar fi si mai bine sub ocupatie germana ) Luati pwula dezbatere. Sunt satul de politica.
  6. ce saracia e threadul asta bre ?
  7. @xVIRal: Da-i corcodusele omului daca a platit pe ele
  8. Toate conexiunile one way sau dual way prin satelit sunt limitate ca bandwidth (trafic lunar); Ceva cu trafic nelimitat gasesti undeva la peste 90 euro lunar.
  9. Root de pagina ziceti, nu ? Ban o luna pentru nerespectare reguli. Asta pana ma uit deseara cum e cu tepele. Ba tu esti si batut in cap. Cum saracia vinzi cacaturile alea cu plata prin transfer bancar? E bine, ca mai ia garda din voi. Panaramelor.
  10. Mai gaseste-ti un prieten si mergi cu el la sala. Si da, mananca de 5-6 ori pe zi, nu manca odata sau de doua ori pana la saturatie. Unde e fier+rugina si mancare buna+somn creste si muschiul. E vorba de suplimente nutritive nu de anabolizanti. Sunt doua chestii total diferite. Hrana zilnica nu-ti poate asigura tot aportul necesar unei cresteri.
  11. Hai bre, e o gluma asta ? )) hahahah
  12. Un server fara setup fee -------------------------------- Intel Core i5-2500 @ 3.3 GHz 4 Cores, 4 Threads, 6 MB Cache 8 GB DDR3 Memory 1 x 240 GB SSD Force 3 2 IP Address with reverse dns 1Gbps Guaranteed Monthly traffic: 20 TB Monthly cost: 55 euro Activation time: 10 minutes // edit: s-a dat.
  13. Ati plecat cu stangul din start. Adica se vrea o distributie based on lubuntu care e based on ubuntu care e based on debian si la sfarsit cel mai probabil o sa iese o sorcova. Daca tot vreti ceva "for security professionals", plecati de la o distributie veche si stabila fara prea multe rahaturi. Sau, de ce nu, folositi FreeBSD si aruncati o privire si peste lucrururile ce tin de licentiere. Diferenta intre un linux si FreeBSD este enorma. offtopic: @.Breacker, scoate te rog semnatura aia .... Multumesc
  14. Trei servere dedicate fara setup fee: Intel Core i5-2500 @ 3.3 GHz 4 Cores, 4 Threads, 6 MB Cache Memory: 8 GB 1 x 500 GB SATA 1 IP Address with reverse dns Network Port Speed: 100Mbps Monthly traffic: 20 TB Monthly cost: 35 euro Setup fee: 0
  15. E seara idiotilor ?
  16. Daduse un moderator un warn. Ce om frate Ban permanent.
  17. Vorbesti singur ma idiotule ? Pauza 7 zile; Invata ce e ala respect ca nu sunt toti la fel aici.
  18. Datele noastre fiscale sunt : SC PARFUMURI FEMEI.COM S.R.L CUI RO30747114 Nr Reg Comertului j5/1720 inetnum: 86.107.110.0 - 86.107.110.255 netname: PARFUMURI-FEMEI-COM-SRL descr: PARFUMURI FEMEI.COM SRL descr: REPUBLICII NR 51 descr: ORADEA BIHOR ROMANIA 410167 HAHAHHAHA, deci nu a mers cu parfumuri femei si s-au apucat de hosting. Asta e cel mai tare branding pentru hosting. Parca si vad o conversatie de genul: - Salut, tu unde iti gazduiesti site-ul web ? - La un provider, parfumuri femei com srl. ))))))
  19. More info: - Making the web speedier and safer with SPDY - The official Google Code blog - SPDY: An experimental protocol for a faster web - The Chromium Projects
  20. aelius

    Firma de hosting

    Ai nevoie de: - O firma, sa poti da facturi clientilor. - Cunostinte tehnice - Un server dedicat cu mai multe adrese ip pentru inceput. Pe el vei gazdui site-urile clientilor - O licenta WHMCS - Licenta cPanel - Un site web pe care sa ai ofertele - Ceva marafeti pentru publicitate (bannere pe site-uri, etc) 500 euro sunt insuficienti pentru astea. Thread closed.
  21. Care ai votat ma KELEMEN HUNOR ? Ati uitat de opinca taranului Roman atarnata pe palatul parlamentului de la Budapesta sau vreti sa va cotropim saracia aia de tara cu totul )))
  22. Nu speculez nimic. O parte din ele sunt informatii publice iar alta parte sunt din informatii sigure. Politica nu trebuie sa fie implicate in justitie. Vadim ala care il blamati multi, are cultura cat toti la un loc (cel putin)
  23. Observ ca nu sunteti satui de bosorogi rupti in fund si securisti. - Monica Macovei a lucrat ca procuror între anii 1983 ?i 1997 - Monica macovei a fost ministrul justitiei. Au aparut milioane de dosare noi in perioada aia la ordinul lu Basescu. Atunci a inceput sa fie justitia condusa politic. Stiu ca nu aveti cu cine vota dar ar fi de preferat sa nu votati cu un procuror comunist, un altul oligofren, o curva sau un ungur.
  24. Cele doua conferinte de care este vorba sunt legate de IT/Securitate. Acolo sunt rezultatele unor oameni ce au muncit si au reusit sa stranga la un loc gramada de pasionati IT cat si experti tehnici. Nu vad de ce ai arunca cu gunoi in asa ceva sau de ce ai avea repulsie fata de astea. La Defcamp e colegul nostru, Andrei. Altii la varsta lui o ard pe aici cu root-uri si scamuri de facebook sau alte balarii. Eu zic ca merita putin respect omul. Ce vrei in userbar, un form de input in care sa bagi site-uri web si un buton langa cu "flood,scan,deface" ? Ti-au scos baietii banul si te opresti din drum sa iei rahatul la palme. Poti sa ma si injuri, mi se indoaie. Aia e ce gandesc si o spun fara retinere.
  25. Te numesti crashthepc. Hai ca e tare asta. Nu te ajuta nimeni cu labariile astea aici. Hacking inseamna arta nu haviju, root si flood. Invata sa faci lucruri, nu sa le strici. Labagiule. Ban.
×
×
  • Create New...