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

Add total index memory in _cat/indices #7824

Closed
wants to merge 1 commit into from

Conversation

dadoonet
Copy link
Member

This patch adds to _cat/indices information about memory usage per index by adding memory used by FieldData, IdCache, Percolate, Segments (memory, index writer, version map).

% curl 'localhost:9200/_cat/indices?v&h=i,tm'
i     tm
wiki  8.1gb
test  30.5kb
user  1.9mb

Closes #7008

* FieldData, IdCache, Percolate, Segments (memory, index writer, version map)
*/
public ByteSizeValue getTotalMemory() {
long size = this.getFieldData().getMemorySizeInBytes() +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure though but are they all guaranteed to be non-null?

@s1monw
Copy link
Contributor

s1monw commented Sep 26, 2014

I like it - left one comment

@s1monw s1monw removed the review label Sep 26, 2014
@dadoonet dadoonet self-assigned this Oct 3, 2014
@dadoonet
Copy link
Member Author

dadoonet commented Oct 6, 2014

@s1monw PR updated based on your comment. Indeed, I thought those values can not be null but it's safer to protect that.

@dadoonet dadoonet added the review label Oct 6, 2014
@s1monw
Copy link
Contributor

s1monw commented Oct 7, 2014

LGTM

@s1monw s1monw removed the review label Oct 7, 2014
This patch adds to `_cat/indices` information about memory usage per index by adding memory used by FieldData, IdCache, Percolate, Segments (memory, index writer, version map).

```
% curl 'localhost:9200/_cat/indices?v&h=i,tm'
i     tm
wiki  8.1gb
test  30.5kb
user  1.9mb
```

Closes elastic#7008
@dadoonet
Copy link
Member Author

dadoonet commented Oct 8, 2014

Merged with 80ca8e5 and c62730c

@dadoonet dadoonet closed this Oct 8, 2014
@dadoonet dadoonet deleted the pr/7008-cat-index-memory branch October 8, 2014 12:05
@clintongormley clintongormley changed the title Admin: add total index memory in _cat/indices Add total index memory in _cat/indices Jun 6, 2015
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.

Total index memory in _cat/indices
3 participants