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

Reduce memory footprint of TextFieldMapper #73845

Closed
ywelsch opened this issue Jun 7, 2021 · 1 comment · Fixed by #77251
Closed

Reduce memory footprint of TextFieldMapper #73845

ywelsch opened this issue Jun 7, 2021 · 1 comment · Fixed by #77251
Labels
>bug >regression :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch

Comments

@ywelsch
Copy link
Contributor

ywelsch commented Jun 7, 2021

Having a larger number of mapped fields consumes quite a bit of heap memory. TextFieldMapper holds onto its builder object, which results in a simple field definition to easily hold onto 7KB of heap memory. This means that on a small node (1GB heap), 20k fields (e.g. 20 indices with 1000 fields each) can result in 150MB of memory being used purely for the mappings.

Relates #63269

@ywelsch ywelsch added >bug :Search Foundations/Mapping Index mappings, including merging and defining field types needs:triage Requires assignment of a team area label labels Jun 7, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jun 7, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@jtibshirani jtibshirani removed the needs:triage Requires assignment of a team area label label Jun 7, 2021
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this issue Sep 3, 2021
Fixes the text field mapper and the analyzers class that also retained parameter references that go really heavy.
Makes `TextFieldMapper` take hundreds of bytes compared to multiple kb per instance.

closes elastic#73845
original-brownbear added a commit that referenced this issue Sep 3, 2021
Fixes the text field mapper and the analyzers class that also retained parameter references that go really heavy.
Makes `TextFieldMapper` take hundreds of bytes compared to multiple kb per instance.

closes #73845
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this issue Sep 3, 2021
Fixes the text field mapper and the analyzers class that also retained parameter references that go really heavy.
Makes `TextFieldMapper` take hundreds of bytes compared to multiple kb per instance.

closes elastic#73845
original-brownbear added a commit that referenced this issue Sep 4, 2021
…7268)

Fixes the text field mapper and the analyzers class that also retained parameter references that go really heavy.
Makes `TextFieldMapper` take hundreds of bytes compared to multiple kb per instance.

closes #73845
@javanna javanna added Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch and removed Team:Search Meta label for search team labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug >regression :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants