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

Optimised prefix pattern per shard for remote store data and metadata files for higher throughput #12567

Closed
ashking94 opened this issue Mar 8, 2024 · 1 comment
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request Storage:Performance Storage:Resiliency Issues and PRs related to the storage resiliency v2.14.0

Comments

@ashking94
Copy link
Member

Is your feature request related to a problem? Please describe

With remote store feature, we upload 2 kinds of data to remote store - data and metadata against both translog and metadata. We have #5854 for allowing buffering of requests before uploading it after every 650ms (default value). This works well in steady state. However, I have faced issue where I am running performance test with single index and higher number of shards.

The current path structure looks like this ->

!__Base path
    !__Index path - <Base_path>/<index_uuid>/
        !__Shard path - <Index_path>/<shard_id>
            !__Segment path - <Shard_path>/segments
                !__files path - <Segment_path>/data
                    |__segments_<N>__<file-gen>
                    |__<N>.si__<file-gen>
                    |__<N>.cfe__<file-gen>
                    |__<N>.cfs__<file-gen>
                !__metadata path - <Segment_path>/metadata
                    |__metadata_path_<file-gen>_version
                !__lock path - <Segment_path>/lock_files
                    !__metadata_path_<file-gen>_version.v2_lock

            !__Translog path - <Shard_path>/translog
                !__data path - <Translog_path>/data
                    |__primary-term
                        |__translog-<gen>.tlog
                        |__translog-<gen>.ckp
                !__metadata path - <Translog_path>/metadata
                    |__metadata_prefix_gen_version

If we notice, the physical layout and logical layout of data is same. This structure allows some limits on number of GETs, PUTs, DELETEs, LISTs. However, the limits becomes bottleneck when there are too many shards for an index.

Describe the solution you'd like

A prefix pattern that is accepted by multiple repository providers like AWS S3, GCP storage. The general recommendation by the providers is to maximise the spread of data across as many prefixes as possible. This allows them to scale better.

So, the proposed prefix pattern is ->

hash(data,index_uuid,sharid,translog|segment)/<Base-path>/<index-uuid>/<shardid>  → data
hash(md,index_uuid,sharid,translog|segment)<Base-path>/<index-uuid>/<shardid>  → metadata

With above prefix pattern, we ensure that the prefixes are as random but predictable. For the combination of translog-data, translog-metadata, segment-data, segment-metadata, the path would be fixed and will remain same throughout it's life.

We can also see this referred by multiple cloud providers below -

  1. GCP Storage - https://cloud.google.com/storage/docs/request-rate#ramp-up
  2. AWS S3 - https://repost.aws/knowledge-center/http-5xx-errors-s3

Related component

Storage:Performance

Describe alternatives you've considered

No response

Additional context

No response

@ashking94 ashking94 added enhancement Enhancement or improvement to existing feature or request untriaged labels Mar 8, 2024
@ashking94 ashking94 self-assigned this Mar 8, 2024
@ashking94 ashking94 changed the title [Feature Request] Optimised prefix pattern per shard for remote store data and metadata files for higher throughput Optimised prefix pattern per shard for remote store data and metadata files for higher throughput Mar 8, 2024
@ashking94 ashking94 added the Storage:Resiliency Issues and PRs related to the storage resiliency label Mar 18, 2024
@ashking94 ashking94 moved this from 🆕 New to 🏗 In progress in Storage Project Board Apr 18, 2024
@ashking94
Copy link
Member Author

Marking this closed since the feature has been successfully completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Storage:Performance Storage:Resiliency Issues and PRs related to the storage resiliency v2.14.0
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant