I'm using psutil to track memory. I create a tree-sequence using msprime and then delete it using del, but I end up with a larger memory footprint than I started with. I repeat this 5 times. Code for the experiment can be found here.
Output on machine 1:
3.7.6 (default, Jan 8 2020, 19:59:22)
[GCC 7.3.0]
Linux-5.6.18-300.fc32.x86_64-x86_64-with-fedora-32-Thirty_Two
Starting memory: 53424128
Simulation with seed 1
Memory after creation: 180576256
Memory after deletion: 112984064
Simulation with seed 2
Memory after creation: 213544960
Memory after deletion: 129990656
Simulation with seed 3
Memory after creation: 225144832
Memory after deletion: 129990656
Simulation with seed 4
Memory after creation: 212770816
Memory after deletion: 130056192
Simulation with seed 5
Memory after creation: 211693568
Memory after deletion: 130056192
Output on machine 2:
3.6.8 (default, Sep 4 2019, 15:16:28)
[GCC 7.2.0]
Linux-3.10.0-957.10.1.el7.x86_64-x86_64-with-centos-7.6.1810-Core
Starting memory: 46424064
Simulation with seed 1
Memory after creation: 204124160
Memory after deletion: 91934720
Simulation with seed 2
Memory after creation: 203247616
Memory after deletion: 92504064
Simulation with seed 3
Memory after creation: 215572480
Memory after deletion: 92504064
Simulation with seed 4
Memory after creation: 203956224
Memory after deletion: 110862336
Simulation with seed 5
Memory after creation: 202358784
Memory after deletion: 109260800
On machine 1, if I create and destroy a large numpy array instead, the memory goes back to what it was at the start.
3.7.6 (default, Jan 8 2020, 19:59:22)
[GCC 7.3.0]
Linux-5.6.18-300.fc32.x86_64-x86_64-with-fedora-32-Thirty_Two
Starting memory: 53129216
Simulation with seed 1
Memory after creation: 852983808
Memory after deletion: 53166080
Simulation with seed 2
Memory after creation: 853118976
Memory after deletion: 53166080
Simulation with seed 3
Memory after creation: 853118976
Memory after deletion: 53166080
Simulation with seed 4
Memory after creation: 853118976
Memory after deletion: 53166080
Simulation with seed 5
Memory after creation: 853118976
Memory after deletion: 53166080
On machine 1, if I create a larger tree-sequence, the memory I am left with after deletion is larger than in the first case.
3.7.6 (default, Jan 8 2020, 19:59:22)
[GCC 7.3.0]
Linux-5.6.18-300.fc32.x86_64-x86_64-with-fedora-32-Thirty_Two
Starting memory: 52822016
Simulation with seed 1
Memory after creation: 323657728
Memory after deletion: 168804352
Simulation with seed 2
Memory after creation: 425463808
Memory after deletion: 217272320
Simulation with seed 3
Memory after creation: 430809088
Memory after deletion: 218316800
Simulation with seed 4
Memory after creation: 431714304
Memory after deletion: 232177664
Simulation with seed 5
Memory after creation: 423677952
Memory after deletion: 232177664
I am using tskit 0.2.2 on machine 1 and 0.2.1 on machine 2.
I'm using
psutilto track memory. I create a tree-sequence usingmsprimeand then delete it usingdel, but I end up with a larger memory footprint than I started with. I repeat this 5 times. Code for the experiment can be found here.Output on machine 1:
Output on machine 2:
On machine 1, if I create and destroy a large numpy array instead, the memory goes back to what it was at the start.
On machine 1, if I create a larger tree-sequence, the memory I am left with after deletion is larger than in the first case.
I am using tskit 0.2.2 on machine 1 and 0.2.1 on machine 2.