Comparison

net/server_epoll.lua @ 11694:d6be4dda1f60

net.server_epoll: Set minimum wait time to 1ms, matching epoll A timeout value less than 0.001 gets turned into zero on the C side, so epoll_wait() returns instantly and essentially busy-loops up to 1ms, e.g. when a timer event ends up scheduled (0, 0.001)ms into the future. Unsure if this has much effect in practice, but it may waste a small amount of CPU time. How much would depend on how often this ends up happening and how fast the CPU gets trough main loop iterations.
author Kim Alvefur <zash@zash.se>
date Thu, 15 Jul 2021 01:38:44 +0200
parent 11689:f9f6e82fb572
child 11695:1573099157c9
comparison
equal deleted inserted replaced
11693:7c03b1f4c388 11694:d6be4dda1f60
63 -- Timeout used during between steps in TLS handshakes 63 -- Timeout used during between steps in TLS handshakes
64 ssl_handshake_timeout = 60; 64 ssl_handshake_timeout = 60;
65 65
66 -- Maximum and minimum amount of time to sleep waiting for events (adjusted for pending timers) 66 -- Maximum and minimum amount of time to sleep waiting for events (adjusted for pending timers)
67 max_wait = 86400; 67 max_wait = 86400;
68 min_wait = 1e-06; 68 min_wait = 0.001;
69 69
70 -- Enable extra noisy debug logging 70 -- Enable extra noisy debug logging
71 -- TODO disable once considered stable 71 -- TODO disable once considered stable
72 verbose = true; 72 verbose = true;
73 73