fikisipi / elkai

elkai is a Python library for solving travelling salesman problems (TSP) based on LKH 3
Other
172 stars 17 forks source link

RAM memory is not free #15

Open hnnam0906 opened 3 days ago

hnnam0906 commented 3 days ago

When I run elkai with a large number of tests, I see that the RAM memory increases and is not free. So when the RAM memory reaches the maximum of computer RAM (64GB/128BM) it must be restarted to free memory to be able to run.

image

As you can see in the above photo, i run 2 instances with pm2, 1 instance uses 26.6GB, the other has to restart 1 (The curved arrow icon column) to free the memory so that it can be run again.

fikisipi commented 11 hours ago

I'll take a look when I have time. I had valgrind running with no memory leaks but it's been a long time. I'm sure there could be leaks now.

pm2 as far as I know is a npm project.

  1. How do you run the tests more specifically? Does one process have multiple threads?
  2. How big are your matrices?
  3. Assuming you need this fast and I cannot fix it, consider just creating a new interpreter once you run many tests.