Skip to content

Align GET requests on 8MiB boundaries #1730

Description

@zrleblanc

Mountpoint for Amazon S3 version

mount-s3 1.21.0

AWS Region

any

Describe the running environment

Running on EC2 instance Ubuntu 24.04 connecting to a S3 caching solution. Credentials are passed using a local profile.

Mountpoint options

mount.mount-s3 my-bucket --profile my-profile --endpoint-url=http://my-caching-system.com --force-path-style mount-s3/

What happened?

The first GET request for a file is 1MiB in size. Then all subsequent requests are 8MiB in size.
Request 1: 0-1MiB
Request 2: 1MiB-9MiB
Request 3: 9MiB-17MiB
Request 4: 17MiB-25MiB
...
Boto client and every other S3 client always works on 8MiB boundries:
Request 1: 0-8MiB
Request 2: 8MiB-16MiB
Request 3: 16MiB-24MiB
...
Our caching system is caching at 8MiB chunks to match the request size, but the difference in offsets means that there are overlaps between mountpoint-s3 and every other S3 client.

My recommendation is to make the second request 7MiB so that all other requests fall on the same boundaries used by all other S3 clients. This is not causing breaking issues, but like SSD and file system partition alignments, makes things operate much smoother.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions