Skip to content

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

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

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

…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 removed the test-forwards label Mar 2, 2021
@tlrx
Copy link
Member Author

tlrx commented Mar 2, 2021

@elasticmachine run elasticsearch-ci/bwc

@tlrx
Copy link
Member Author

tlrx commented Mar 2, 2021

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

1 similar comment
@tlrx
Copy link
Member Author

tlrx commented Mar 2, 2021

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

@tlrx tlrx merged commit b43c88a into elastic:7.x Mar 3, 2021
@tlrx tlrx deleted the adjust-cached-blob-size-for-metadata-files-7.13 branch March 3, 2021 09:53
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