oxen-io / lokinet

Lokinet is an anonymous, decentralized and IP based overlay network for the internet.
https://lokinet.org/
GNU General Public License v3.0
1.71k stars 221 forks source link

reduce number of jobs pushed through omq proxy thread. #2134

Open majestrate opened 1 year ago

majestrate commented 1 year ago

when we queue cpu heavy work in lokinet to worker threads we make 1 job per function call. we call a lot of jobs so this coleuses the jobs into 1 job that we push off at the end of the event loop cycle, reducing the number of jobs going across the omq proxy thread, in theory reducing cpu usage.

@jagerman i am curious how much perf increase we get on snodes, so i'd like to have this tested on testnet

majestrate commented 1 year ago

metric for measuring perf improvement:

ratio of cumulative cpu usage across workers to cpu usage in the omq proxy thread.

higher ratio is better.

majestrate commented 1 year ago

@jagerman please test this on testnet. make sure to measure for perf before and after flipping.

majestrate commented 1 year ago

it has a noticeable improvement on exit.loki. less context switches, lower system load average and higher throughput.

if_enp1s0-day (1) interrupts-day (1) load-day (1)

i'll test it on my service node this week to see what it improves.

majestrate commented 1 year ago

getting this into a point release would probably speed the network up a bit.