Memory and Performance Problems

1: I am getting insufficient memory errors when I try to run my SUDAAN program.

2: My SUDAAN program is running very slowly. Is there anything I can do to speed it up?

1: I am getting insufficient memory errors when I try to run my SUDAAN program.

There are many things you can do that may improve the situation, depending on the platform.

  • In all Windows versions, close down as many other applications as possible when you are executing SUDAAN.
  • Try to free up disk space on your C: (or other) drive where the TEMP directory is located, so that SUDAAN will have more swap space available.
  • Increase the maximum page file size for virtual memory

Increasing Maximum Page File Size for Virtual Memory on PC Platforms

Platform

Instructions

Windows NT, 2000, XP
  • Click on Start, then Settings then Control Panel
  • Click on the System icon
  • Select the Advanced tab (Windows 2000 and XP)
  • Click on Performance Options
  • Under Virtual Memory click on Change
  • For each installed hard drive you can specify minimum and maximum page file sizes. Enter a larger maximum page file size (for example 2000) and click on Set
  • Click on OK until you return to Control Panel
  • Close Control Panel
Windows 95, 98 and ME
  • Click on Start, then Settings then Control Panel
  • Click on the System icon
  • Select the Performance tab
  • Click on Virtual Memory
  • Click on the option Let me specify my own virtual memory settings.
  • Specify a new maximum page file size (for example 1000)
  • Click on OK until you return to Control Panel
  • Close Control Panel. You may be prompted to reboot in order for the settings to take effect. Make sure all other applications are closed, and click Yes.
  • On Solaris, follow these instructions to increase virtual memory:

    1. Determine the virtual memory you have available using the "vmstat" command.

    2. To create additional virtual memory, do the following. This example will create a 1 gigabyte swap file. You may modify the size according to your need:

  • create a swap file using the command
    "mkfile 1000M swap"
  • Execute the swap command with the -a option as

    "swap -a /usr/local/swap"

3. Attempt to execute your SUDAAN job.

4. If not successful, repeat steps 2 and 3.

5. If step 3 works, you may want save this swap file for future use. Do this by saving the information in the /etc/vfstab file. This will allow you to maintain the same virtual memory even after a reboot.

  • For SAS-Callable SUDAAN, specify the system option MEMSIZE, which controls how much memory the SAS system uses, with a larger memory size. For example, memsize 100m.

<Return to TOP>

2: My SUDAAN program is running very slowly. Is there anything I can do to speed it up?

If you have a lot of other programs running at the same time as SUDAAN, SUDAAN's share of the memory may not be large enough to prevent thrashing as it continually swaps out to disk. You can try one or more of the following:

  • Run this program with no other programs running.
  • Run in batch mode rather than in interactive mode. This way you don't need all the memory for loading the interface.
  • Try to free up disk space on the drive containing your TEMP directory so that SUDAAN has more swap space.
  • If your data file is big, you may be burning time with IO. You could possibly reduce this some by converting the data to a SUDAAN file (using PROC records). By default SUDAN data sets are compressed. For large data you may significantly speed up IO even though SUDAAN must uncompress the data at run-time.

<Return to TOP>