Skip to content

httpfs: configurable read-ahead, LRU block cache, smaller metadata reads#15

Open
adsharma wants to merge 1 commit into
mainfrom
httpfs_readahead
Open

httpfs: configurable read-ahead, LRU block cache, smaller metadata reads#15
adsharma wants to merge 1 commit into
mainfrom
httpfs_readahead

Conversation

@adsharma

Copy link
Copy Markdown
Contributor

Replace the single 1MB sliding-window read buffer in HTTPFileInfo with a small LRU cache of fetched blocks so revisited regions are no longer re-fetched over HTTP/S3.

  • Add extension options http_read_buffer_size (default 1000000), http_metadata_read_buffer_size (default 65536), and http_read_cache_blocks (default 8), each with a matching env-var fallback, so random-access workloads can shrink the read-ahead.
  • Classify reads of size <= http_metadata_read_buffer_size as metadata-like and fetch them with the smaller block size to avoid over-fetching on scattered footer/index probes.
  • Bypass the cache for reads at least as large as the block size (direct range GET into the caller's buffer) and fetch aligned blocks into the LRU cache for smaller reads, evicting the least-recently-used block when over capacity.

Replace the single 1MB sliding-window read buffer in HTTPFileInfo with a
small LRU cache of fetched blocks so revisited regions are no longer
re-fetched over HTTP/S3.

- Add extension options http_read_buffer_size (default 1000000),
  http_metadata_read_buffer_size (default 65536), and http_read_cache_blocks
  (default 8), each with a matching env-var fallback, so random-access
  workloads can shrink the read-ahead.
- Classify reads of size <= http_metadata_read_buffer_size as metadata-like
  and fetch them with the smaller block size to avoid over-fetching on
  scattered footer/index probes.
- Bypass the cache for reads at least as large as the block size (direct
  range GET into the caller's buffer) and fetch aligned blocks into the
  LRU cache for smaller reads, evicting the least-recently-used block when
  over capacity.
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.

1 participant