parpool workers never release virtual memory
21 次查看(过去 30 天)
显示 更早的评论
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 个评论
Matt J
2018-5-16
编辑:Matt J
2018-5-16
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
2022-2-25
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?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parallel Computing Fundamentals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!