[Libwebsockets] lws_write speed

Andy Green andy at warmcat.com
Thu May 19 11:22:58 CEST 2016

On 05/19/2016 05:03 PM, Roger Light wrote:
> On Thu, May 19, 2016 at 3:05 AM, Andy Green <andy at warmcat.com> wrote:
>> The surprising thing is the kernel ever took 1MB for a non-127.x.x.x
>> address.  I guess it did it at the very start.
> I know! I had to double check I'd not sent it to localhost.
> There were a load of large writes at the beginning and at the end with
> just a couple in the middle. There's a plot here:
> http://tmp.atchoo.org/write.png

It's interesting, thanks... I think there is maybe some variation in 
time explaining when it's 'hungry'... for example at write 550 and write 
1150 or so he suddenly feels he can take 1MB again... it would make 
sense if some small time passed with lws not writing for a period just 
before that and the pipe got completely drained.

Unfortunately if some scheme is trying to estimate that, he doesn't know 
if the time passed because of something else, indicating the pipe may 
have drained in the meanwhile, or because no acks came and it took a 
long while before he got the writable callback again because the pipe is 


> Cheers,
> Roger

More information about the Libwebsockets mailing list