Re: How to reduce memory usage of the MathKernel.exe?
- To: mathgroup at smc.vnet.net
- Subject: [mg93021] Re: How to reduce memory usage of the MathKernel.exe?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 24 Oct 2008 02:28:32 -0400 (EDT)
- Organization: Uni Leipzig
- References: <gdmsae$i4$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, a) you should set th global variable $HistoryLength=0 b) you should call Share[] periodical, but not to often c) it depends on your computation if ClearSystemCache[] helps, in numerical calculations I would not expect an huge effect. Regards Jens Janneke Baetens wrote: > Hi all, > > Currently, I'm using Mathematica 6.0 on a Windows XP machine which has 2 Gb of RAM to perform massive numerical computations. It all works great but sometimes the Kernel needs to shut because it's out of memory. I can follow this memory depletion in the Windows task manager. > > First, I thought this would be caused be wanting to store too much variables consisting of millions of elements. Because of that I tried to clear the memory after each individual computation by using the command ClearSystemCache, though this doesn't seem to affect the memory needed by the MathKernel. Even if I used that command and clear all variables the kernel keeps on needing the same amount of memory as I can see in the Windows Task Manager. > > Only by killing the kernel and afterwards starting a new one it's possible to execute a new massive computation. I think there must be a more subtle manner to reduce the memory use by the Kernel but so far I didn't find any. > > I wonder whether anyone on this list has a good suggestion. > > Best regards, > > Jan Baetens > Ghent University >