cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libCurl taking long time to download

From: <johansen_at_sun.com>
Date: Thu, 3 Sep 2009 16:48:05 -0700

On Thu, Sep 03, 2009 at 04:53:18PM -0400, Sandeep R M wrote:
> Hi Daniel,
>
> I was just trying to see which is the best option available, so I had to
> conduct this test.
>
> Solaris version being used is,
> SunOS test 5.10 Generic_127111-09 sun4u sparc SUNW,SPARC-Enterprise
> I am using curl version 7.19.0 (we only have this version available
> currently).

I get nearly identical times for curl and wget, with curl using less sys
time:

curl

----
real       13.384214331
user        0.032008191
sys         0.050414150
wget
----
real       13.108820703
user        0.029270086
sys         0.118620616
Given your high real times compared to the low user/sys time, it seems
like your application is probably spending a lot of time blocking.
Since you're on Solaris 10, you can look at this with DTrace.
On my system the output looks like this:
              genunix`cv_timedwait_sig_hires+0x1db
              genunix`cv_timedwait_sig+0x32
              rpcmod`clnt_cots_kcallit+0x697
              nfs`nfs4_rfscall+0x418
              nfs`rfs4call+0xb6
              nfs`nfs4lookupvalidate_otw+0x267
              nfs`nfs4lookup+0x1f7
              nfs`nfs4_lookup+0xe3
              genunix`fop_lookup+0xed
              genunix`lookuppnvp+0x3a3
              genunix`lookuppnatcred+0x11b
              genunix`lookupnameatcred+0x98
              genunix`lookupnameat+0x69
              genunix`vn_openat+0x232
              genunix`copen+0x418
              genunix`open64+0x34
              unix`_sys_sysenter_post_swapgs+0x149
           378570
              genunix`shuttle_resume+0x328
              doorfs`door_call+0x2b1
              doorfs`doorfs32+0x141
              unix`_sys_sysenter_post_swapgs+0x149
          8213468
              genunix`cv_timedwait_sig_hires+0x1db
              genunix`cv_waituntil_sig+0xba
              genunix`poll_common+0x461
              genunix`pollsys+0xe4
              unix`_sys_sysenter_post_swapgs+0x149
      13608004750
The values are in nanoseconds, so the interesting stack here is the last
one, which accounts for 13.6 seconds.  In this case, I'm performing a
cv_timedwait_sig in the kernel.  Essentially, I'm waiting in poll for a
socket to become readable.  The door call is a call into NSCD for name
resolution, and the nfs4 call is to my home directory to load the dtrace
script.
I'm attaching the D-script that I used as sleepers.d.  In order to run
this, I had dtrace priviliege, which in this case meant I was root.
	# dtrace -s sleepers.d -c "<curl command>"
Hope this helps.
-j

Received on 2009-09-04