Download presentation
Presentation is loading. Please wait.
Published byCaitlin Patrick Modified over 9 years ago
1
Pavel Cimbál, Sven Ubik CESNET TNC2005, Poznan, 9 June 2005 Tools for TCP performance debugging
2
Monitoring Looking for performance limitations in different places requires different monitoring approaches communication segmentmonitoring type available bandwidth in networkactive & passive faulty network componentactive transport protocol behaviour*passive & end-host PC hardware performanceend-host application & OS overheadend-host * subject of this talk
3
TCP monitoring TCP performance debugging tools: tcpdump + tcptrace + xplot requires root access, follow-up analysis loads CPU, can miss packets bulk AIMD patch
4
Bulk tool bulk: achievable throughput measurement (iperf-like) + synchronous monitoring of TCP runtime variables Reads kernel variables after each write() or read() call Does not require any kernel patch or root access Real-time analysis Low CPU overhead Can work together with AIMD patch to get more information and to configure AIMD
5
Using bulk tool Server side: bulk Client side: bulk –c Set any socket option at any level: -s, [, [, …]] Get any socket option at any level: -g, [, [, …]]
6
Option names for SOL_TCP level: "TCP_NODELAY","TCP_MAXSEG","TCP_CORK","TCP_KEEPIDLE", "TCP_KEEPINTVL","TCP_KEEPCNT","TCP_SYNCNT","TCP_LINGER2", "TCP_DEFER_ACCEPT","TCP_WINDOW_CLAMP","TCP_INFO","TCP_QUICKACK" Option members for TCP_INFO option: "state","ca_state","retransmits","probes","backoff","options", "wscales","rto","ato","snd_mss","rcv_mss","unacked","sacked", "lost","retrans","fackets","last_data_sent","last_ack_sent", "last_data_recv","last_ack_recv","pmtu","rcv_ssthresh","rtt", "rttvar","snd_ssthresh","snd_cwnd","advmss","reordering" Selected options to query
7
cwnd, ssthresh monitoring bulk –gTCP_INFO,snd_cwnd,snd_ssthresh
8
Checking window scaling 195.113.147.2.50622 > 130.59.35.14.3141: S 1245641034:1245641034> (0) win 5840 130.59.35.14.3141 > 195.113.147.2.50622: S 3938568209:3938568209> (0) ack 1245641035 win 17896 898882455,nop, wscale 7> bulk –gTCP_INFO,wscales 71 = 0x47, client wscale: 4, server wscale: 7
9
Bulk selected switches -rreverse transfer, server to client -b block size for write(), read(), adjusts result granularity!! -c number of connections in sequence and/or in parallel -mparallel mode
10
Added CPU load % time seconds usecs/call calls syscall ------ ----------- ----------- --------- -------------- 81.53 4.148857 61 67595 write 8.45 0.429789 6 66916 getsockopt 4.97 0.253101 4 66918 gettimeofday 0.00 0.000253 253 1 poll strace –c bulk –gTCP_INFO,... sending data monitoring (+some user space load) with bigger block size (-b) monitoring is less frequent
11
Configuration of AIMD(x,y) parameters cwnd=cwnd+x*MSSper ACK cwnd=cwnd*yper packet loss Congestion Window Validation (CWV) and Congestion Window Reduction (CWR) on / off / monitoring Works on a per-socket or per-system basis Available for Linux 2.4 and 2.6 AIMD patch
12
Example of per-system configuration: sysctl –w net/ipv4/tcp_aimd 100 50 1 1 100% additive increase, 50% multiplicative decrease, CWV on, CWR on AIMD patch, cont.
13
Example of per-socket configuration: struct tcp_aimd aimd; aimd.slope=100; aimd.ratio=50; aimd.cwven=1; aimd.cvwren=1; setsockopt(sockfd, SOCK_TCP, TCP_AIMD, &aimd, sizeof(aimd)); AIMD patch, cont.
14
AIMD tuning cesnet.cz → switch.ch, RTT=40 ms, win=4MB aggressiveness vs. responsiveness vs. fairness
15
Download bulk + AIMD patch at: www.ces.net/project/qosip#bulk Future directions: Add hardware end-host monitoring (using PAPI and other tools) Downloadable PC monitoring agent Download and future work
16
Pavel Cimbal Sven Ubik Thank you for your attention
17
Backup slides
18
Per-socket monitoring: struct tcp_counters counters; wsize=sizeof(counters); getsockopt(sockfd, SOCK_TCP, TCP_COUNTER, &counters, &wsize); AIMD patch, cont.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.