[Libwebsockets] libwebsockets is taking 50% cpu cycle after serving one http connection

"Andy Green (林安廸)" andy at warmcat.com
Wed Nov 13 01:09:42 CET 2013


On 11/11/13 20:45, the mail apparently from bjorka adinov included:
> Hello Andy,
>
> I used 'very sleepy' to profile the test-server sample. From the result
> I concluded the culprit was WSAPOS. I check your code and turned out you

WSAPOS is a good name ^^

> provide alternative function, so I utilized it and likely the symptom
> has gone.

Great, glad you're sorted.

-Andy

> Thanks
>
>
> On Mon, Nov 4, 2013 at 1:07 PM, bjorka adinov <adinov.bjorka at gmail.com
> <mailto:adinov.bjorka at gmail.com>> wrote:
>
>     Thanks for the reply.
>
>     I tried with the 1.23 version, compiled using Visual Studio 10
>     Express, projects generated using CMAKE 2.8. The symptom is still
>     there, usually immediately after I opened the second window (using
>     Chrome, dumb-increment only). I try this on other PC and the problem
>     also occurred. Any help will be greatly appreciated, also I can
>     provide you with necessary data to reproduce this.
>
>
>
>     On Mon, Nov 4, 2013 at 9:39 AM, "Andy Green (林安廸)"
>     <andy at warmcat.com <mailto:andy at warmcat.com>> wrote:
>
>         On 31/10/13 15:41, the mail apparently from bjorka adinov included:
>
>             Hello Andy,
>
>             I managed to compiled and ran test_server sample (from ver.
>             1.22) using
>             Visual Studio 2008 compiler (My OS is windows 7 home premium). I
>             accessed http://localhost:7681 and it was functioning well, the
>             dumb_increment protocol worked (the counter number was
>             running), and the
>             lws_mirror also working ( I can draw shapes).
>
>             Unfortunately the application consumed 50% cycle of my CPU
>             (Core 2 Duo
>             2,5 GHZ). I tried to modify test.html file, make it only
>             serves static
>             html page and no javascript whatsoever and the problem
>             persist. After
>             few seconds, the cpu cycle will always go to 50%.
>
>
>         Well libwebsockets should show almost 0% CPU if idle or even
>         just doing the dumb increment.
>
>         Please try 1.23 or current git head and see if it's any diffferent.
>
>         No need to modify the test apps, they should show the 0%
>         behaviour or something is wrong.
>
>         -Andy
>
>             Any advice will be greatly appreciated
>
>             Thanks
>
>
>             _________________________________________________
>             Libwebsockets mailing list
>             Libwebsockets at ml.__libwebsockets.org
>             <mailto:Libwebsockets at ml.libwebsockets.org>
>             http://ml.libwebsockets.org/__mailman/listinfo/libwebsockets
>             <http://ml.libwebsockets.org/mailman/listinfo/libwebsockets>
>
>
>
>




More information about the Libwebsockets mailing list