Skip to content

Conversation

@majestrate
Copy link
Contributor

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

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 coleases 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.
@majestrate majestrate requested a review from jagerman February 10, 2023 16:46
@majestrate
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@majestrate
Copy link
Contributor Author

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.

dr7ana added a commit to dr7ana/lokinet that referenced this pull request Apr 28, 2023
Merging cherry-picks back to testnet branch:
-  oxen-io#2164
-  oxen-io#2134
@majestrate
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant