|Oracle® Coherence User's Guide for Oracle Coherence*Web
Part Number E22620-03
This appendix will help you estimate the number of cache servers that an application will need. These equations will help you only to arrive at a reasonable estimate; they do not account for the effects of cache indexes, nonapplication objects that might reside on the cache server heap, failover headroom, and so on.
To find the number of cache servers that you will need, you must first calculate the application's heap requirements and the cache server's available tenured generation.
Calculate your application's total heap requirements.
When trying to determine the number of cache servers that you will need for your application, a good starting point is to determine your application's total heap requirements. The total heap requirement can be calculated as the number of sessions that you will run, multiplied by the average number of cached objects per session, multiplied by average number of bytes per cached object. Because you typically make one backup copy per cache entry, multiply the total by 2. Written as an equation, this becomes:
Total_Heap_Requirement = 2 * (Number_of_Sessions) * (Average_Number_of_Cached_Objects per Session) * (Average_Number_of_Bytes per Cached_Object)
The units of measure for
Total_Heap_Requirement are bytes. The
Average_Number_of_Bytes per Cached_Object, means the number of bytes in the serialized byte stream of primary copies only. Note that this equation does not address unserialized object size. Space requirements for backup copies are accounted for separately.
Calculate the available tenured generation in a cache server JVM.
The available tenured generation is a function of the maximum heap size allocation and other user-specified JVM heap-sizing parameters. Another factor in the available tenured generation is the percentage of the heap that is available for storage. Typically, 66% is used as the maximum percentage of the heap available for storage, but this figure might be too low for your system. Thus, make it a variable:
Percent_of_Heap_Available_for_Storage = 0.66 Available_Tenured_Generation = (Maximum_Heap_Size) * (Percent_of_Heap_Available_for_Storage)
Calculate the number of cache servers that will be needed.
To calculate the number of cache servers that will be needed, divide the total heap requirement by the available tenured generation.
Number_of_Cache_Servers = (Total_Heap_Requirement / Available_Tenured_Generation)