Log In    |    Knowledge Base    |    4D Home
Tech Tip: Use "Keep the cache in physical memory..." for troubleshooting
PRODUCT: 4D Server | VERSION: 11 | PLATFORM: Mac & Win
Published On: June 18, 2009

There is a setting in the 4D Preferences labled "Keep the cache in physical memory...":

As mentioned in Tech Tip 37924, this setting is used to force the 4D database cache to reside in physical memory (as opposed to disk space reserved for virtual memory).

When troubleshooting it can be quite useful to enable this setting, especially when troubleshooting suspected memory leaks.

The reason for this is, if this setting is off, as the cache is used more of it will be loaded into physical memory. This can indicate a "false positive" for a memory leak.

If this setting is enabled, then you can eliminate the cache from the picture when isolating a memory leak.

On Mac OS X this will affect the "Real memory" (aka RSIZE) as reported by the Activity Monitor. On Windows this will affect the "Mem Usage" as reported by the Task Manager.

Here is an example of a database with a 300MB cache, running in 4D Server v11 SQL on Mac OS X:

Cache not in physical memory:

Cache in physical memory:

Please note that this setting only applies to 4D Server and 4D Desktop, but not 4D itself.

Commented by Josh Fletcher on May 11, 2010 at 11:36 AM
Sorry it took so long to reply: I'm not sure what is confusing; as the Tech Tip states, this setting will affect both Mac and Windows.
Commented by Mehboob Alam on June 29, 2009 at 1:52 PM
This option is a bit confusing.. it implied that this option was only usable on MacOSX. Has this behaviour changed since v11?