Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Curl/Perl http post performanc issue

Reply
Thread Tools

Curl/Perl http post performanc issue

 
 
wkhedr
Guest
Posts: n/a
 
      08-03-2006
We have a Perl program that has to do thousands of secure http post
requests to a web server as efficient as we could.
The web server sends back a big XML structure in every request.

We used Curl because it allowed us to deal with secured requests.

Curl by default uses http 1.1.

When we ask Curl to use http 1.0, we get average response time of 40
millisecond during our stress tests.

The response time is good but the problem is it's not releasing the
CPU's while waiting for the response. It's supposed to be like a disk
I/O where it should not be using the CPU. So the CPU utilization goes
up to 99% with multithreads of testing.

When we run the tests using http 1.1, the response time was 2 seconds


Using http 1.1 and asking Curl to disable "Expect: 100-continue" by
using header "Expect:",
we were able to reach response time of 120 milliseconds and the CPU
usage was cut by almost 90%.

The question is: how can we get the best of the two settings: have the
same low CPU usage as http 1.1 and reduce the response time from 120 ms
to 40 ms as http 1.0?

Thanks

 
Reply With Quote
 
 
 
 
it_says_BALLS_on_your forehead
Guest
Posts: n/a
 
      08-03-2006

wkhedr wrote:
> We have a Perl program that has to do thousands of secure http post
> requests to a web server as efficient as we could.
> The web server sends back a big XML structure in every request.
>
> We used Curl because it allowed us to deal with secured requests.
>
> Curl by default uses http 1.1.
>
> When we ask Curl to use http 1.0, we get average response time of 40
> millisecond during our stress tests.
>
> The response time is good but the problem is it's not releasing the
> CPU's while waiting for the response. It's supposed to be like a disk
> I/O where it should not be using the CPU. So the CPU utilization goes
> up to 99% with multithreads of testing.
>
> When we run the tests using http 1.1, the response time was 2 seconds
>
>
> Using http 1.1 and asking Curl to disable "Expect: 100-continue" by
> using header "Expect:",
> we were able to reach response time of 120 milliseconds and the CPU
> usage was cut by almost 90%.
>
> The question is: how can we get the best of the two settings: have the
> same low CPU usage as http 1.1 and reduce the response time from 120 ms
> to 40 ms as http 1.0?



p.s. the version of curl is:
$ ./curl --version
curl 7.15.4 (powerpc-ibm-aix5.2.0.0) libcurl/7.15.4 OpenSSL/0.9.8b
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: IPv6 Largefile NTLM SSL

and the Perl module we are using is:
WWW::Curl::Easy 3.01

 
Reply With Quote
 
 
 
 
Ben Morrow
Guest
Posts: n/a
 
      08-03-2006

Quoth "wkhedr" <>:
> We have a Perl program that has to do thousands of secure http post
> requests to a web server as efficient as we could.
> The web server sends back a big XML structure in every request.
>
> We used Curl because it allowed us to deal with secured requests.


Have you tried using LWP?

> Curl by default uses http 1.1.
>
> When we ask Curl to use http 1.0, we get average response time of 40
> millisecond during our stress tests.
>
> The response time is good but the problem is it's not releasing the
> CPU's while waiting for the response. It's supposed to be like a disk
> I/O where it should not be using the CPU. So the CPU utilization goes
> up to 99% with multithreads of testing.
>
> When we run the tests using http 1.1, the response time was 2 seconds
>
>
> Using http 1.1 and asking Curl to disable "Expect: 100-continue" by
> using header "Expect:",
> we were able to reach response time of 120 milliseconds and the CPU
> usage was cut by almost 90%.
>
> The question is: how can we get the best of the two settings: have the
> same low CPU usage as http 1.1 and reduce the response time from 120 ms
> to 40 ms as http 1.0?


The rest of this is not really relevant to Perl, and would be better
asked on some Curl-related list or group.

Ben

--
I must not fear. Fear is the mind-killer. I will face my fear and
I will let it pass through me. When the fear is gone there will be
nothing. Only I will remain.
Frank Herbert, 'Dune'
 
Reply With Quote
 
wkhedr
Guest
Posts: n/a
 
      08-03-2006
LWP did the same numbers 120ms!


Ben Morrow wrote:
> Quoth "wkhedr" <>:
> > We have a Perl program that has to do thousands of secure http post
> > requests to a web server as efficient as we could.
> > The web server sends back a big XML structure in every request.
> >
> > We used Curl because it allowed us to deal with secured requests.

>
> Have you tried using LWP?
>
> > Curl by default uses http 1.1.
> >
> > When we ask Curl to use http 1.0, we get average response time of 40
> > millisecond during our stress tests.
> >
> > The response time is good but the problem is it's not releasing the
> > CPU's while waiting for the response. It's supposed to be like a disk
> > I/O where it should not be using the CPU. So the CPU utilization goes
> > up to 99% with multithreads of testing.
> >
> > When we run the tests using http 1.1, the response time was 2 seconds
> >
> >
> > Using http 1.1 and asking Curl to disable "Expect: 100-continue" by
> > using header "Expect:",
> > we were able to reach response time of 120 milliseconds and the CPU
> > usage was cut by almost 90%.
> >
> > The question is: how can we get the best of the two settings: have the
> > same low CPU usage as http 1.1 and reduce the response time from 120 ms
> > to 40 ms as http 1.0?

>
> The rest of this is not really relevant to Perl, and would be better
> asked on some Curl-related list or group.
>
> Ben
>
> --
> I must not fear. Fear is the mind-killer. I will face my fear and
> I will let it pass through me. When the fear is gone there will be
> nothing. Only I will remain.
> Frank Herbert, 'Dune'


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Http post and http get n3d!m Python 2 02-06-2012 09:18 PM
HTTP SOAP/HTTP GET/HTTP POST milan_9211 Software 0 01-10-2011 02:10 PM
Why getInputStream in a http servlet request isn't getting the datasent by browser HTTP POST action? James Java 3 11-25-2005 11:17 PM
HTTP GET vs HTTP POST protocol serge calderara ASP .Net Web Services 1 11-04-2005 01:27 PM
How to enter to .aspx page by http connection using http POST request farazkazmi@gmail.com Java 6 08-29-2005 02:58 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57