Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

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
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