Search code examples
javacachingoracle-coherence

calculate coherence cache high-units


How to decide the high-units number for the front & back scheme for near cache?

For example, we will have 100 000 key/value pairs

<near-scheme>
  <front-scheme>
    <high-units>IS THERE ANY CALCULATION/RULES TO CALCULATE front limit?</high-units>
  </front-scheme>
  <back-scheme>
     <high-units>IS THERE ANY CALCULATION/RULES TO CALCULATE back limit?</high-units>
  </back-scheme>
</near-scheme>

I can divide front high-units is 20 000 and back high-units is 80 000 but is there any way to decide front's high units based on back's high units? Does it depend on RAM memory and something more?


Solution

  • The "front scheme" is the local cache; that would be the number of units stored in memory where the near cache is being accessed.

    The "back scheme" is usually the distributed cache; that would be the number of units (max) stored on each node. Usually you would not limit this (no high units setting) and instead you would make sure that you have enough servers to hold the necessary data. However, if it's just a cache, and you don't want to risk too much data, then you can set it. If you know the max number of entries that you want to hold per node, then use the simple unit calculator and set the high units to the max number of keys to store on each node.