I run these codes:
@time for i = 1 : 50
_empty!.(dit)
_update(dit,dil)
@time distral(calc_ptm)
end
distral(calc_ptm)
is running on multiple threads. Here is the resulte:
16.408509 seconds (15.03 M allocations: 1.160 GiB, 87.29% gc time, 8.77% compilation time)
0.966252 seconds (12.99 M allocations: 1.059 GiB, 6.43% compilation time)
0.756220 seconds (12.93 M allocations: 1.056 GiB, 12.48% compilation time)
0.687300 seconds (12.92 M allocations: 1.055 GiB, 4.60% compilation time)
0.798255 seconds (12.91 M allocations: 1.054 GiB, 12.11% compilation time)
0.766506 seconds (12.86 M allocations: 1.051 GiB, 6.66% compilation time)
0.823462 seconds (12.88 M allocations: 1.052 GiB, 11.30% compilation time)
0.826604 seconds (12.86 M allocations: 1.051 GiB, 1.86% compilation time)
0.745301 seconds (12.88 M allocations: 1.052 GiB, 4.22% compilation time)
119.144726 seconds (12.90 M allocations: 1.053 GiB, 99.30% gc time, 0.02% compilation time)
0.769532 seconds (12.87 M allocations: 1.052 GiB, 7.58% compilation time)
0.776132 seconds (12.86 M allocations: 1.052 GiB, 1.57% compilation time)
0.863049 seconds (12.87 M allocations: 1.051 GiB, 2.67% compilation time)
0.719255 seconds (12.86 M allocations: 1.050 GiB, 7.90% compilation time)
0.761964 seconds (12.87 M allocations: 1.051 GiB, 1.80% compilation time)
0.794154 seconds (12.87 M allocations: 1.051 GiB, 5.70% compilation time)
0.744420 seconds (12.88 M allocations: 1.052 GiB, 5.56% compilation time)
0.791541 seconds (12.87 M allocations: 1.051 GiB, 1.62% compilation time)
0.767297 seconds (12.86 M allocations: 1.051 GiB, 1.66% compilation time)
0.774355 seconds (12.85 M allocations: 1.050 GiB, 1.73% compilation time)
0.752894 seconds (12.85 M allocations: 1.050 GiB, 1.32% compilation time)
0.819478 seconds (12.84 M allocations: 1.049 GiB, 10.69% compilation time)
0.871703 seconds (12.84 M allocations: 1.050 GiB, 4.64% compilation time)
0.879502 seconds (12.87 M allocations: 1.052 GiB, 1.34% compilation time)
0.754354 seconds (12.86 M allocations: 1.052 GiB, 1.42% compilation time)
0.813125 seconds (12.86 M allocations: 1.052 GiB, 1.28% compilation time)
0.861510 seconds (12.87 M allocations: 1.053 GiB, 5.99% compilation time)
0.775466 seconds (12.87 M allocations: 1.052 GiB, 5.04% compilation time)
0.721221 seconds (12.85 M allocations: 1.051 GiB, 1.07% compilation time)
0.882465 seconds (12.85 M allocations: 1.051 GiB, 0.83% compilation time)
0.849271 seconds (12.88 M allocations: 1.053 GiB, 6.32% compilation time)
0.875740 seconds (12.88 M allocations: 1.054 GiB, 1.36% compilation time)
1107.545609 seconds (12.90 M allocations: 1.054 GiB, 99.92% gc time, 0.01% compilation time: 91% of which was recompilation)
0.895698 seconds (12.87 M allocations: 1.052 GiB, 0.91% compilation time)
0.810025 seconds (12.86 M allocations: 1.052 GiB, 0.92% compilation time)
0.756983 seconds (12.86 M allocations: 1.052 GiB, 0.99% compilation time)
0.810946 seconds (12.85 M allocations: 1.052 GiB, 2.12% compilation time)
0.722169 seconds (12.87 M allocations: 1.053 GiB, 3.36% compilation time)
0.777227 seconds (12.86 M allocations: 1.052 GiB, 0.93% compilation time)
0.788414 seconds (12.87 M allocations: 1.052 GiB, 2.88% compilation time)
0.757612 seconds (12.86 M allocations: 1.052 GiB, 0.73% compilation time)
0.777249 seconds (12.86 M allocations: 1.052 GiB, 0.65% compilation time)
0.797138 seconds (12.86 M allocations: 1.053 GiB, 0.62% compilation time)
0.773889 seconds (12.86 M allocations: 1.054 GiB, 0.77% compilation time)
0.947090 seconds (12.88 M allocations: 1.054 GiB, 0.80% compilation time)
267.207840 seconds (12.89 M allocations: 1.055 GiB, 99.72% gc time, 0.03% compilation time)
0.832947 seconds (12.88 M allocations: 1.054 GiB, 1.13% compilation time)
0.821811 seconds (12.88 M allocations: 1.054 GiB, 0.79% compilation time)
0.766192 seconds (12.88 M allocations: 1.054 GiB, 1.47% compilation time)
0.799973 seconds (12.87 M allocations: 1.054 GiB, 0.71% compilation time)
1547.545871 seconds (646.22 M allocations: 52.749 GiB, 97.30% gc time, 0.19% compilation time: 3% of which was recompilation)
As can be seen above, there are some iters in the loop have many gc time. How can I avoid the unexpectly huge gc time ? I tried:
GC.enable(false)
@time for i = 1 : 50
_empty!.(dit)
_update(dit,dil)
@time distral(calc_ptm)
end
GC.enable(true)
But then, GC.gc()
is always in excueting, and seems never stop.