You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDIT : After looking into details, the client/scheduler seems to store some "informations" about the network status (and other stuff) after doing calculations. Doing client.map(...) ... client.gather() loops seems to slightly increase these data at each loop. In my configuration it ends blowing up my memory.
Doing a client.restart() resets this data and thus release the memory. However, restarting all workers can take some times (more than 5 minutes in my case) and is thus prohibitive.
Is there some way to wipe out the data stored by the client/scheduler without restarting the workers ?
Thanks
ORIGINAL MESSSAGE:
I suspect some memory leak in my simple code du to dask. My code structure looks like
from dask_jobqueue import PBSCluster
from distributed import Client
cluster = PBSCluster()
cluster.start_workers(Nworkers)
client = Client(cluster)
for i in range(N):
res = []
myjobs = client.map(myfunction, updated_args)
res = client.gather(myjobs)
write_on_the_disk(res)
After each for-loop, the memory usage of my process is larger, leading after some iterations to a memory crash. I verified that all my functions in the loop do not increase the memory usage (by writing the results on the disk).
I thus suspects that there is some informations stored by dask (maybe in the scheduler ?) at each for-loop that is not been freed at the end of the loop.
For my code, it represents 1GB at each loop wich "rapidly" makes my code crashing.
Is there some mean to freed this memory ?
(In the same spirit, the memory on each of my workers do not seem to be entirely freed after being gathered too)
The diagnostic logs are bounded and tend not to contribute much to memory use (at least that's my experience). If you're able to find a particular cause of the memory leak that would be very welcome. There is no method to automatically clear out these logs.
Hi @mrocklin
No problem for the delayed response and thanks. Since then, I have done some other tests. It looks like that my memory leaks are due to the HPC (I/O on the disk) and not related to dask/distributed. See issue.
I updated all my libraries and redo the test. I wasn't able to release the memory even restarting/killing client and erasing all my variables.
For now, I am not suspecting the scheduler anymore and will try soon my code on another HPC.
Sorry for the noise. I will close the issue.
@lanougue Why were there issues using PBS? I've been trying to start a client within a PBS submission script, but half of my jobs have been getting killed
What would you recommend in this case then? I am trying to access a large array and compute on hundreds of thousands of smaller subarrays and store the results in a dask array, one row per subarray stats. I'd like to do this for a hundred large arrays, I thought I'd submit each of them as PBS jobs. @lanougue
Activity
mrocklin commentedon Nov 16, 2018
(sorry for the delay in response)
The diagnostic logs are bounded and tend not to contribute much to memory use (at least that's my experience). If you're able to find a particular cause of the memory leak that would be very welcome. There is no method to automatically clear out these logs.
lanougue commentedon Nov 16, 2018
Hi @mrocklin
No problem for the delayed response and thanks. Since then, I have done some other tests. It looks like that my memory leaks are due to the HPC (I/O on the disk) and not related to dask/distributed. See issue.
I updated all my libraries and redo the test. I wasn't able to release the memory even restarting/killing client and erasing all my variables.
For now, I am not suspecting the scheduler anymore and will try soon my code on another HPC.
Sorry for the noise. I will close the issue.
jlevy44 commentedon Jul 19, 2019
@lanougue Why were there issues using PBS? I've been trying to start a client within a PBS submission script, but half of my jobs have been getting killed
jlevy44 commentedon Jul 19, 2019
I'm not writing data to the disk through. That worked fine for me.
lanougue commentedon Jul 19, 2019
My problem is not PBS related. It is an I/O issue on some disk of our cluster.
jlevy44 commentedon Jul 19, 2019
Oh okay.
Do you know if it's possible to run a local cluster within a submitted PBS job?
lanougue commentedon Jul 19, 2019
On Ifremer cluster, running a LocalCluster never worked for me. But it works like a charm on my personnal laptop (without PBS).
jlevy44 commentedon Jul 19, 2019
What would you recommend in this case then? I am trying to access a large array and compute on hundreds of thousands of smaller subarrays and store the results in a dask array, one row per subarray stats. I'd like to do this for a hundred large arrays, I thought I'd submit each of them as PBS jobs. @lanougue
jlevy44 commentedon Jul 19, 2019
Each large array is submitted as a separate command.
lanougue commentedon Jul 19, 2019
This question is a different topic. You should post in another issue