KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Monitoring 4D Memory Usage
PRODUCT: 4D | VERSION: 11 | PLATFORM: Mac & Win
Published On: June 16, 2010

The Tech Tip Maximizing Available Memory for 4D explains how to achieve the maximum available memory for 4D v11 SQL applications.

While the rules are quite simple, it is still important to understand the needs of any 4D application. Does your application need the maximum amount of memory?

Thus it is important to monitor the memory usage of your 4D application to understand whether or not those needs are being met.

On both Mac OS X and Windows the amount of information available regarding memory used by an application can be a bit daunting. Which statistic should you pay attention to?

The answer is deceptively simple: you need to watch the total memory; this is *always* the biggest number.

Using Windows tools the label can vary: typically it's labeled Virtual Size or Virtual Memory but may also be called Commit Size. It depends on the tool and the version of Windows. But it is always the "biggest" one because it includes all memory requested by 4D. For a really good (if heavy) explanation of what these different values mean, check out:

https://blogs.technet.com/markrussinovich/archive/2008/07/21/3092070.aspx

Using Activity Monitor on Mac OS X, watch the "VSIZE" or ""Virtual Memory" column. But again be aware that different tools might label this column differently.

Finally a note regarding the concept of "Available Memory":

It has come to our attention that the Available Memory statistic is sometimes used to monitor server "health" (speaking of the machine, not 4D). If an administrator notices a general decrease in Available Memory, they might suspect a memory leak.

Available Memory is an operating system statistic, not a 4D statistic. It includes (or perhaps more accurately excludes) *everything* so has little value for monitoring 4D. If available memory is low it is certainly a symptom but not a very useful one. You need to know what is consuming that memory, so it is important to monitor memory used by all applications running on the machine.