[Libwebsockets] Thread pool example and performance

sas spss sas2016spss at gmail.com
Tue Apr 27 20:42:41 CEST 2021


Hi, I am checking the service thread example of http server eventlib in
v4.2 stable:
https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/http-server/minimal-http-server-eventlib-smp?h=v4.2-stable

It has a warning on top : "this is under development, it's not stable".
What part of this example is not stable ?

Another question:

In a general situation of a high load https server on internet, serving
data from memory ( 2k -200K in request / response size) after some
calculations (for example, sort, search in linked list with 10k - 100K
items), with sufficient physical memory and CPU cores, and with the
consideration of pthread mutux lock/unlock, context switch overhead, which
model of libwebsocket will perform better: single thread model with event
lib,  1 main thread for business logic (sort, search) + 1 dedicated thread
for network I/O,  or the thread pool one ?    Thanks.

- Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20210427/c25cf678/attachment.htm>


More information about the Libwebsockets mailing list