I think we should make a distinction between how the naming memory is consumed by each nomenod object and general recommendations for determining the size of the nomenodyai heap.
For the first case (consumption), AFAIK, each namenode object contains an average of 150 bytes of memory. Namenode objects are files, blocks (not counting replicated copies), and directories. So, for a file with 3 blocks, this is 4 (1 file and 3 blocks) x150 bytes = 600 bytes.
In the second case, the recommended heap size for the stock list is usually recommended to reserve 1 GB per 1 million blocks. If you calculate this (150 bytes per block), you get 150 MB of memory consumption. You can see that this is much less than 1 GB per 1 million blocks, but you should also consider the number of files and directories.
I think this is a safe recommendation. Check out the following two links for a more general discussion and examples:
NameNode Heap Memory - Cloudera
Set Name Heap Size Node - Hortonworks
Namenode internal memory structure structures
α
devrimbaris
source share