Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: memory problem where over 50% of memory are free


From   "Stephan Brunow" <[email protected]>
To   <[email protected]>
Subject   st: memory problem where over 50% of memory are free
Date   Tue, 10 Apr 2007 11:10:06 +0200

Dear Statalisters,

I have a problem concerning the memory storage. There is a quiet large
dataset. If I use just 6 variables,


 obs:    21,041,596                          
 vars:             6                          
 size:   336,665,536 (56.8% of memory free)
----------------------------------------------------------------------------
---
              storage  display     value
variable name   type   format      label      variable label
----------------------------------------------------------------------------
---
persnr          long   %12.0g            
year1           int    %8.0g                 
month1          byte   %8.0g             
year2           int    %8.0g                  
month2          byte   %8.0g            
util 	          int    %8.0g                  
----------------------------------------------------------------------------
---

I set the memory quiet large:


. memory
                                                  bytes
--------------------------------------------------------------------
Details of set memory usage
    overhead (pointers)                      84,166,384       10.79%
    data                                    252,499,152       32.37%
                                        ----------------------------
    data + overhead                         336,665,536       43.15%
    free                                    443,475,000       56.85%
                                        ----------------------------
    Total allocated                         780,140,536      100.00%
--------------------------------------------------------------------
Other memory usage
    set maxvar usage                          1,816,666
    set matsize usage                         1,315,200
    programs, saved results, etc.                 2,585
                                        ---------------
    Total                                     3,134,451
-------------------------------------------------------
Grand total                                 783,274,987


At least, over 50% of allowed memory are free. There should be enought place
to generate 2 or 3 integer variables. However, if I do the following I
recieve the error message that there is no room to add a variable due to
width. I can wheter compress the data nor drop variables since it is
compressed and I need these 6 variables.

Here is the command: 

. by persnr, sort: egen int maxyear2=max(year2)

What might be the problem, what should I do?

With many thanks,

Stephan

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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