parpool workers never release virtual memory
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I'm using parpool('local') on a 4-core workstation to solve some ga() problems launched with UseParallel=true. The issue I'm facing is that the workers keep allocating memory from operating system virtual address space and they never release (or reuse) it. What I can see from windows memory manager is that these workers have a memory working set quite normal (at most 1G) but they continue to require new memory from the operating system (causing the commit memory to grow up to the limit imposed by operating system, which is physical memory + swap space).
Generally, during the resolution of third problem by using ga() I get an out of memory error. Is it possible to release the memory allocated by the workers between the execution i and i+1 of ga()?
Thanks
3 commentaires
Matt J
le 16 Mai 2018
Modifié(e) : Matt J
le 16 Mai 2018
I may be seeing the same thing in Windows 10, R2017b. Here are the results of the memory() command at the beginning of my Matlab session after launching a parpool of 4 workers,
>> memory
Maximum possible array: 6226 MB (6.529e+09 bytes) *
Memory available for all arrays: 6226 MB (6.529e+09 bytes) *
Memory used by MATLAB: 1266 MB (1.328e+09 bytes)
Physical Memory (RAM): 8104 MB (8.498e+09 bytes)
Here is the same after running a bunch of code, then closing the pool, then running clear all,
>> memory
Maximum possible array: 6588 MB (6.908e+09 bytes) *
Memory available for all arrays: 6588 MB (6.908e+09 bytes) *
Memory used by MATLAB: 10730 MB (1.125e+10 bytes)
Physical Memory (RAM): 8104 MB (8.498e+09 bytes)
Suddenly I am consuming 11 GB according to the memory command and I can't get rid of it. However, the task manager tells a different story:

So, either the memory command is faulty or something else is afoot.
Adam Csigo
le 25 Fév 2022
I experience the very same issue, after starting local parpool each matlab background worker consumes around 1GB of memory and 7GB of committed memory (task manager, details and activate committed memory column) during an optimization process. Do you have any solution to decrease committed memory size of workers?
Réponses (0)
Voir également
Catégories
En savoir plus sur Parallel Computing Fundamentals dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!