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

decrease default tracing permits #7010

Merged
merged 5 commits into from
Mar 7, 2024

Conversation

AbnerZheng
Copy link
Contributor

@AbnerZheng AbnerZheng commented Mar 6, 2024

close #7004

To avoid 1usize - 2

max(available_parallelism() - 2, 2) => max(available_parallelism() - 2 + 2, 2 + 2) - 2 
                                    => max(available_parallelism(), 4) - 2 

Here shows it works:
image

@AbnerZheng AbnerZheng marked this pull request as ready for review March 6, 2024 16:36
Comment on lines 25 to 26
pub static DEFAULT_MAX_TRACING_REQUESTS: Lazy<u32> =
Lazy::new(|| (max(std::thread::available_parallelism().unwrap().into(), 4) - 2) as u32);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a function instead

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last nit

@mattsse mattsse added C-perf A change motivated by improving speed, memory usage or disk footprint A-rpc Related to the RPC implementation labels Mar 7, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mattsse mattsse enabled auto-merge March 7, 2024 16:33
@mattsse mattsse added this pull request to the merge queue Mar 7, 2024
Merged via the queue into paradigmxyz:main with commit 1cd05b0 Mar 7, 2024
26 checks passed
@AbnerZheng AbnerZheng deleted the default-tracing-permits branch March 7, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

decrease default tracing permits
2 participants