[Libwebsockets] Performance issues with LWS

Andy Green andy at warmcat.com
Fri Oct 3 20:58:54 CEST 2014



On 4 October 2014 03:48:18 GMT+09:00, SriHarsha <mynameissriharsha at gmail.com> wrote:
>Firstly thank you so much for getting back to me.
>
>Secondly, I am running the server on a Mac. I am looking at the
>Activity
>Monitor.app to get the memory used by the process.

I never used a mac so it means nothing to me.

But typically the os can tell you many things about the process like vm pages allocated.  That is NOT telling you what is in use or freed by malloc in lws.

So if you think there is a problem you need to instrument the frees and allocs somehow, or look at allocations from your user code.

Waving some os number you don't even know what it means around is almost completely information-free.

-Andy

>Thank you,
>Harsha
>
>
>
>On Fri, Oct 3, 2014 at 11:33 AM, Andy Green <andy at warmcat.com> wrote:
>
>>
>>
>> On 4 October 2014 02:42:20 GMT+09:00, SriHarsha <
>> mynameissriharsha at gmail.com> wrote:
>> >I have some test javascript code that just creates a web socket a
>few
>> >times
>> >(100 for instance) and onopen it calls close.
>> >
>> >I am running the test-server code to create and service the web
>> >sockets.
>> >
>> >I see that the memory used by the test-server never goes down. It
>keeps
>> >going up.
>>
>> How are you measuring 'memory used'?  Because that's a bit of a
>slippery
>> concept.
>>
>> >However, when I run leaks on the process it reports that there are
>no
>> >leaks.
>> >
>> >The only thing I can think of is that the LWS context is holding
>onto
>> >all
>> >of the memory and never frees it. Has anyone seen this issue ?
>>
>> When the connection closes the memory used for that is freed.
>>
>> Whether that impacts 'memory used' whatever that means depends on
>your
>> malloc and os Implementation.
>>
>> I think you find there is no problem in lws about this.
>>
>> -Andy
>>
>> >Any help please ?
>> >
>> >Thank you,
>> >Harsha
>> >
>> >
>>
>>------------------------------------------------------------------------
>> >
>> >_______________________________________________
>> >Libwebsockets mailing list
>> >Libwebsockets at ml.libwebsockets.org
>> >http://ml.libwebsockets.org/mailman/listinfo/libwebsockets
>>
>>




More information about the Libwebsockets mailing list