MTProxy icon indicating copy to clipboard operation
MTProxy copied to clipboard

Fix hardcoded epoll timeout values

Open DanteMarshal opened this issue 7 years ago • 2 comments

engine.c : 460, 580, 552 => Default epoll timeout was hardcoded to 1 instead of #define constant net-events.c : 414 => timeout argument was not being used, A hardcoded 1 was passed to epull_fetch_events instead.

Fixes this issue : https://github.com/TelegramMessenger/MTProxy/issues/100

DanteMarshal avatar Sep 23 '18 14:09 DanteMarshal

I honestly have no idea how this fix works, and I did not get deep into mtproto codebase, but I applied these changes manually to trunk and mtproto load went down from 10% to ~1%.

Maintainers should really consider merging this pull request. Because before these changes mtproto took 5-10% without any clients.

olologin avatar Jan 26 '20 10:01 olologin

Can confirm, applying this patch decreased the idle CPU load from 3-4% to less than 1%. Without any apparent degradation in responsiveness or quality during active use (for now).

ruro avatar Feb 05 '24 14:02 ruro