MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to reduce memory usage of the MathKernel.exe?

  • To: mathgroup at
  • Subject: [mg93021] Re: How to reduce memory usage of the MathKernel.exe?
  • From: Jens-Peer Kuska <kuska at>
  • Date: Fri, 24 Oct 2008 02:28:32 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <gdmsae$i4$>
  • Reply-to: kuska at


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.


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

  • Prev by Date: Mathematica Equivalent of Excel VLOOKUP function
  • Next by Date: Re: Expressions with ellipsis (...)
  • Previous by thread: How to reduce memory usage of the MathKernel.exe?
  • Next by thread: Re: How to reduce memory usage of the MathKernel.exe?