
I am not sure if everyone received my message on the mailing list so I am pasting my email here.
****
Hello,
I was trying to use the PionWebServer utility, I basically modified one of the examples to return an XML. If I hit the service through the browser I get results quickly and there is no load on the server, I put more load on the server by hitting it from other machines through curl. The server responds to all the curl requests but it continues to consume 299% cpu even after all the curl processes have finished. (see output of 'top' below).
30172 root 15 0 344m 95m 2720 S 299.5 0.3 6634:33 PionWebServer
I ran a strace on this pid and I see that the sockets were still getting recvmsg calls and that the request contained some junk data, see below.
strace -p 30172 -f -e trace=recvmsg,sendmsg -o strace.out
snippet from strace.out.
30172 recvmsg(13, {msg_name(0)=NULL, msg_iov(1)=[{"test89test89test10"..., 8192}], msg_controllen=0, msg_flags=0}, 0) = 0
30172 recvmsg(15, {msg_name(0)=NULL, msg_iov(1)=[{"test89test89test89

Sorry for the late reply. I wanted to be able to try a similar test but was out for the holidays..
I just tried running a similar test using Jmeter (running on a separate machine) to hammer the PionWebServer (running on an 8-core machine) with as many requests as possible. PionWebServer was started using the included testservices.conf, and I setup Jmeter to make two requests across 10 threads and loop forever:
CPU usage was around 750% across 9 threads to easily handle about 2000 requests per second. After I stopped the traffic in Jmeter, PionWebServer's CPU usage immediately dropped to and stayed at zero. Memory usage remained constant at about 18 MB.
So, all looks good to me. Are you doing anything to modify the source code, or just pointing it as-is to a directory containing XML files? What OS/compiler/version-of-Boost are you using?
-Mike
- reply
Submitted by Mike Dickey on Mon, 01/04/2010 - 14:55.Mike,
Chris have updated asio implementation as per following announcement http://permalink.gmane.org/gmane.comp.lib.boost.asio.user/3854
So probably it should reduce CPU usage on new implementation of asio.
- Sergey
- reply
Submitted by snikulov on Wed, 03/31/2010 - 06:21.Post new comment