[Vm-dev] Setting minimum time threshold before freeing memory?

Eliot Miranda eliot.miranda at gmail.com
Sat Mar 21 04:53:23 UTC 2020


Hi Phil,


> On Mar 20, 2020, at 10:57 AM, Phil B <pbpublist at gmail.com> wrote:
> 
> 
> I've been noticing at times that the VM seems to churning a bit re: allocating and freeing memory.  Granted, this is due to the workload I'm throwing at it (i.e. periodically perform a task that creates a number of Forms which are short-lived, for example) but it seems a tad aggressive on the free side.  What I'm wondering is if there's a VM parameter to slow down the rate at which it will free up memory? (i.e. alloc whenever needed, but free no sooner than X seconds after the last alloc)

There are two main parameters.  One is the size of eden.  Make this 64Mb (default 4mb 32-bits, 8Mb 64-bits).  The second is the GC growth ratio (can’t remember the name but it is assigned in setGCParameters).  This determines how much growth in heap size there is before a full GC kicks in.  If your usage is bursty then setting this high is probably a good idea.

HTH

_,,,^..^,,,_ (phone)


More information about the Vm-dev mailing list