I am running a redis instance with maxmemory=2GiB. After inserting items with 10-byte value using YCSB bechmark until the instance is full, I use the INFO MEMORY and MEMORY STATS to analyse its memory usage.
MEMORY STATS returns overhead.hashtable.main=459742168, while MEMORY USAGE _indices returns 1292617326. The data type of _indices is zset, which is the index for finding keys I think. Based on total.allocated=2147442672 and dataset.bytes=1686835232 returned by MEMORY STATS, the memroy used by hash table is 459742168 bytes. But I am confused about the MEMORY USAGE _indices. There are always one zset instance, the _indices. Isn't it the hash table?
Also the ZCARD _indices is 10030238. However, the source code indicates it should be 2^n. How can I get the current hash table capacity?