RAM used by GSI Index

Hello

We are using couchbase Community Edition 6.0.0 build 1693
We would like to know RAM consumption for a specific index that we have created, how can this be done.
[Being a community edition , it is a standard index-storage]

We know disk space occupied by index by checking folder size of 2i folder.

Question is asked in context to do appropriate sizing for production

Regards

@srinivas , you can use the indexer stats REST api to look at the data_size stat of each index. You can use this number to get an approximation of the total indexed data. Depending on how much working set you want in memory, RAM quota can be assigned. Please note that there are runtime overheads in addition to the index data size. So it is good to provide some headroom while assigning the quota.

Thanks @deepkaran.salooja for your quick answer
Below mentioned are stats that i have from Index Stats API

“data_size”: 9171224942,
“disk_size”: 10311458816,

Data size on index is showing 9.17G while on disk this API shows index is occupying 10.31G
However if i really login to machine and check folder size for index i have completely a new number which is 9.7G

Also i have a small stat for indexer itself which is something like this
“indexer”: {

    "indexer_state": "Active",

    "memory_quota": 10485760000,

    "memory_used": 8336672768

}

We have allocated 10G to indexer and it used is showing up as 8.3G which doesn’t again correspond to any of the numbers above
Is there somewhere a technical architecture or documentation explaining internal of couchbase index and how it works?

Regards

@srinivas , as I mentioned earlier these stats give you a good approximation of the data and disk size. It is always good to give some headroom when sizing. There are different overheads/runtime costs associated with data in memory and on disk.

Couchbase CE uses forestdb as storage engine for indexing. You can read more about it here.