Benchmarks #297
Replies: 9 comments
-
If you're benchmarking file serving, it's partially in lwan-cache and
lwan-mod-serve-files. If you're doing that, then there's no caching.
…On Wed, Nov 25, 2020, 10:36 Justin ***@***.***> wrote:
Hi Leandro,
I ran some benchmarks on LWAN and realized subsequent requests appear to
be much faster than the first.
Which part of the codes does this "caching" ?
Thank You
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/lpereira/lwan/issues/297>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADVGJQH7SHYUXEPXZQNQLSRVE3DANCNFSM4UCYF5UA>
.
|
Beta Was this translation helpful? Give feedback.
-
I see, what about Normal API calls ? Would it be due to object initialization ? I noticed that if left running and not called for a while, when the web server is called again for the first time, there is a slight drop in latency with the subsequnet requests being faster once again. Eg. |
Beta Was this translation helpful? Give feedback.
-
Is the pause necessary to observe this behavior? Because if you do use
keep-alive connections, a lot of memory will be kept around (and
reallocated as soon as the connection is closed). This includes stack space
for coroutines, response buffers, etc.
…On Wed, Nov 25, 2020, 17:18 Justin ***@***.***> wrote:
I see, what about Normal API calls ? Would it be due to object
initialization ? I noticed that if left running and not called for a while,
when the web server is called again for the first time, there is a slight
drop in latency with the subsequnet requests being faster once again.
Eg. START 9ms 3ms 3ms 3ms 3ms LONG BREAK 9ms 3ms 3ms 3ms
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/lpereira/lwan/issues/297#issuecomment-734018767>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADVGMTFEIOLYJBM5ZYDB3SRWUFXANCNFSM4UCYF5UA>
.
|
Beta Was this translation helpful? Give feedback.
-
I see, Thanks for the reply, think that clears that up. Was studying Lwan's code, out of curiosity, could u explain what concurrency model does lwan use ? |
Beta Was this translation helpful? Give feedback.
-
While a bit outdated, this might help you understand how it works:
https://tia.mat.br/posts/2014/10/06/life_of_a_http_request.html
The model is closer to a reactor model (non-blocking sockets, multiple
threads each one blocking on epoll(), etc.) than a proactor but I don't
really know for sure. Never really studied these things.
…On Fri, Nov 27, 2020 at 8:47 AM Justin ***@***.***> wrote:
I see, Thanks for the reply, think that clears that up.
Was studying Lwan's code, out of curiosity, what concurrency model does
lwan use (proactor/reactor etc..) ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/lpereira/lwan/issues/297#issuecomment-734718623>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADVGPOOLNNDFZJMBAZJHDSR5RQLANCNFSM4UCYF5UA>
.
--
Leandro
|
Beta Was this translation helpful? Give feedback.
-
Thank You for the clarification. Is it possible to modify the url_map run time ? via referencing the map as a pointer ? |
Beta Was this translation helpful? Give feedback.
-
Possible? Yes. Recommended? No.
…On Fri, Nov 27, 2020, 10:08 Justin ***@***.***> wrote:
Thank You for the clarification.
Is it possible to modify the url_map run time ? via referencing the map as
a pointer ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/lpereira/lwan/issues/297#issuecomment-734941569>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADVGM6LCINLOIY76JLZATSR7TI5ANCNFSM4UCYF5UA>
.
|
Beta Was this translation helpful? Give feedback.
-
I see, is there a performance penalty for doing that ? |
Beta Was this translation helpful? Give feedback.
-
No -- it might make Lwan use deallocated memory if a request comes in. At
best this will crash.
…On Sat, Nov 28, 2020 at 4:00 PM Justin ***@***.***> wrote:
I see, is there a performance penalty for doing that ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/lpereira/lwan/issues/297#issuecomment-735248753>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADVGIS4ZJVRBKKM45GHDDSSENAPANCNFSM4UCYF5UA>
.
--
Leandro
|
Beta Was this translation helpful? Give feedback.
-
Hi Leandro (@lpereira),
I ran some benchmarks on LWAN and realized subsequent requests appear to be much faster than the first.
Which part of the codes does this "caching" ?
Thank You
Beta Was this translation helpful? Give feedback.
All reactions