Home › Forums › kdb+ › Heap is a lot larger than used, how to find the cause? › Re: Heap is a lot larger than used, how to find the cause?
-
I wasn’t able to replicate the issue on my local machine running on KDB+ 4.0 2020.07.15:
My heap returned back to the level it was at the start of the Q session on release as expected.
However I was able to recreate the issue running KDB+ 4.0 Cloud Edition 2022.01.31.
So the issue seems to lie with QCE releasing back to OS. I’ll follow up internally on this to see if it’s a known issue and what can be done to minimise the heap used.
However, per the screenshot I wasn’t able to recreate the re-assigning of position via IPC call not lowering heap after running .Q.gc[] (heap is the same after GC and re-assigning this as initial assign and GC).
As a potential fix to this can you try before your second assignment of position purging it from memory:
delete position from `. .Q.gc[]
.Q.w[] // to inspect position:h”position”
.Q.w[] // to inspect .Q.gc[]
.Q.w[] // to inspect