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

Adjust the length of blob cache docs for Lucene metadata files #69692

Merged

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Mar 1, 2021

Today searchable snapshots IndexInput implementations use the
blob store cache to cache the first 4096 bytes of every Lucene files.
After some experiments we think that we could adjust the length of
the cached data depending of the Lucene file that is read, caching
up to 64KB for Lucene metadata files (ie files that are fully read
when a Directory is opened) and only 1KB for other files.

The files that are cached up to 64KB are the following extensions:

    "cfe", // compound file's entry table
    "dvm", // doc values metadata file
    "fdm", // stored fields metadata file
    "fnm", // field names metadata file
    "kdm", // Lucene 8.6 point format metadata file
    "nvm", // norms metadata file
    "tmd", // Lucene 8.6 terms metadata file
    "tvm", // terms vectors metadata file
    "vem"  // Lucene 9.0 indexed vectors metadata

The 64KB limit can be configured on a per index basis through a new
index setting. This change is extracted from #69283 and does not
address the caching of CFS files.

Backport of #69431

tlrx added 3 commits March 2, 2021 14:15
…ic#69431)

Today searchable snapshots IndexInput implementations use the
blob store cache to cache the first 4096 bytes of every Lucene files.
After some experiments we think that we could adjust the length of
the cached data depending of the Lucene file that is read, caching
up to 64KB for Lucene metadata files (ie files that are fully read
when a Directory is opened) and only 1KB for other files.

The files that are cached up to 64KB are the following extensions:

        "cfe", // compound file's entry table
        "dvm", // doc values metadata file
        "fdm", // stored fields metadata file
        "fnm", // field names metadata file
        "kdm", // Lucene 8.6 point format metadata file
        "nvm", // norms metadata file
        "tmd", // Lucene 8.6 terms metadata file
        "tvm", // terms vectors metadata file
        "vem"  // Lucene 9.0 indexed vectors metadata

The 64KB limit can be configured on a per index basis through a new
index setting. This change is extracted from elastic#69283 and does not
address the caching of CFS files.

Backport of elastic#69431
@tlrx tlrx force-pushed the adjust-cached-blob-size-for-metadata-files-7.12 branch from 7df5491 to 8d58f84 Compare March 2, 2021 13:42
@tlrx
Copy link
Member Author

tlrx commented Mar 2, 2021

@elasticmachine run elasticsearch-ci/bwc (green but want more tests)

4 similar comments
@tlrx
Copy link
Member Author

tlrx commented Mar 2, 2021

@elasticmachine run elasticsearch-ci/bwc (green but want more tests)

@tlrx
Copy link
Member Author

tlrx commented Mar 2, 2021

@elasticmachine run elasticsearch-ci/bwc (green but want more tests)

@tlrx
Copy link
Member Author

tlrx commented Mar 2, 2021

@elasticmachine run elasticsearch-ci/bwc (green but want more tests)

@tlrx
Copy link
Member Author

tlrx commented Mar 2, 2021

@elasticmachine run elasticsearch-ci/bwc (green but want more tests)

@tlrx tlrx merged commit 84b1977 into elastic:7.12 Mar 3, 2021
@tlrx tlrx deleted the adjust-cached-blob-size-for-metadata-files-7.12 branch March 3, 2021 09:53
tlrx added a commit that referenced this pull request Mar 3, 2021
Now #69692 has been merged in branch 7.12 we can adjust the 
BWC version in the BlobStoreCacheService in branch 7.x.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant