Skip to content

Commit

Permalink
Allow for use 60% of constrained/total system memory (#48614)
Browse files Browse the repository at this point in the history
Remove the high watermark logic, because it doesn't really make sense,
and allow for use of 60% of system memory before aggressive GC kicks in.

Should fix #48473
  • Loading branch information
gbaraldi committed Feb 10, 2023
1 parent 1ef78a2 commit 500f561
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3252,14 +3252,9 @@ void jl_gc_init(void)
uint64_t constrained_mem = uv_get_constrained_memory();
if (constrained_mem > 0 && constrained_mem < total_mem)
total_mem = constrained_mem;
max_total_memory = total_mem / 10 * 6;
#endif

// We allocate with abandon until we get close to the free memory on the machine.
uint64_t free_mem = uv_get_available_memory();
uint64_t high_water_mark = free_mem / 10 * 7; // 70% high water mark

if (high_water_mark < max_total_memory)
max_total_memory = high_water_mark;
t_start = jl_hrtime();
}

Expand Down

0 comments on commit 500f561

Please sign in to comment.