I'm aware we can use something like this:
import psutil
process = psutil.Process(os.getpid())
mem_info = process.memory_info()
print(f'shap: {i} ---> {mem_info.rss},{mem_info.vms}')
I suspect the app is leaking memory. Is it a bad idea to measure memory usage from the app itself? I maybe overthinking this, but wondering if psutil library itself may skew the numbers?
I was thinking it's more reliable to measure memory from the OS. Using debian so maybe monitor memory with top ?