Open longhuihy opened 2 days ago
After performing full GC, both heap and non heap memory decreased to a very low level, but container monitoring showed that there was still a large amount of memory that was not reclaimed, ultimately leading to exceeding the container's limits of memory
can you try with ModelBuilder ?
This is the memory change curve, during which a container automatic restart occurred
If the memory returns to low level, then most likely there are no memory leak. Just the GC buckling under pressure.
There are some parameters to alleviate this. Or maybe just for a garbage collect after each solve.
If the memory returns to low level, then most likely there are no memory leak. Just the GC buckling under pressure.
There are some parameters to alleviate this. Or maybe just for a garbage collect after each solve.
Thanks for your reply. After performing full GC, both heap and non heap memory decreased to a very low level,But the total memory usage of pods is still very high.
Previously, I only called MPSolver. delete() after the solution was completed, but the memory could not be released. I tried calling MPVariable. delete() and MPConstraint. delete() one by one, but encountered an error during execution.
this has happened before, and the solution was to tweak the GC parameters on the jvm.
It is still possible there is a leak. We do now own the SCIP code. But currently, there is no indication this is the case.
variables and constraints are owned by the solver. you cannot delete them yourself.
--Laurent
What version of OR-Tools and what language are you using? Version: 9.10.4067
Language: C++/Java/Python/C# Java
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi) SCIP MPSolver solver = new MPSolver("SCIP", MPSolver.OptimizationProblemType.SCIP_MIXED_INTEGER_PROGRAMMING);
What operating system (Linux, Windows, ...) and version? NAME="Oracle Linux Server" VERSION="8.5"
What did you do? The model I am solving is not very large in scale, but I will serially call to solve dozens to hundreds of models of similar scale, resulting in an increase in memory. I will investigate if it is not the JVM's heap memory and out of heap memory because I have printed out the heap memory and out of heap memory, which is likely caused by or-tools memory leakage
What did you expect to see
What did you see instead?
Make sure you include information that can help us debug (full error message, model Proto).
Anything else we should know about your project / environment