Index size varying in each node

Hi All,

I have 4 node server environment, 3 Data node and 1 Non data node.

I am indexing a file with the following settings

shard = 6
replica=1

After complete indexing operation, the file size in each node is not
equally shard.

Total index size=50

First node size - 28gb
Second node size - 14gb
Third node size- 8gb

Questions:

  1. Is there any ratio where the index file is shared between the
    nodes...?
  2. What we need to do to share the Index content equal to all
    available nodes ?

I have 20gb of ram settings in each node while working on that index
it exceeds the allocated memory.....

Questions:

  1. Why does it exceeds the allocated memeory...?
  2. How to calculate RAM size....? Is it based on the index
    size........?

thanks...