Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Re: Cannot allocate more than 779 MB to STATA11


From   Sergiy Radyakin <[email protected]>
To   [email protected]
Subject   Re: st: Re: Cannot allocate more than 779 MB to STATA11
Date   Wed, 30 Dec 2009 12:27:10 -0500

On Wed, Dec 30, 2009 at 10:26 AM, Quantitative Decisions
<[email protected]> wrote:
> Roland Andersson inquires,
>>
>> I have win XP 32 bit and 2 MB of memory.

Highly unlikely. Most probably 2GB of memory

>>
>> With Stata9 I can allocate 1200 MB of memory but with Stata9 only 770 MB.

perhaps one should be "with Stata11" in the above ^^^^^^^^^^^^?

>> This is a significant difference. I often needed 850-900 MB of memory in my
>> analyses, but can not do this with Stata11.

use the 64-bit version. your Stata license should work on all platforms.

>> ...
>> I think Stata should inform customers about the larger program overhead in
>> Stata11 that decreases the amount of memory that can be allocated.

Indeed this warning is on Stata's website: "Depending on where Windows loaded
the initial libraries, this may be 1.8 GB, 1.3 GB, or even less. You may be
surprised to find that a 1.4-GB dataset loaded fine one time but failed to load
later. This is simply an unfortunate side effect of Windows memory management."

http://www.stata.com/support/faqs/win/winmemory.html


>
> (Please forgive me if this has been addressed--I receive the digest which is
> a little untimely.)
>
> Having just upgraded from 8.2/SE to 11.0/IC on a similar system, I find
> little difference in overhead.  For example, Windows Task Manager currently
> reports an overhead of less than 11 MB just after startup, net of its memory
> allocation.  With 1.11 GB memory in use by the OS and other processes (e.g.,
> Mathematica is currently sitting on 400 MB), Stata is still able to claim a
> 925 MB chunk: in effect, all of the remainder.  I can allocate and
> deallocate memory repeatedly (set mem 925m / set mem 1m) and Stata's net
> "footprint" (VM Size in the Task Manager) does not grow, indicating no
> memory leak.
>

Windows isolates tasks. It is irrelevant if you have Mathematica running, unless
you've constrained Windows to use only physical memory or have a fixed
swap file,
then you should be getting a message "Windows memory is running low"
http://farm2.static.flickr.com/1004/1025573804_a089b8e10b.jpg.

With virtual memory constraint the programs compete for the total permitted
memory, but still each within its own address space!
Win32 process memory = 4Gb = 2Gb program + 2Gb libraries (or 3+1 in some
configurations)

What matters is which libraries Stata itself is using:
http://www.stata.com/statalist/archive/2007-09/msg00286.html

VM Size SHOULD change when you "set mem 900m" after "set mem 1m"
reflecting larger use of memory by Stata

If it does not change after you "set mem 1m" after "set mem 900m", that is an
indication of a memory leak "Stata not releasing allocated memory resources"
(http://en.wikipedia.org/wiki/Memory_leak)

BE CAREFUL with repetetive allocation/deallocation of memory in Stata.
I have provided
the Stata developers with a sample code that crashes Stata (Windows version) by
allocating memory in a certain strategy. It crashes Stata's 9, 10 and
11 in both 32
and 64-bit variants with a "Memory reallocation failed" message.
Specifically it does
crash the latest available to date executable of StataMP-64 (born 21
Oct 2009), but
as far as I understood this is going to be fixed in the future versions.

These links may be helpful:

How do I load large datasets (>1 GB) under 32-bit Windows?
I receive an error r(909) saying “op. sys. refuses to provide memory”.
http://www.stata.com/support/faqs/win/winmemory.html

Why can’t I allocate as much memory on Stata 10 as I could on
Stata 9, if I am using Windows XP?
http://www.stata.com/support/faqs/win/memoryxp.html


> Therefore, I find no evidence that recent versions of Stata consume
> significantly more overhead.  Most likely some other process has claimed
> some RAM.  The solution is to reboot, log on, start Task Manager, sort the
> processes by VM Size, see what's going on, free up RAM if necessary, and
> check how much Stata can then allocate.

Not sure how you defined "overhead" here, but the keyword is "Memory
fragmentation", not "overhead". Again, the fact that "some other process has
claimed some RAM" does not have any effect on Stata's possibility to allocate
memory in it's own address space.

See: http://en.wikipedia.org/wiki/Memory_fragmentation (in particular "external
fragmentation").


Best, Sergiy Radyakin







>
> Best,
>
> Bill Huber
> Quantitative Decisions
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index