disable controller System.GC() by default

Description

The background controller thread runs a System.GC() every 5 minutes.

With modern JVMs, it’s better to let the JVM manage this itself, which is considered best practise.

Add the ability to re-enable via LUCEE_CONTROLLER_GC / lucee.controller.gc which defaults to false

When enabled, it should run after all other controller processes to GC scope expiry etc

Activity

Show:

Zac Spitzer 11 January 2025 at 10:34

running our simple benchmarks, overall a slight reduction in raw performance, but using less memory

6.2.0.276 https://github.com/lucee/lucee-testlab/actions/runs/12693124192

6.2.0.280 https://github.com/lucee/lucee-testlab/actions/runs/12723254329

Zac Spitzer 11 January 2025 at 09:56

with GC enabled

[java] [script] Warmup hello-world, inspect: [never] [java] [script] Running hello-world [5,000k-never] [java] [script] start GC [java] [script] end GC [java] [script] Finished hello-world [5,000k-never] took 166,984 ms, or 29,943 per second, 5000000 completed, at [{ts '2025-01-11 10:54:25'}] [java] [script] [java] [script] -------test run complete------ [java] [script] HEAP G1 Eden Space: 0%, 1,644 Mb, (+ 1,640Mb ) [java] [script] HEAP G1 Old Gen: 9%, 749 Mb, (+ 712Mb ) [java] [script] HEAP G1 Survivor Space: 0%, 392 Mb, (+ 390Mb ) [java] [script] -------trigger GC------ [java] [script] HEAP G1 Eden Space: 0%, 0 Mb, ( -4Mb ) [java] [script] HEAP G1 Old Gen: 0%, 62 Mb, (+ 25Mb ) [java] [script] HEAP G1 Survivor Space: 0%, 0 Mb, ( -2Mb )

disabled

[java] [script] Warmup hello-world, inspect: [never] [java] [script] Running hello-world [5,000k-never] [java] [script] Finished hello-world [5,000k-never] took 165,697 ms, or 30,176 per second, 5000000 completed, at [{ts '2025-01-11 10:50:39'}] [java] [script] [java] [script] -------test run complete------ [java] [script] HEAP G1 Eden Space: 0%, 0 Mb, ( -20Mb ) [java] [script] HEAP G1 Old Gen: 6%, 565 Mb, (+ 534Mb ) [java] [script] HEAP G1 Survivor Space: 0%, 380 Mb, (+ 375Mb ) [java] [script] -------trigger GC------ [java] [script] HEAP G1 Eden Space: 0%, 0 Mb, ( -20Mb ) [java] [script] HEAP G1 Old Gen: 0%, 64 Mb, (+ 32Mb ) [java] [script] HEAP G1 Survivor Space: 0%, 0 Mb, ( -5Mb )
Fixed

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Fix versions

Priority

Created 11 January 2025 at 08:48
Updated 23 January 2025 at 17:48
Resolved 11 January 2025 at 11:03

Flag notifications