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

feat: add cache configuration support for preheat tasks #930

Merged
merged 6 commits into from
Jan 9, 2025

Conversation

SouthWest7
Copy link
Contributor

@SouthWest7 SouthWest7 commented Jan 6, 2025

Description

Cache storage: When a user triggers a preheat task request, the downloaded piece content will be stored in the cache. Subsequently, when other peers request downloading the same content, the preheated peer can upload the piece content directly from memory, bypassing disk I/O and reducing the overhead associated with disk reads.

storage:
  # cache_capacity: Specifies the maximum number of entries the cache can hold. The default value is 100 entries.
  # Adjust this value based on the expected number of piece content entries for preheat tasks that need to be cached.
  cache_capacity: 100

Related Issue

dragonflyoss/dragonfly#3742

Motivation and Context

Screenshots (if appropriate)

@SouthWest7 SouthWest7 requested a review from a team as a code owner January 6, 2025 09:26
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

Please add diagram.

dragonfly-client-config/src/dfdaemon.rs Outdated Show resolved Hide resolved
dragonfly-client-config/src/dfdaemon.rs Outdated Show resolved Hide resolved
dragonfly-client-config/src/dfdaemon.rs Outdated Show resolved Hide resolved
dragonfly-client-config/src/dfdaemon.rs Outdated Show resolved Hide resolved
dragonfly-client-config/src/dfdaemon.rs Outdated Show resolved Hide resolved
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit c19077a into dragonflyoss:main Jan 9, 2025
2 checks passed
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