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

Add minio cache for gateway #153

Merged
merged 38 commits into from
Sep 26, 2024
Merged

Add minio cache for gateway #153

merged 38 commits into from
Sep 26, 2024

Conversation

harsh4723
Copy link
Collaborator

@harsh4723 harsh4723 commented Aug 5, 2024

Description

This PR adds the cache settings for using the minio cache which will be in between the zcn and zs3server.

Steps to use this cache

  • Cache drives need to have strictatime or relatime enabled for disk caching feature
  • truncate -s 4G /mcache/data ## create a file with 4G size
  • mkfs.xfs /mcache/data ## make this into a xfs file system
  • sudo mkdir /mnt/mcache ## create mount directory
  • sudo mount -o relatime /mcache/data /mnt/mcache ## mount xfs on /mnt/mcache with atime
  • docker-compose -f environment/docker-compose.yaml up -d ## use additional docker compose settings to use caching

Ref - https://github.com/0chain/zs3server/blob/staging/docs/disk-caching/README.md

Changes
Update writeback logic to upload to backend in batches for the put operation
Added list feature with radix tree for cache list handler

Motivation and Context

How to test this PR?

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

@harsh4723 harsh4723 changed the title Add minio cache for gateway [WIP] Add minio cache for gateway Aug 11, 2024
@harsh4723 harsh4723 changed the title [WIP] Add minio cache for gateway Add minio cache for gateway Sep 20, 2024
Copy link
Member

@dabasov dabasov left a comment

Choose a reason for hiding this comment

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

lgtm

@dabasov dabasov merged commit f3e1094 into staging Sep 26, 2024
3 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.

3 participants