Does anyone can figure out what is going on here?

In below, the code runned with mumtil-threads with using Theads.@threads. When I run it again and again, the percent of gc time becoming large and large. I don’t know what is going on here? Can anyone guess on it?

first running

@time dil(c25stra.stp1,c25stra.stp2);
71.885654 seconds (419.64 M allocations: 24.443 GiB, 26.99% gc time, 45.28% compilation time)

second running

@time dil(c25stra.stp1,c25stra.stp2);
72.888453 seconds (317.27 M allocations: 19.647 GiB, 68.90% gc time)

third running

@time dil(c25stra.stp1,c25stra.stp2);
263.029961 seconds (317.27 M allocations: 19.647 GiB, 92.53% gc time)

forth running


> dil(c25stra.stp1,c25stra.stp2)

253.931622 seconds (317.27 M allocations: 19.647 GiB, 92.27% gc time)

When run the code, it generate many Vector of Bitset. Is it the possible reason for that strange thing?

I get some hint.


this code return a matrix of BitSet like this, the size of it is ( 3million+, 3 ):

When I run a one-step forther code, which return a matrix of Float64, the strange thing disapear.

I guess, each time I run the dil(c25stra.stp1,c25stra.stp2), the returned matrix is catched by REPl in somewhere? It is never be trigged by gc untile I run the code again. Does it make a sense?

your RAM

My RAM has 32G volume

in Jupyter, there’s this global variable called Out that stores every cells’ result

1 Like

I checked it, the Out variable is Dict. So there is the my guessing reason, I run the code again and again, the Out variable is becoming larger and larger, which is increasing run out the RAM source, which generate more and more percent of gc time? Is that Right?
Is there a way to depracate the catching of Out?

use ; to suppress the return of cell.

It doesn’t work, it only suppress the output, but the Out variable is keeping catch the cell value. I have to keep empty!(Dict)