1ïŒTCPã®å¶é
ããŒã¿è»¢éé床ã¯ããããã¯ãŒã¯ãšã·ã¹ãã ã®ç¹æ§ã«äŸåããŸãã
img1ãããã¯ãŒã¯ãä»ããŠããŒã¿ãéä¿¡ããããã»ã¹
aïŒãããã¡ãŒ
å ã®TCPæ§æã¯ããããã¡ãŒã®éä¿¡é床ãå¶éãïŒãŠã£ã³ããŠãµã€ãºãªãã·ã§ã³-ããŠã£ã³ããŠãµã€ãºãïŒããµã€ãºã2 ^ 16ãã€ãïŒæ倧64 KBïŒã®ãã£ãŒã«ãã§ãã ãã®å Žåã®æ倧ã¹ã«ãŒãããïŒ
äŸïŒã€ã³ã¿ãŒããããžã®100ã¡ã¬ãããæ¥ç¶ãšããµãŒããŒãžã®100ããªç§ã®é 延ããããŸãã
æšæºã®TCPã¹ã¿ãã¯ã§ã¯ãæ倧ããŒã¿è»¢éé床ã¯10 Mbpsãè¶ ããŸãã
ïŒ524288ããã/ 0.1ç§= 5.24 Mb / s 100ã¡ã¬ãããã®ãªã³ã¯ããããšããäºå®ã«ããããããïŒã
bïŒåž¯åå¹ é 延ç©ïŒBDPïŒ
ååãšããŠãTCPã®ããã©ãŒãã³ã¹ã¯ãã£ãã«é床ã«ããã»ã©äŸåãããããããã垯åå¹ *é 延ç©ããŸãã¯BDPïŒã¹ã«ãŒããã*é 延ã®çµæïŒã«äŸåããŸããããã¯ãTCPæ¥ç¶ãæ倧åããããã«éä¿¡è ãšåä¿¡è ã«å¿ èŠãªãã€ãæ°ã§ãã
ããããããã³ã°ãã¡ãããããã¯ãŒã¯ãïŒLFNïŒã®å Žåãããã©ãŒãã³ã¹ã®åé¡ãçºçããŸããããã¯ããã®å Žåã®BDPãTCPãŠã£ã³ããŠã®ãµã€ãºãè¶ ããããã«ããäŒéé床ãå¶éãããããã§ãã
img2æ倧TCPã¹ã«ãŒãããã«å¯Ÿããé 延ã®åœ±é¿
äŸã¯ãã¢ãã€ã«ã€ã³ã¿ãŒããããŸãã¯é«éå ãªã³ã¯ã§ãã
BDPã®èšç®äŸïŒ
aïŒã¢ãã€ã«ãããŒããã³ãïŒ10 Mb / sã100 ms RTT
BÃD = 10^7 b/s à 10^-1 s = 10^6 b, or 1 Mb / 125 kB
bïŒé«éå°äžãããã¯ãŒã¯ïŒ1 Gb / sã10 ms RTT
BÃD = 10^9 b/s à 10^-2 s = 10^7 b, or 10 Mb / 1.25 MB
ãã㧠BDPãèšç®ã§ããŸã ã
æ倧ãã£ãã«è² è·ãéæããã«ã¯ãTCPã®ããŠã£ã³ããŠãµã€ãºããBDPãè¶ ããå¿ èŠããããŸãã
cïŒãããã³ã«ã®ãªãŒããŒããã
äžéšã®æšå®ã«ãããšãäžçã®ã³ã³ãã¥ãŒã¿ãŒã®çŽ95ïŒ ãã€ãŒãµããããã¯ãããžãŒãä»ããŠæ¥ç¶ãããŠããŸãã
ã€ãŒãµãããMTUïŒã€ãŒãµããããã¬ãŒã ãã€ããŒãïŒ=æ倧 1500ãã€ãã
EthernetãIPãTCPã®ãã¹ãŠã®ããããŒãèæ ®ãããšãå³ã¯æ¬¡ã®ããã«ãªããŸãã
img3 1ã€ã®ã€ãŒãµããããã¬ãŒã ã®éä¿¡
æ°åã¯ãç¹å®ã®ãããã³ã«ã®ããããŒã®ãµã€ãºïŒãã€ãåäœïŒã瀺ããŸãã
IFGïŒãã¬ãŒã éã®ã£ããïŒ-å¿ èŠãªãã¬ãŒã éã¹ããŒã¹ã
ããããŒïŒããªã¢ã³ãã«ããã¬ãŒã åºåããã€ãŒãµãããããããŒ/ FCS-26ãã€ããIFG-12ãã€ããIPããããŒ-20ãã€ããTCPããããŒ-20ãã€ãã
VLANã¿ã®ã³ã°ãTCPã¿ã€ã ã¹ã¿ã³ããããã³ãã®ä»ã®ãªãã·ã§ã³æ©èœãé€å€ãããšãã€ãŒãµããããããã¯ãŒã¯äžã®TCPã®æ倧ãã€ããŒãã¯æ¬¡ã®ããã«ãªããŸãã
æ倧TCPãã€ããŒã =ïŒMTU â TCP â IPïŒ/ïŒMTU +ã€ãŒãµããã+ IFGïŒ=ïŒ1500â40ïŒ/ïŒ1500 + 26 + 12ïŒ= 94.9ïŒ
dïŒé 延ãšãã±ããæ倱
ä¿¡é Œæ§ã®é«ãæ å ±éä¿¡ã§ããããããããã¯ãŒã¯äžã®ãã±ããæ倱ã«ãããTCPã¯åŒ·å¶çã«ã»ã°ã¡ã³ããåéä¿¡ããé床ã®äœäžã«çŽæ¥åœ±é¿ããŸãã
ãã±ããæ倱ã«å¯ŸããTCPé床ã®äŸåæ§ã¯ãMathisã®åŒã«ãã£ãŠæ±ºå®ãããŸãã
ããã§ãMSSïŒæ倧ã»ã°ã¡ã³ããµã€ãºïŒ-æ倧TCPã»ã°ã¡ã³ããµã€ãºïŒMSS = MTU-ãã±ããããããŒ= 1460ãã€ãïŒã
MTU-äžäœã¬ãã«OSIã®éä¿¡ãããã¯ã®æ倧ãµã€ãºïŒã€ãŒãµãããMTU = 1500ãã€ãïŒã
RTT-åæ¹åé 延ã®æéïŒäžæ¹ã®ç«¯ããããäžæ¹ã®ç«¯ãŸã§ãããã³è±èªã®åŸåŸ©æéããïŒ
Ploss-æ倱ã®ç¢ºçã
Ploss = 0ã®å ŽåãåŒã¯ç¡å¹ã§ããããšã«æ³šæããŠãã ãããçŸå®ã«ã¯åžžã«ãã±ããæ倱ããããããããã¯æ£åžžã§ãã
img4æ倧TCPã¹ã«ãŒãããã«å¯Ÿããé 延ãšãã±ããæ倱ã®åœ±é¿
ã»ãšãã©ã®ãããã€ããŒã¯ã0.01ïŒ æªæºïŒ1äžãã±ããã®ãã¡1ãã±ããïŒã®æ倱ãä¿èšŒããŸããã
ãnetstat -sãã³ãã³ãã䜿çšããŠããããã³ã«ã®çµ±èšã確èªã§ããŸãã
2ïŒTCPæé©å
aïŒãããã³ã«ã®åŒ·å
ãã®ç¹ã§ãå¶éã解決ããããã«èšèšãããã é«æ§èœTCPæ¡åŒµ ïŒ RFC1323 ïŒ æšæºã§èª¬æãããŠãããããã³ã«æ¡åŒµãéçºãããŸããã
ãããã®äžã«ã¯ïŒ
-TCP ãŠã£ã³ããŠã¹ã±ãŒã«ãªãã·ã§ã³ïŒãŠã£ã³ããŠãµã€ãºã2 ^ 30ïŒ1 GBïŒã«å¢ããæ©èœã
-TCPéžæçè¯å®å¿çïŒ SACK ïŒãªãã·ã§ã³ïŒåä¿¡åŽã¯ãã¹ããªãŒã å ã®ã©ã®ãã±ãããè¯å®å¿çïŒè¯å®ãŸãã¯åŠå®ïŒããããã瀺ããŸãïŒ RFC2018 ïŒã
-TCP ã¿ã€ã ã¹ã¿ã³ã ïŒRTT枬å®ã®æ¹åïŒã©ãŠã³ãããªããæé枬å®-RTTMïŒãã·ãŒã±ã³ã¹çªå·ã®éè€é²æ¢ACKïŒã©ãããããã·ãŒã±ã³ã¹çªå·ã®é²æ¢-PAWSïŒã
- ãã¹MTUãã£ã¹ã«ããªãŒ ïŒæ倧MTUããã¹ãŠæ±ºå®ãã
-æ瀺çãªèŒ»èŒ³éç¥ïŒ ECN ïŒïŒãã±ãããããããããã«ãã¹ã®èŒ»èŒ³ã瀺ããŸãïŒ RFC3168 ïŒã
ããã§çŸåšã®ã³ã³ãã¥ãŒã¿ãŒã®TCP / IPèšå®ã確èªããŠãã ããã
bïŒãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®é©å¿
RFC1323ææžã¯1992幎ã«å ¬éããããšããäºå®ã«ãããããããå€æŽã¯OSã«ããã«ã¯å°å ¥ãããŸããã§ããã
OS Windows
RFC1323ã®ãµããŒãã¯Windows 2000ïŒXPãServer 2003ïŒä»¥éã«ç»å Žãããªãã·ã§ã³ãæå¹ã«ããã«ã¯ã¬ãžã¹ããªãå€æŽããå¿ èŠããããŸãã
Windows Server 2008ãVistaã7ã·ã¹ãã ã«ã¯ã次äžä»£TCP / IPã¹ã¿ãã¯ãšåŒã°ããTCP / IPãããã³ã«ã¹ã¿ãã¯ã®æ°ããå®è£ ãå«ãŸããŠããŸãã ããã¯ãä»åŸæ°å¹ŽéãWindowsãããã¯ãŒã¯ãã¯ãããžãŒãæäŸããããã«èšèšãããŠããŸãã é©æ°ã®äžã§ïŒ
-åä¿¡ãŠã£ã³ããŠã®èªå調æŽïŒåä¿¡ãŠã£ã³ããŠã®èªå調æŽïŒã
-è€åTCPïŒä»ã®ãã©ãããã©ãŒã ã§äœ¿çšãããŠããã¢ã«ãŽãªãºã ã®ä»£ããã«æ°ããã¢ã«ãŽãªãºã ã䜿çšããŠãé«åž¯åå¹ ã®ãããã¯ãŒã¯ã§ã®äœããã©ãŒãã³ã¹ã®åé¡ã解決
-é«æ倱ç°å¢ãªã©ã®æ©èœåŒ·åã
å€ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã ã³ãã³ãã©ã€ã³ãä»ããèšå®ã
ããŸããŸãªãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ïŒWindows XPãFreeBSDãLinuxãSolarisãMac OS XïŒã®è©³çŽ°ãªæ§ææé ã¯ããããããŒã°ã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒã»ã³ã¿ãŒã®Webãµã€ãã§èŠã€ããããšãã§ããŸãã
泚ïŒã»ãšãã©ã®ãã©ãã£ãã¯ã¯ã«ãŒã¿ãŒïŒç°ãªããããã¯ãŒã¯éïŒãééããŸãããTCPã¯OSIãããã¯ãŒã¯ã¢ãã«ã®äžäœã¬ãã«ã§æ©èœããæé©ãªã«ãŒãã決å®ãããã±ãããé ä¿¡ããæ©èœã®ã¿ãå®è¡ãããããæé©åã«éæ¥çã«ã®ã¿é¢é£ããŸãïŒå Žåã«ãã£ãŠïŒç®çå°ã
3ïŒTCP / IPã¹ã¿ãã¯ã®ããã©ãŒãã³ã¹æž¬å®
ãããã¯ãŒã¯äžã®ã€ã³ã¿ãŒãããæ¥ç¶ã®é床ã枬å®ããã«ã¯ãå€ãã®æ¹æ³ããããŸãã
ããã§ã¯ã nuttcpãŠãŒãã£ãªãã£ïŒãNew TTCPãïŒã䜿çšããå Žåãæ€èšããŸããããã«ã¯ããã€ãã®åªããå©ç¹ããããŸãã
-TCPãŸãã¯UDPçµç±ã®ãã£ãã«ã¹ã«ãŒãããã枬å®ããããã®ã·ã³ãã«ã§å¹æçãªæ¹æ³ã
-ã¯ãã¹ãã©ãããã©ãŒã ã®åäžãã¡ã€ã«ããã°ã©ã ïŒCLIïŒã
-ããŒã«ã«TCP / IPã¹ã¿ãã¯ïŒã«ãŒãããã¯ïŒã®æå¹æ§ãæ€èšŒããæ©èœã
-å®å®ãããµãŒããŒæäœïŒTCPã»ãã·ã§ã³ã®æ£ããå®äºïŒãããªãŒãºãã¯ã©ãã·ã¥ãªã
ïŒiperfã®å Žåãšåæ§ïŒã
-NATããã®ã¯ã©ã€ã¢ã³ãã®ä»äºã
ã¡ãã£ãšããæŽå²ïŒ1980幎ãMike MuussïŒpingã®äœæè ïŒã¯ãæåã®TCP垯åå¹ ãã¹ãããŒã«ã®1ã€ã§ããttcpïŒãTest TCPãïŒãäœæããŸããã ãã®åŸãããŸããŸãªå®è£ ã§æ°ããæ©èœã䜿çšããŠå€ãã®å€æŽãäœæãããŸããã Nuttcpããã®1ã€ã§ãã ææ°ã®ããŒã¿çã¯2010幎4æã§ãã
ãã¹ãã¯ãã¯ã©ã€ã¢ã³ã/ãµãŒããŒã¹ããŒã ã«åŸã£ãŠæ©èœããŸãã
ãã€ããŒãã枬å®ãããŸã-ãã€ããŒãïŒããããŒãªãïŒã
ããŒã5000ã§ã®æ¥ç¶ãããŒã¿è»¢é-5001ïŒããã³ãã«ãã¹ã¬ãããã¹ããæå®ããå Žåã¯ãã以äžïŒã
ãµãŒããŒ- #nuttcp -Sãæå®ããã ã
ã¯ã©ã€ã¢ã³ã- å€ãã®ãªãã·ã§ã³ãæå®ã§ããŸãã
äŸïŒ
FreeBSDãµãŒããŒãWindows XP SP3ã¯ã©ã€ã¢ã³ããFastEthernetïŒ100MbpsïŒã
server-ipïŒnuttcp âS
ã¯ã©ã€ã¢ã³ããªãã·ã§ã³ïŒ
-w128-TCPåä¿¡ãŠã£ã³ããŠãµã€ãº= 128 KB
-r-åä¿¡ïŒåä¿¡ãã¯ã©ã€ã¢ã³ãçšïŒ
-F-NATã䜿çšããŠããå Žåã«çºçããå¯èœæ§ã®ããæ¥ç¶ã®åé¡ãä¿®æ£
-i5-5ç§ããšã«çµæã衚瀺ããŸã
-T15-ãã¹ãæéïŒ15ç§ïŒã
TXïŒ ãšRXïŒ ã¯ãéä¿¡æ©ãšåä¿¡æ©ã®ããã»ããµè² è·ã§ãã
ããŒããŠã§ã¢ãšTCP / IP OSã¹ã¿ãã¯ã®ããã©ãŒãã³ã¹ã®ç¢ºèªïŒ
CïŒ\> nuttcp.exe -w1m 127.0.0.1
205.0625 MB / 10.00ç§= 172.0189 Mbps 19ïŒ TX 12ïŒ RX
çµæã®äŸïŒ
-Intel Core 2 DuoïŒ2ã³ã¢ïŒ@ 1.6 GHz / 1 GB RAM / Windows XP = 1300/1400 Mbps
-AMD Athlon X2 Dual-Core 4600 @ 2.4 GHz / 2 GB RAM / Windows 7 = 2000/2100 Mbps
-Intel XEON X5650ïŒ24ã³ã¢ïŒ@ 2.67GHz / 8 GB RAM / FreeBSD = 16600/18000 Mbps
ããŠã³ããŒãã®ç¢ºèªïŒãµãŒããŒããã¯ã©ã€ã¢ã³ããžïŒ ïŒ
CïŒ\> nuttcp.exe -w128 -r -F âi5 -T15 server-ip
56.0166 MB / 5.00ç§= 93.9803 Mbps
56.0575 MB / 5.00ç§= 94.0489 Mbps
56.0338 MB / 5.00ç§= 94.0090 Mbps
168.2676 MB / 15.00ç§= 94.1020 Mbps 3ïŒ TX 10ïŒ RX
some-unix-clientïŒnuttcp -r -F -i5 -T15 server-ip
429.0000 MB / 5.02ç§= 717.3541 Mbps
526.0000 MB / 5.00ç§= 882.0518 Mbps
1371.1741 MB / 15.00ç§= 766.6703 Mbps 26ïŒ TX 39ïŒ RX 3153 host-retrans 0.29 msRTT
ã¢ããããŒãã®ç¢ºèªïŒã¯ã©ã€ã¢ã³ããããµãŒããŒãžïŒ ïŒ
CïŒ\> nuttcp.exe -w128 âi5 -T15 server-ip
55.6250 MB / 5.00ç§= 93.3169 Mbps
55.8125 MB / 5.00ç§= 93.6562 Mbps
55.6875 MB / 5.00ç§= 93.4277 Mbps
167.2500 MB / 15.12ç§= 92.7664 Mbps 17ïŒ TX 6ïŒ RX
some-unix-clientïŒnuttcp -i5 -T15 server-ip
422.9375 MB / 5.00ç§= 709.5294 Mbps
420.6875 MB / 5.00ç§= 705.9357 Mbps
456.3750 MB / 5.00ç§= 765.6674 Mbps
1305.3853 MB / 15.06ç§= 727.0077 Mbps 20ïŒ TX 48ïŒ RX 24478 host-retrans 0.29 msRTT
4ïŒçµè«ã®ä»£ããã«
ãã¹ãäžã åã ã®TCPæ¥ç¶ã®æ倧é床ã¯ããŸããŸãªèŠå ã«ãã£ãŠæ±ºå®ãããããšã«æ³šæããå¿ èŠããããŸãã
-ãã©ãã¯ã®æãé ãã¹ãã¬ããã®æ倧ã¹ã«ãŒãããã
-ãªã¯ãšã¹ããéä¿¡ããŠããã¬ã¹ãã³ã¹ãåä¿¡ãããŸã§ã®æéïŒRTTïŒ
-é è·é¢ã§ã®é 延ã®ã»ãšãã©ã¯ããã¡ã€ãå ã®å ã®é床ïŒã200 km / msïŒãåå ã§ãã
-ãããã¯ãŒã¯ãŸãã¯ããã€ã¹ã®éè² è·æã«è¿œå ã®é 延ãçºçããå ŽåããããŸãïŒãµãŒããŒãã«ãŒã¿ãŒãPCïŒã
-ãã±ããæ倱ãæ€åºãããå Žåã®èªåã¹ããŒããŠã³ïŒæšæºTCP茻茳åé¿ã¡ã«ããºã ïŒã
-ä»ã®æªåœ±é¿ããªãïŒç©çã¬ãã«ã§ã®ããããšã©ãŒã®æå°æ°ïŒããããšã©ãŒç<10 ^ -8ïŒã
-ãããã¯ãŒã¯ã«ãŒãã®æ£åžžæ§ãšãã©ã€ããŒã®æ£ããæäœïŒã
-1ã€ã®ç©çãªã³ã¯ã§å€æ°ã®åæTCPæ¥ç¶ãäŒéã§ããŸãã
-1ã€ã®ãã¹ãã¯ãåããªã¢ãŒããã¹ãã§ãã£ãŠããè€æ°ã®åææ¥ç¶ãè¡ãããšãã§ããŸãïŒ TCPViewãŸãã¯TCPEyeã§ãã°ãã確èªã§ããŸãïŒã
人æ°ã®ããã¹ããŒããã¹ãã¯éåžžââãå€ãã®ãã©ãŠã¶ã§åäœãããã©ãã·ã¥+æå¯ãã®å©çšå¯èœãªãµãŒããŒãžã®ãžãªãã±ãŒã·ã§ã³ã«ããã次ã®ãã®ãäœæãããŸãã
-ããŒã«ã«ãã·ã³ïŒCPUãã¡ã¢ãªïŒããã³ãããã¯ãŒã¯ïŒWWWããããŒãªã©ïŒã®è¿œå è² è·ã
-ãµãŒããŒã®éžæãæé©ã§ãªãå ŽåããããŸãã
-誀ã£ãçµæã®å¯èœæ§ã
æåŸã«ããããã¯ãŒã¯ããã©ãŒãã³ã¹ãäœãå Žåã«é »ç¹ã«çºçããåé¡ã«æ³šç®ããŸãã
-çãTCPãŠã£ã³ããŠïŒãŠã£ã³ããŠãµã€ãºïŒã
-ã€ãŒãµããããã¥ãã¬ãã¯ã¹ã®äžäžèŽã
-ãããã¯ãŒã¯ã±ãŒãã«ãäžè¯ã§ãã
é¢é£ãªã³ã¯ïŒ
technet.microsoft.com/en-us/magazine/2007.01.cableguy.aspx
fasterdata.es.net/fasterdata/host-tuning