-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Run arc_evict thread at higher priority #12151
Conversation
Signed-off-by: Tony Nguyen <tony.nguyen@delphix.com>
Attaching offcpu flame graphs showing how much arc_evict thread was involuntarily context switched off CPU and that was minimized with arc_evict running at higher priority. |
Would setting CPU affinity for the eviction thread have the same effect with more consistency? |
@adamdmoss How would any affinity made thread to run faster? It would likely do opposite by limiting scheduler choices. |
Setting CPU affinity wouldn't help since the thread still get taken off CPU as often and may even hurt performance because setting would limit which CPU the thread can run (less run time). When arc_evict thread is active (evicting), I/Os may be stuck waiting until arc_evict frees up enough memory so it's important that the thread gets needed CPU time to complete its work. I'm not opposed to providing a tunable when we see a problem. I hope we can avoid an unnecessary tunable. |
I need to do more testing. Using defsysclprio, i.e. nice=0, is giving similar performance improvement and should reduce CPU starvation concerns. I'll run more tests. |
I couldn't update this due to new repo. I filed #12397 and closing this. |
Motivation and Context
Running arc_evict thread at higher priority minimizes it getting
scheduled off CPU and can improve performance for workload with high
ARC evict activities.
On mixed read/write and sequential read workloads, I've seen between
10-20% better performance.
Description
Extending zthr_create_timer() to take a new priority_t argument and
arc_evict_zthr
is created with highest priority value,maxclsyspri
.How Has This Been Tested?
Manual tests with sequential reads and mixed read/writes with larger pool size.
ZFS performance test suite also show better though smaller gains for
sequential read and sequential writes, 8% and 3%, respectively.
Test setup:
Types of changes
Checklist:
Signed-off-by
.