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

de-couple walkMu and walkReadMu for some granularity #13231

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

harshavardhana
Copy link
Member

@harshavardhana harshavardhana commented Sep 17, 2021

Description

de-couple walkMu and walkReadMu for some granularity

Motivation and Context

This commit brings two locks instead of single lock for
WalkDir() calls on top of c25816e.

The main reason is to avoid contention between readMetadata()
and ListDir() calls, ListDir() can take time on prefixes that
are huge for readdir() but this shouldn't end up blocking
all readMetadata() operations, this allows for more room for
I/O while not overly penalizing all listing operations.

How to test this PR?

Nothing special, everything should work as expected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Documentation updated
  • Unit tests added/updated

@harshavardhana

This comment has been minimized.

cmd/metacache-walk.go Outdated Show resolved Hide resolved
@klauspost

This comment has been minimized.

@harshavardhana

This comment has been minimized.

@harshavardhana harshavardhana changed the title Revert "xl walk: Limit walk concurrent IO (#12885)" de-couple walkMu and walkReadMu for some granluarity Sep 17, 2021
@harshavardhana harshavardhana changed the title de-couple walkMu and walkReadMu for some granluarity de-couple walkMu and walkReadMu for some granularity Sep 17, 2021
This commit brings two locks instead of single lock for
WalkDir() calls on top of c25816e.

The main reason is to avoid contention between readMetadata()
and ListDir() calls, ListDir() can take time on prefixes that
are huge for readdir() but this shouldn't end up blocking
all readMetadata() operations, this allows for more room for
I/O while not overly penalizing all listing operations.
@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-gateway-s3.sh ✔️
mint-erasure.sh ✔️
mint-dist-erasure.sh ✔️
mint-zoned.sh ✔️
mint-gateway-nas.sh ✔️
mint-compress-encrypt-dist-erasure.sh ✔️
Deleting image on docker hub
Deleting image locally

Copy link
Contributor

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

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

LGTM

@harshavardhana harshavardhana merged commit 66fcd02 into minio:master Sep 17, 2021
@harshavardhana harshavardhana deleted the remove-lock branch September 17, 2021 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants