Adjusting The Memory Cache

Top  Previous 

Access the preferences on the Genie Server (Mac: Genie Server > Preferences  Win: Edit > Preferences)

 

Click on the Database theme to display the window below:

Memory

 

The memory cache is a portion of the installed RAM which Genie uses to hold data. When you perform a search e.g. to find a patient, Genie first looks for the record in memory. If it isn't there, it retrieves the record from the hard disk. However, retrieving a record from the hard disk is many, many times slower than retrieving it from memory.

 

Once records have been searched for and found, they are then stored in the memory cache. Once the memory cache is full, records are progressively cleared from memory.

 

Therefore generally speaking, the larger the cache, the faster Genie will perform searches. Increasing the cache beyond some point however will cause performance to degrade as the operating system and the Genie Server application itself are starved of memory and the amount of data being maintained in the cache by the Genie Server places an unacceptably high burden on the Genie Server application. If the cache is large enough then all the commonly used records can reside in memory, and Genie will be performing at top speed. The Cache Hit Ratio thermometer bar in the Genie Server window gives an indication of the percentage of records being found in the memory cache. The higher this is, the better. If it starts falling below about 85%, you should think about installing more memory in the server, or adjusting the memory cache settings as explained below. Note that this indicator will not give a true reading until the Genie Server program has been running with a number of active users for a reasonable period of time.

cache

 

Calculation of adaptive cache

This checkbox should be ticked. In this mode, management of the memory cache is performed dynamically by the operating system, respecting the minimum and maximum limits which you set. The size of the memory cache is calculated dynamically depending on the parameters set here.

Physical memory to be reserved

This is the amount of memory (RAM), to be reserved for use by the Operating System and all applications which may be

running on the server.

Percentage of available memory used for cache

This is the percentage of the remaining RAM to be allocated to the cache by default.

Maximum Size

The maximum amount of memory that can be used by the cache. This value cannot be greater than 2000MB (2GB) but in our experience setting it higher than 1000MB will cause even the most memory rich systems to suffer performance degradation. As a general rule it is unadvisable to set the maximum amount higher than one quarter of the physical memory (RAM) in the machine.

Minimum Size

The minimum amount of memory that must be reserved for the cache. This value cannot be less than 4MB.

 

Genie's default settings are designed to allow Genie to run on a computer with only 256MB of RAM, and which may be running other applications. Therefore, 128MB is reserved to allow the Operating System enough RAM to run. Of the remaining 128MB, Genie will take 50%, and leave the rest for any other applications which may be running (including the Genie Server application itself). The cache in this case would be 64MB of RAM. We have set a minimum of 30MB, so Genie will end up using between 30 and 64MB of RAM. The 1000MB maximum we have set is irrelevant with these settings.

 

However, if you have more installed RAM, and you don't have any other applications running on the server, you can modify these settings to allow a much larger cache, and therefore much faster operations.

 

For example, if you have 1GB of installed RAM, a good setting would be:

Physical memory to be reserved: 512MB (gives the Operating System a bit extra - most current operating systems will struggle with anything less than this)
Percentage of available memory used for cache: 50%

 

In this case your memory cache would be 256MB, which is typically enough to fit most of the frequently accessed records of a large database in memory.

 

If you have 2 copies of Server running, make the percentage at 35%.

If you have 3 copies of Server running, make the percentage 20%.

 

Note:

 

When you install an updated version of Genie, these memory settings are reset to Genie's defaults, so you should remember to reset them after each update.

 

Changes made will not take effect until the server machine is rebooted.