11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6 Setting the size of memoryContents6.1 Memory-size considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616.2 Setting memory size on the fly: Stata/MP and Stata/SE . . . . . . . . . . . . . . . . . . . . . . . . 616.2.1 Advice on setting maxvar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626.2.2 Advice on setting matsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636.2.3 Advice on setting memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646.3 Setting memory size on the fly: Stata/IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656.4 The memory command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656.5 Virtual memory and speed considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676.6 An issue when returning memory to Unix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676.1 Memory-size considerationsStata works with a copy of the data that it loads into memory.By default, Stata/MP and Stata/SE allocate 50 megabytes and Stata/IC allocates 10 megabytes toStata’s data areas, and you can change it.By default, Small Stata allocates about 950 K to Stata’s data areas, and you cannot change it.You can even change the allocation to be larger than the physical amount of memory on yourcomputer because Windows, Mac, and Unix systems provide virtual memory.Virtual memory is slow but adequate in rare cases when you have a dataset that is too large toload into real memory. If you use large datasets often, we recommend that you add more memoryto your computer.inOne way to change the allocation is when you start Stata. Instructions for doing this are providedWindowsMacUnix[GSW] C.4 Specifying the amount of memory allocated[GSM] C.2 Specifying the amount of memory allocated[GSU] C.2 Specifying the amount of memory allocatedAlso, if you use Stata/MP, Stata/SE, or Stata/IC for Windows, Unix, or Mac, you can change thetotal amount of memory allocated while Stata is running. That is the topic of this chapter.It does not matter which method you use. Being able to change the total on the fly is convenient,but even if you cannot do this, it just means that you specify it ahead of time. If later you need more,simply exit Stata and reinvoke it with the larger total.6.2 Setting memory size on the fly: Stata/MP and Stata/SEThere are three limits in Stata/MP and Stata/SE that affect memory allocation and usage. The threelimits are1. maxvar, the maximum number of variables allowed in a dataset. This limit is initially set to5,000; you can increase it up to 32,767.61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!