Clearing the FileMaker Cache...Pros and Cons?

Below is an AppleScript to make it easier to "Clear the FileMaker Cache".
(replace <sys_acc_name> with your system_account_name)

I am regularly switching between client FileMaker systems (some quite big) to work on them and am wondering what the aggregate effect might be.

Perhaps I am better off Clearing the FileMaker Cache between opening different big systems so as to get a dedicated cache each time.

Pros and Cons?

    use AppleScript version "2.4" -- Yosemite (10.10) or later
    use scripting additions

    tell application "Finder"
    		open POSIX file "/Users/<sys_acc_name>/Library/Caches/com.filemaker.client.advanced/"
    		set bounds to {2, 23, 882, 352}
    	end try
    		open POSIX file "/Users/<sys_acc_name>/Library/Caches/com.filemaker.client.advanced12/"
    		set bounds to {2, 354, 882, 683}
    	end try
    		open POSIX file "/Users/<sys_acc_name>/Library/Caches/FileMaker"
    		set bounds to {2, 684, 882, 1014}
    	end try
    end tell




Why do you have set bounds steps.
I came up with that, that will zero_in existing cache file and lock them, so you don't need to re-run it (if you're using the same files, if you use new filemaker database file, you need to re-run it)

But I didn't know about com.filemaker.client.advanced12, com.filemaker.client.pro12 thanks for that (so my script don't adress them, but that's easily fixable). I don't know what they are though (they look like webviewer cache ?)

I don't know what the aggregate effect of the cache might be... I use cache clearing to test before/after-cache performance for operations I know might be expensive the first time. E.g. to test a worst-case-scenario performance of an ExecuteSQL call.

I have an alias fmClearCache in my ~/.bash_profile which does this:

rm -rf /Users/<youruser>/Library/Caches/FileMaker/DBCache
rm -f /Users/<youruser>/Library/Caches/com.filemaker.client.pro12/*

NC='\033[0m' # No Color
echo -e "${RED}FM CACHE CLEARED!${NC}"

To test something I simply close, fmPro, run fmClearCache in terminal and reopen the file.

1 Like

Slightly off topic, but commenting on performance and resource usage. We stream the vast majority of our FileMaker Pro licenses from cloud servers, which are connected to FileMaker Server cloud servers. As we pay for our online VMs by RAM, vCPUs and storage, we keep a very close eye on usage. With a server streaming FileMaker for up to 50 accounts (50 is our maximum per server to avoid single points of failure and avoid IO/network bottlenecks) we have to make a judgement call on the amount of RAM and vCPUs required. This is subjective due to the way each person uses their account.

Memory, not cache, usage is affected by a number of issues. Users opening multiple windows results in a significant increase in RAM usage. Increasing the RAM cache in Preferences will increase the RAM allocated.

From a development point of view, extended layout design work will gradually and consistently increase the RAM used. Likewise, extended use of the Script Debugger and in particular the Data Viewer, will do likewise. Doing both increases RAM allocation further and it is not unusual to see between 1.5Gb and 2Gb allocated to a developer’s session. User sessions never approach these figures, but some can grow to a point where we have to increase resources to prevent some users affecting performance for others on the same server. Standard use will tend to end up with between 275Mb and 500Mb allocated, depending on what they are doing.

FileMaker Pro never reduces its RAM usage until a user exits, which will leave their account in a disconnected state for a while, until it is logged out due to lack of activity. In this disconnected state, the RAM allocation falls to a minimal amount, with FileMaker having released all of its allocated RAM.

Someone mentioned above about FileMaker slowing down, which is what we see as RAM usage increases, particularly when working in layout mode. If we experience slowdown, we simply exit FileMaker and relaunch to regain normal speed, normally no more than once a day.

We’ve been streaming since FileMaker 11 and all versions since have behaved the same way.

I hope this is of interest.


1 Like

That's interesting. A locally installed and executed FMP does not show the same behaviour. It adds RAM with each file and additional window opened but does release it when the window/file is closed.
Do you know why FMP behaves differently in your environment?

Torsten, we’ve used both Citrix XenApp and Microsoft RemoteApp and FileMaker has behaved the same way with both.

We don’t use standard Remote Desktop other than for maintenance, so no idea if it behaves in the way you describe or as per our derivatives of it.

Oh, by the way, is this behaviour within a Mac or Windows environment?

we noticed the slow-downs with scriptworkspace open. A script that will run for 5 seconds can easily take much much more time - that much that we even canceled the script/process, leaving the content partly in a wrong state...
I did not notice this on macOS - we are on Win 8.1, FM 18 (the same under FM15). Memory usage may go up to 2.5 GB

We are on the way with VMWare Horizon, not Citrix. All systems are virtualized (FMS, FM clients). The system is sometimes in general 'not so crispy', outlook, windows explorer, etc. Network shouldbe fine, 10GB fibre. A 'general workstation' has 4GB of RAM (will be increased to 6GB), mine has 8GB

Because of home-office (MS Teams sessions...), the net-load is high, another factor..

Everything here is Mac-based, no Win machines involved. Did you try out the same FMP version with the same files on a local Win-FMP install?

Hi Markus

It would be good to compare notes offline in the future. I believe there are more people doing this than Claris probably imagines, but it isn’t discussed much publicly.

We only stream FileMaker and now have a couple of legacy Citrix XenApp servers that are being wound down. All current servers stream FileMaker to Macs, Windows, IOS, Android (could be Linux, ChromeBook, etc.) via Microsoft RemoteApp from Windows 2012, 2016 and 2019 servers using Workspaces. We don’t provide a Windows Desktop or any other apps, other than supporting utilities such as Adobe Reader. Everything is on the same VLAN within our Internet infrastructure supplier, so very speedy FileMaker Pro to FileMaker Server connections. FileMaker looks as if it is just another Windows app in a Windows task bar and requires Microsoft Remote Desktop for Macs.

I think this RAM behaviour is probably unique to Windows and not Macs, and I believe it is probably the same on a local version of Windows as @Torsten suggests. We do so little working away from our streaming systems that I haven’t really tested in earnest.

Out of curiosity I did a quick test, comparing FMP on 2 MacBook Pro, running MacOS 11.2.1 (machines with identical specs)
Files hosted on MacMini M1 MacOs 11.2.1, FMS 19.2 (all latest releases)
Local gigabit network

1 MacBook is controlled through ARD, the other is the one on my desk (local)
As you can see, there is almost no difference in memory consumption between local and ARD when FMP is launched, no files open.
However, a difference appears when files are open. FMP on the ARD-controlled Mac takes some more memory (see screenshots). I am not an expert in remote control or virtualisation technology and do not have an explanation for that difference.

Interesting, thanks Torsten