cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Performance problem

From: Stefan Sassenberg <stefan.sassenberg_at_gmx.de>
Date: Fri, 21 Nov 2003 14:11:40 +0100

Daniel Stenberg wrote:

>On Fri, 21 Nov 2003, Stefan Sassenberg wrote:
>
>
>
>>I want to send 100 files, 5 files a second which should take about 20
>>seconds time. The server is fast enough (tested with command line 'ftp').
>>Each file has a size of appr. 70kB. The output below shows the first part of
>>the libcurl log. At the lines where I inserted 'BREAK' the output is delayed
>>for about 4.5 seconds. What can I do? The same code also works faster on
>>other servers.
>>
>>
>
>As the output shows, the TCP connects to this server are really slow. The fact
>that you don't see this hit on other servers also indicates that the server is
>to blame for this slowness.
>
>
>
>>< 227 Entering Passive Mode (194,95,172,11,197,85)
>>* About to connect() to 194.95.172.11:50517
>>BREAK
>>* Connecting to 194.95.172.11 (194.95.172.11) port 50517
>>
>>
>
>See? The 'Entering Passive Mode' is when the server says it has a port open
>for libcurl to connect to, and when the 'Connecting to 194.95.172.11' text
>shows up, libcurl has finished connecting. The time between those events are
>spent waiting for the TCP handshake.
>
>I guess an analyze of what is sent over the wire could reveal some more
>details (on TCP level).
>
>
>
Thank your for your advice. The result is as follows. As I see it, the
handshaking is done quite quickly (frames 43-64) but there are DNS
queries and an ICMP package that I can't explain and that stop all the
traffic for 1.5 seconds. This is repeated three times before the next
ftp command is sent (frame 56). Those DNS queries start in frame 47.
Strange.

Stefan

----------------------------- Frame ID: 41 -----------------------------
Frame arrived at 11/21 13:08:29.173897, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
12.0.0.1 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=TCP ID=20550 LEN=46:
TCP SP=1357 DP=21 SEQ=82919301 ACK=2069981042 LEN=6 WS=16215 PSH:
FTP C Port=1357 PASV
:

----------------------------- Frame ID: 42 -----------------------------
Frame arrived at 11/21 13:08:29.177847, Frame Status: (Good Frame)
00B0648A8B31 --> 0050FCA3F258
194.95.172.11 --> 12.0.0.1
Ev2 ET=0x0800:
IP PRO=TCP ID=14258 LEN=91:
TCP SP=21 DP=1357 SEQ=2069981042 ACK=82919307 LEN=51 WS=57960 PSH:
FTP R Port=1357 227 Entering Passive Mode:

----------------------------- Frame ID: 43 -----------------------------
Frame arrived at 11/21 13:08:29.178386, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
12.0.0.1 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=TCP ID=20551 LEN=48:
TCP SP=1359 DP=50615 SYN SEQ=84321986 ACK=0 LEN=0 WS=16384 OPT:

----------------------------- Frame ID: 44 -----------------------------
Frame arrived at 11/21 13:08:29.181900, Frame Status: (Good Frame)
00B0648A8B31 --> 0050FCA3F258
194.95.172.11 --> 12.0.0.1
Ev2 ET=0x0800:
IP PRO=TCP ID=14259 LEN=44:
TCP SP=50615 DP=1359 SYN SEQ=1721827892 ACK=84321987 LEN=0 WS=57344 OPT:

----------------------------- Frame ID: 45 -----------------------------
Frame arrived at 11/21 13:08:29.181956, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
12.0.0.1 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=TCP ID=20552 LEN=40:
TCP SP=1359 DP=50615 SEQ=84321987 ACK=1721827893 LEN=0 WS=16560 :

----------------------------- Frame ID: 46 -----------------------------
Frame arrived at 11/21 13:08:29.331142, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
12.0.0.1 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=TCP ID=20553 LEN=40:
TCP SP=1357 DP=21 SEQ=82919307 ACK=2069981093 LEN=0 WS=16164 :

