This is basically normal. There is no really good strategy. If there are several competing applications, this can lead to cash contests and false evictions.
If you select a threshold that is too low, you are losing cache space. If it is too high, nothing can fit into memory, including file cache, DLLs, ...
What do you mean by "accessible physical memory"? Do you mean installed memory or memory, which is free? How can an application use 80% of free memory? I do not understand what you are using.
SQL Server uses memory until the OS reports that it is inactive in memory (I believe this happens when 95% of "something" is used).
You certainly do not want to use the GC to free memory. It will usually kill your entire cache.
Maybe you can completely move the contents of the cache to disk? Or you could share the cache between .NET processes, having a hidden cache server process, which could be a request by application processes.
I want to emphasize that if your application consumes 99% of the installed RAM (as an example), the performance will be very bad, because the cache file is almost empty. This means that even DLLs and .NET NGEN'ed code will be downloaded frequently.
Perhaps the best strategy is to assume that 1GB is required for the proper caching of OS and application files. Thus, you can use the memory until there is only 10% of the installed RAM minus 1 GB.
source share