OpenSearch/x-pack
Armin Braun ebb6677815
Formalize and Streamline Buffer Sizes used by Repositories (#59771) (#60051)
Due to complicated access checks (reads and writes execute in their own access context) on some repositories (GCS, Azure, HDFS), using a hard coded buffer size of 4k for restores was needlessly inefficient.
By the same token, the use of stream copying with the default 8k buffer size  for blob writes was inefficient as well.

We also had dedicated, undocumented buffer size settings for HDFS and FS repositories. For these two we would use a 100k buffer by default. We did not have such a setting for e.g. GCS though, which would only use an 8k read buffer which is needlessly small for reading from a raw `URLConnection`.

This commit adds an undocumented setting that sets the default buffer size to `128k` for all repositories. It removes wasteful allocation of such a large buffer for small writes and reads in case of HDFS and FS repositories (i.e. still using the smaller buffer to write metadata) but uses a large buffer for doing restores and uploading segment blobs.

This should speed up Azure and GCS restores and snapshots in a non-trivial way as well as save some memory when reading small blobs on FS and HFDS repositories.
2020-07-22 21:06:31 +02:00
..
dev-tools
docs [DOCS] Fix outdated Kibana UI refs and screenshots in security docs (#60023) (#60059) 2020-07-22 13:08:22 -04:00
license-tools Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
plugin Formalize and Streamline Buffer Sizes used by Repositories (#59771) (#60051) 2020-07-22 21:06:31 +02:00
qa Enforce fail on deprecated gradle usage (7.x backport) (#59758) 2020-07-20 08:52:30 +02:00
snapshot-tool Enforce fail on deprecated gradle usage (7.x backport) (#59758) 2020-07-20 08:52:30 +02:00
test Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
transport-client Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
NOTICE.txt
README.md
build.gradle Include vendored code notices in distribution notice files (#57017) (#57569) 2020-06-04 10:34:24 -07:00

README.md

Elastic License Functionality

This directory tree contains files subject to the Elastic License. The files subject to the Elastic License are grouped in this directory to clearly separate them from files licensed under the Apache License 2.0.