Skip to content

Use Bucket Size for Filesystem Stats#358

Merged
foodprocessor merged 21 commits intomainfrom
headBucketUsage
Nov 6, 2024
Merged

Use Bucket Size for Filesystem Stats#358
foodprocessor merged 21 commits intomainfrom
headBucketUsage

Conversation

@foodprocessor
Copy link
Copy Markdown
Contributor

Describe your changes in brief

  • Add flag to allow users to choose whether StatFs will be populated by file cache or cloud storage.
  • Provide StatFs storage usage statistics from cloud storage by default (should we flip this, or should the flag be in s3storage?)
  • Correct StatFs math in file cache.
  • Use same StatFs function in file cache regardless of platform (and use getAvailableSize() for platform-specific code).
  • Change libfuse StatFs response to handle both file cache and cloud storage data.
  • Change s3 call to HeadBucket to capture response and parse size (works for Lyve Cloud only).
  • Create new function bucketExists() to replace old headBucket wrapper.

What type of Pull Request is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Checklist

  • Tested locally
  • Added new dependencies
  • Updated documentation
  • Added tests

Related Issues

  • Related Issue #
  • Closes #

Copy link
Copy Markdown
Contributor

@jfantinhardesty jfantinhardesty left a comment

Choose a reason for hiding this comment

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

Great fix for the size of the bucket. On question, is there a performance concern with how often the OS may call statfs. Seems like it might be a bit slow to respond each time and was wondering if this has caused a problem with Network Optix or if you see a problem with the additional latency? Also it appears that the test TestStatFs is failing on both Linux and Windows.

Comment thread setup/baseConfig.yaml Outdated
@foodprocessor
Copy link
Copy Markdown
Contributor Author

foodprocessor commented Nov 5, 2024

Great fix for the size of the bucket. On question, is there a performance concern with how often the OS may call statfs. Seems like it might be a bit slow to respond each time and was wondering if this has caused a problem with Network Optix or if you see a problem with the additional latency? Also it appears that the test TestStatFs is failing on both Linux and Windows.

I have tested this on both platforms. I have not seen performance issues (cloud responds in less than 100ms), and the OS seems to only call StatFs at the expected times (when viewing the mount properties and when an application calls StatFs explicitly).

Copy link
Copy Markdown
Contributor

@jfantinhardesty jfantinhardesty left a comment

Choose a reason for hiding this comment

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

Looks good! I like the config option in s3storage.

@foodprocessor foodprocessor merged commit 2041061 into main Nov 6, 2024
@foodprocessor foodprocessor deleted the headBucketUsage branch November 6, 2024 21:20
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.

2 participants