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

fix(snapshots): choose numCPU if less than max parallel value #3069

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MinyiZou
Copy link
Contributor

@MinyiZou MinyiZou commented Jun 14, 2023

#3068 Kopia parallelism: choose numCPU if less than max parallel value

@MinyiZou MinyiZou changed the title Kopia parallelism: choose numCPU if less than max parallel value Fix: choose numCPU if less than max parallel value Jun 14, 2023
@MinyiZou MinyiZou changed the title Fix: choose numCPU if less than max parallel value fix(snapshot): choose numCPU if less than max parallel value Jun 14, 2023
@MinyiZou MinyiZou changed the title fix(snapshot): choose numCPU if less than max parallel value fix(snapshots): choose numCPU if less than max parallel value Jun 14, 2023
@@ -744,6 +744,11 @@ func (u *Uploader) maybeIgnoreCachedEntry(ctx context.Context, ent fs.Entry) fs.

func (u *Uploader) effectiveParallelFileReads(pol *policy.Policy) int {
p := u.ParallelUploads

if p > runtime.NumCPU() {
Copy link
Contributor

Choose a reason for hiding this comment

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

given that uploads are not entirely CPU bound there may be benefits to allowing p to be greater than the number of cores to allow max number of cores to do hashing while others are waiting for uploads

@codecov
Copy link

codecov bot commented Jun 14, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (a9954ad) 75.29% compared to head (036e042) 75.29%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3069      +/-   ##
==========================================
- Coverage   75.29%   75.29%   -0.01%     
==========================================
  Files         457      457              
  Lines       36093    36097       +4     
==========================================
+ Hits        27177    27179       +2     
- Misses       7006     7010       +4     
+ Partials     1910     1908       -2     
Impacted Files Coverage Δ
snapshot/snapshotfs/upload.go 83.60% <100.00%> (+0.18%) ⬆️

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

None yet

2 participants