Hey, can someone tell me how to read this :
RAM NEEDED = number of keys * average key size * 2-3x
Source : Server Performance | Consul by HashiCorp
Thanks
Hey, can someone tell me how to read this :
RAM NEEDED = number of keys * average key size * 2-3x
Source : Server Performance | Consul by HashiCorp
Thanks
Hi @lando.windigo,
That formula is intended to produce a ranged estimate for the amount of memory needed for KV storage. The “* 2-3x” at the end is what makes it a range.
This could also be expressed as the estimate ranging:
[Number of keys]
* [Avg. key size]
* 2[Number of keys]
* [Avg. key size]
* 3If we say: [Number of keys]
* [Avg. key size]
= KV_Raw_Size
Then the range estimate can be expressed as:
KV_Raw_Size
* 2KV_Raw_Size
* 3Here is an example that should help.
If you have…
[Nuber of Keys]
= 1,000
[Average Key Size]
= 2KB
Then… KV_Raw_Size
= (1,000 * 2KB) = 2,000KB
Which means the range estimate expressed as:
KV_Raw_Size
* 2KV_Raw_Size
* 3Resolves to:
Which Resolves to the final numbers of:
The two sentences below are equivalent ways of stating the results of this example:
Sorry for the long winded response.
Regards,
Jeff
Thank you Jeff for the detailed answer