hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergio Berna <sbe...@extendnow.com>
Subject RE: HttpClient and CPU usage.....
Date Wed, 26 Mar 2003 08:15:01 GMT
Can you describe the algorithm your application is performing?

Im asking because it seems to me that all the algorithm time is spent on the
native socket classes from the jdk and not from the httpclient.

If so you should consider some sort of caching to improve your performance.



-----Mensaje original-----
De: Ken Clark [mailto:mkclark9@mindspring.com]
Enviado el: miƩrcoles, 26 de marzo de 2003 6:26
Para: commons-httpclient-dev@jakarta.apache.org
Asunto: HttpClient and CPU usage.....


I've built a b2b application using the commons HttpClient, and all works
extremely well.  The problem is, however, that the app is using up to 45% of
the CPU time ( as reported by various unix processes ( ps -aux, vmstat,
etc ) ).  The customer has a Sun 4500, running solaris, with two processors.

I've tried debugging the app's CPU usage using the -Xrunhprof:cpu=samples
parameter in the VM, and it returns the "hot spots" for CPU usage :

   1 74.67% 74.67% java/net/SocketInputStream.read      ([BII)I
   2  9.61% 84.28% java/net/PlainSocketImpl.available   ()I
   3  8.51% 92.79% java/net/PlainSocketImpl.doConnect
(Ljava/net/InetAddress;I)V

everything else is using less than 0.50% of the VMs CPU.

Since I'm not using these classes directly, I'm assuming that HttpClient is.
How can I make my app use less of the CPU?


---------------------------------------------------------------------
To unsubscribe, e-mail:
commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail:
commons-httpclient-dev-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message