----------------------------- Frame ID: 47 -----------------------------
Frame arrived at 11/21 13:08:29.428574, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
12.0.0.1 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=UDP ID=20554 LEN=78:
UDP SP=137 DP=137 LEN=58:
DNS C ID=36227 OP=Query QN=*:

----------------------------- Frame ID: 48 -----------------------------
Frame arrived at 11/21 13:08:29.428654, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
11.11.0.2 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=UDP ID=20555 LEN=78:
UDP SP=137 DP=137 LEN=58:
DNS C ID=36229 OP=Query QN=*:

----------------------------- Frame ID: 49 -----------------------------
Frame arrived at 11/21 13:08:29.432403, Frame Status: (Good Frame)
00B0648A8B31 --> 0050FCA3F258
141.16.81.70 --> 12.0.0.1
Ev2 ET=0x0800:
IP PRO=ICMP ID=41540 LEN=56:
ICMP Communication Administratively Prohibitated by Filtering:

----------------------------- Frame ID: 50 -----------------------------
Frame arrived at 11/21 13:08:30.927941, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
12.0.0.1 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=UDP ID=20556 LEN=78:
UDP SP=137 DP=137 LEN=58:
DNS C ID=36231 OP=Query QN=*:

----------------------------- Frame ID: 51 -----------------------------
Frame arrived at 11/21 13:08:30.928019, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
11.11.0.2 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=UDP ID=20557 LEN=78:
UDP SP=137 DP=137 LEN=58:
DNS C ID=36233 OP=Query QN=*:

----------------------------- Frame ID: 52 -----------------------------
Frame arrived at 11/21 13:08:30.931784, Frame Status: (Good Frame)
00B0648A8B31 --> 0050FCA3F258
141.16.81.70 --> 12.0.0.1
Ev2 ET=0x0800:
IP PRO=ICMP ID=41541 LEN=56:
ICMP Communication Administratively Prohibitated by Filtering:

----------------------------- Frame ID: 53 -----------------------------
Frame arrived at 11/21 13:08:32.428009, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
12.0.0.1 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=UDP ID=20558 LEN=78:
UDP SP=137 DP=137 LEN=58:
DNS C ID=36235 OP=Query QN=*:

----------------------------- Frame ID: 54 -----------------------------
Frame arrived at 11/21 13:08:32.428087, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
11.11.0.2 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=UDP ID=20559 LEN=78:
UDP SP=137 DP=137 LEN=58:
DNS C ID=36237 OP=Query QN=*:

----------------------------- Frame ID: 55 -----------------------------
Frame arrived at 11/21 13:08:32.431833, Frame Status: (Good Frame)
00B0648A8B31 --> 0050FCA3F258
141.16.81.70 --> 12.0.0.1
Ev2 ET=0x0800:
IP PRO=ICMP ID=41546 LEN=56:
ICMP Communication Administratively Prohibitated by Filtering:

----------------------------- Frame ID: 56 -----------------------------
Frame arrived at 11/21 13:08:33.928546, Frame Status: (Good Frame)
0050FCA3F258 --> 00B0648A8B31
12.0.0.1 --> 194.95.172.11
Ev2 ET=0x0800:
IP PRO=TCP ID=20560 LEN=48:
TCP SP=1357 DP=21 SEQ=82919307 ACK=2069981093 LEN=8 WS=16164 PSH:
FTP C Port=1357 TYPE I
:

----------------------------- Frame ID: 57 -----------------------------
Frame arrived at 11/21 13:08:33.932312, Frame Status: (Good Frame)
00B0648A8B31 --> 0050FCA3F258
194.95.172.11 --> 12.0.0.1
Ev2 ET=0x0800:
IP PRO=TCP ID=14260 LEN=60:
TCP SP=21 DP=1357 SEQ=2069981093 ACK=82919315 LEN=20 WS=57960 PSH:
FTP R Port=1357 200 Type set to I.
:

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Received on 2003-11-21