home
About Us | Services | Products | Downloads | FAQs | Press Releases | White Papers | Contacts
Memory Settings for Thumbs Up Server

1. There is no single thing that affects client server performance in Thumbs Up more than memory (RAM). We recommend at least 1 GB of server RAM for any Thumbs Up Server installation, and 2 GB + for any installation with 5 or more client licenses. Once 4D Server is up and running, go to the server preferences menu and check the memory settings. In 4D Server Preferences, topic Database, subtopic Data Management, there is a section where you can set application memory and database cache size.

Server Preferences Menu

There are two main configurations, Forced and Adaptive cache settings. Forced cache is shown below. You uncheck Calculation of adaptive cache, enter a cache value, and hope for the best. We recommend a little more involvement.

Forced Cache

These screens are from a server with 512 MB of RAM. The first thing we would recommend is getting more RAM if you serve more than a couple of users at a time, at least 1 GB if your server will accomodate. The Adaptive setting (the above checkbox is checked) has a more versatile behavior. Memory allocation is calculated dynamically and respects the limits you set. Adaptive cache settings are shown below:

Adaptive Cache

The above screen is from a server with 512 MB of RAM. The first thing we would recommend is getting more RAM if you serve more than a couple of users at a time, at least 1 GB if your server will accomodate.

2. Reserve a reasonable amount of memory for the Operating System.

Where it says "Physical memory to be reserved:, enter an amount of RAM reasonable for your server's operating system. One way to gauge this is to boot up the server with no other applications running, and key in Ctrl-Alt-Delete and look at the Task Manager, and see how much RAM is being used. This would also be a good time to see if there are any unneccessary processes running that could be eliminated to keep the demands of the OS to a minimum. 128-256MB is a reasonable range, depending on what else you are running.

Win Task Manager Perf tab

This server happens to be running some remote control software (44+ MB of RAM), Microsoft SQL Server, Internet Information Server, as well as serving files. As a result, we reserved 256 MB of RAM for the Windows 2003 Server software.

3. Assign a generous percentage of the remaining memory as cache.

"Percentage of available memory used for the cache" - Take all physical RAM on your system, subtract the amount of memory in the "reserved" setting, and then multiply by the percentage you place in this settting, and that is the the calculation of how much memory is set for your database cache. 4D, the maker of the underlying database, suggests 80%. This server has 512MB, and you reserved 256 MB for the OS, that leaves 256MB. Set the "Percentage of available memory used for cache" to 80%.

4. Set the Maximum Size and Minimum Size for cache.

80% of 256 is 204. Set the "Maximum Size" for cache to this. We have used 200MB in the example screen above. "Maximum Size" is an absolute limit on the maximum database cache size. If the above calculation exceeds the "Maximum Size", the cache size will be set to this limit.The "Maximum Size" overrules the percentage setting, so 200MB is the maximum cache in the example above. "Minimum Size" is the smallest the cache can get when there are at least enough memory resources to reach the minimum. The cache can be smaller than this size if there is not enough available memory. Set the "Minimum Size" to 20MB.

5. Restart 4D Server.

Whenever you change these settings, quit 4D Server and restart to adopt the new memory settings.

6. Calculation Recap:

How the cache is calculated:

The database cache calculation begins by subtracting the "Physical memory to be reserved" from the physical memory installed on the system. The "Percentage of available memory" is applied to that difference. If the resulting amount of memory does not exceed the maximum or minimum "Size" limits, then the database cache will be set to the calculated size. If the result exceeds a "Size" limit, it will be set equal to the value of that size limit. The "current cache", also found in the "Database Cache Settings" section, reports the calculated amount for the running instance of 4D, and the "Cache on Restart" is the value that 4D will use in its next running instance (when you shutdown and restart 4D).

7. Examples:

You have 1 GB (1024 MB) of physical RAM on your machine. You set 256 MB to be reserved for the system. So 4D has access to 768MB of physical RAM. Then you set the percentage of available memory used for the cache to 80%. 4D uses the percentage to calculate (1024 - 256)*0.80 for an estimated cache size of 614 MB. Lets say you set the maximum cache size to 512MB and the minimum cache size to 100MB. The actual database cache size will be 512MB RAM because the original calculation exceeded the maximum limit that you set.

Recommended RAM
Cache Settings
Users
GB Server RAM
MB Reserve for OS
% Cache
Maximum MB
Minimum MB
2
.5
256 (or 128)
80
200
20
3-5
1
256
80
610
20
6-8
1.5
256
80
1024
20
9-12
2
256
80
1432
20
12-20
3
256
80
2248
20
20+
4
256
80
3072
20