MathGroup Archive 2011

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

Search the Archive

Re: How to kill slave kernel securely?

  • To: mathgroup at
  • Subject: [mg117474] Re: How to kill slave kernel securely?
  • From: "Alexey Popkov" <lehin.p at>
  • Date: Sat, 19 Mar 2011 05:22:07 -0500 (EST)

Oliver Ruebenkoenig <ruebenko at> wrote:
> On Thu, 10 Mar 2011, Alexey Popkov wrote:
> > 2) My bitter experience with MemoryConstrained clearly shows that it is
> > a reliable function. It practical cases when I heavily use such
functions as
> > NDSolve, NIntegrate etc. it often allows MathKernel to take for example
> > 500-900 MB more that I have set. And system goes into swapping...
> You could forward that to the tech support for us to look at.
> Oliver

I have found today a simple example when MemoryConstrained fails:

In[1]:= MaxMemoryUsed[]
  Quiet@Module[{f, n = 0},
     f[x_] := f[x + 1] + Plus @@ Table[Random[], {10^7}];
     Block[{$RecursionLimit = 3000}, f[0]]];, 90000000];

Out[1]= 10757752

Out[3]= 291258232

You can see that MathKernel takes more than 260 Mb additional memory in peak
although only less than 90 Mb additional memory was allowed by
MemoryConstrained. This behavior is machine-dependent. Try to play with the
memory constrain if you cannot reproduce.

As I said before, my experience shows that in practice the overshoot can be
900 Mb and more! This often happens in complicated computations with heavy
usage such functions as NDSolve and NIntegrate inside loops.


  • Prev by Date: FindMinimum slow in evaluation
  • Next by Date: Re: Mathematica pegs core - Can anyone else reproduce?
  • Previous by thread: Re: How to kill slave kernel securely?
  • Next by thread: FinishDynamic out of Dynamic enviroment