The amount of heap used by fielddata can be checked by:
_stats/fielddata?fields=*
the response is:
...
"total": {
"fielddata": {
"memory_size_in_bytes": 2592,
"evictions": 0,
"fields": {
"_parent": {
"memory_size_in_bytes": 1296
},
"_parent#main_type": {
"memory_size_in_bytes": 1296
}
}
}
}
}
I know parent/child in 5.x need global ordinals to speed up joins,but what confuse me is the relationship between _parent#main_type and _parent. It seems that Fielddata was calculated twice。
these stats are per node, and you could have more than one parent/child mapping across your indices, so that _parent contains the size of all your ordinals, where as parent#main_type only contains the size of the ordinals for this specific type.
Thanks for your reply.I haven known that _parent contains the all ordinals,but I still don't understand why the total memory usage is 2592.Does both _parent and _parent#main_type require memory usage?
No, there is no doubled memory consumption. The number is only the same because you only have one parent/child field across all of your indices. If you had more indices using parent/child and those had different names, then you would have another counter for that field plus the summation of these fields in the _parent field.
Thanks for your reply again. Now I use two indices using parent/child for testing,so it can be explain clearly. The response is:
....
"fielddata": {
"memory_size_in_bytes": 2144, // 2144=1072+424+648 //
"evictions": 0,
"fields": {
"_parent": {
"memory_size_in_bytes": 1072, //1072=424+648 //
},
"_parent#main_type_2": {
"memory_size_in_bytes": 424
},
"_parent#main_type": {
"memory_size_in_bytes": 648
....
I know the _parent is the summation of _parent#main_type_2 and _parent#main_type. Although the total consumption statistics are 2144, the actual memory consumption is only 1072,is that right?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.