C H A P T E R  9

Virtual Memory Test (vmemtest)

The vmemtest checks virtual memory; that is, it tests the combination of physical memory and the swap partitions of the disk(s).

Note - This test may not stop immediately after being disabled.

This test uses the Solaris valloc (page aligned) system call to allocate, write, read, and compare virtual memory. These operations normally cause heavy paging activity on the system and simulate a stressful environment for the operating system. This test also detects ECC parity errors, memory read errors, and addressing problems, and displays the corresponding virtual memory addresses on failure.

Note - Do not run the vmemtest with fwcamtest at the same time on any
Sun Bladetrademark
system. This will cause the test to fail.

vmemtest Swap Space Requirements

Running this test places a significant burden on the operating system, since it uses the majority of swap space available for testing. You should use the vmemtest swap space reserve option when non-SunVTS test processes are started after SunVTS testing has started. See "Swap Space Requirements" in the SunVTS User's Guide for a complete discussion of swap space requirements.

vmemtest Options

To reach the dialog box below, right-click on the test name in the System Map and select Test Parameter Options. If you do not see this test in the System Map, you might need to expand the collapsed groups, or your system may not include the device appropriate to this test. Refer to the SunVTS User's Guide for more details.

FIGURE 9-1 vmemtest Test Parameter Options Dialog Box

Screenshot of the vmemtest Test Parameter Options dialog box.

TABLE 9-1 vmemtest Options

vmemtest Options



Two modes are available:

  • Regular mode tests the specified amount of memory as one chunk and passed as the size arugment to the different test algorithm functions (subtests).

  • Page mode tests assign virtual memory one page at a time. Each page is mapped to the temporary file /tmp/vmem.page and is then paged out to storage once test data is written. Next, the temporary page is paged back into memory for a read and compare.

    vmemtest runs in Regular mode as default setting


The Reserve option specifies the amount of memory to reserve from being tested by vmemtest. The test ensures this amount of memory is left free on the system while evaluating the size of memory for testing. If specified value of reserve is Zero, test will use a default value evaluated based on the available free swap space for the instance. Trying to reserve more memory than available free memory by this instance will cause the test to fail.

Test Amount

An amount can be specified to test the virtual memory, instead of the default.The default value is 0, which means the default memory size is evaluated within the test.It is desirable to the user to know the memory configuration details on the target system while choosing Non default setting for "amount" option.If negetive values are specified, test will assume default setting while it runs. The actual size of memory tested by the instance is always evaluated with reference to the available free swap space on the system.

vmemtest Configuration

The amount of memory listed in the Configuration field is equivalent to the sum of the used and available swap space amounts returned by the swap -s command. It indicates the amount of virtual memory found, rounded up to the nearest Kbyte.

Contiguous Errors

Specifies the max. number of contigious memory errors, which will be considered and counted as one non contigious error. The default value is 10.

Test Method

  • vmemtest runs Sequential subtest and FileCache subtest by default. Sequential subtest : The whole memory is tested from the beginning address to the end address in a sequence. Address Random subtest: Randomly selects memory addresses with in the specified range to test.

    Page Striding subtest: Non-contiguous memory test, implemented sequentially and non-sequentially. Sequential striding: tests from the first page to the last page, withn a specified test range. Only one word is tested per page. Non-sequential striding: tests randomly from first to last page, within a specified memory range. Goes back and forth testing one word per page until all pages are tested. Block Copy test: Writes and reads data between two memory blocks. Each memory block is half the memory to be tested. File Caching test: Aimed at improving performance through the use of file caching in the Solaris kernel. This test is useful for large memory configurations. This test takes 30 to 70% less time than the Sequential test method.

Predefined Pattern

  • Select one of the following patterns to use for the test: Address--uses the virtual addresses of the tested memory locations.walk_1--uses a pattern that starts with 0x80000000 through 0x11111111 walk_0--uses a pattern that starts with 0x7fffffff through 0x00000000 0x00000000--uses all ones and zeros for testing 0x5aa55aa5--uses 0x5aa55aa5 pattern 0xdb6db6db--uses 0xdb6db6db pattern Checkerboard--uses 0xaaaaaaaa patterns. UserDefined--uses the pattern that is specified in the User Defined Pattern area (see below).

User Defined Pattern

Only used if the Predefined Pattern is set to UserDefined. The pattern specified should be in the form of an 8-digit, hexadecimal number such as 0x2a341234. Default setting is up=0x7ff77ff7


Specifies how many copies of the vmemtest test to run.

vmemtest Test Modes
TABLE 9-2 vmemtest Supported Test Modes

Test Mode



Runs the full set of tests.

In Functional test mode, vmemtest writes a pattern to an amount of virtual memory specified by the user. Then the data is read back and compared. If there is a miscompare, the data is read again and compared. Whenever there is a miscompare, the virtual address is reported. When there is a miscompare on recomparison, an attempt is made to convert the virtual address to the physical address if the SunVTS diagnostic driver is installed.

vmemtest Command-Line Syntax

/opt/SUNWvts/bin/vmemtest standard_arguments -o mode=type, reserve= n, amount=n, type1=Enable|Disable, pp1=pattern, type2=Enable|Disable, pp2=pattern, type3=n, pp3=patten, type4=Enable|Disable, pp4=pattern, type5=Enable|Disable, pp5=pattern, type6=Enable|Disable, up=hex_pattern

TABLE 9-3 vmemtest Command-Line Syntax




Specifies which mode of the vmemtest to run. Choose:

  • Page--tells the write/read memory test to proceed one system memory page at a time.

  • Regular--uses the valloc option to allocate the entire assigned memory, which is read and compared one long word at a time.


Specifies the amount of MB of virtual memory to reserve.


Specifies the number of MB of memory to be tested instead of the default.


Specifies the maximum number of contiguous errors to be counted as one non contiguous error.



type1 is sequential test. The value is Enabled or Disabled; the default is Enabled. The default for the pp1 pattern is address; select the pp1 pattern from:






type2 is File cache test. The value is Enabled or Disabled; the default is Enabled. The default for the pp1 pattern is address; select the pp1 pattern from:






type3 is Random address test. The value is Enabled or Disabled; the default is Disabled. The default of the pp3 pattern is checkerboard; select the pp3 pattern from:





type4 is page_striding test. The value is Enabled or Disabled; the default is Disabled. The default of the pp4 pattern is checkerboard; select the pp4 pattern from:





type5 is march_c test. The value is Enabled or Disabled; the default is Disabled. The default for the pp5 pattern is checkerboard; select the pp5 pattern from:




type6 is Block_Copy test. The value is Enabled or Disabled; the default is Disabled.

Note - The Block_Copy subtest uses its own set of the data patterns predefined in the test. It does not require any user specified data patterns for testing.


Only used if the pp argument is set to UserDefined. The pattern specified should be in the form of a 8-digit, hexadecimal number such as 0x2a341234.

Note - 64-bit tests are located in the sparcv9 subdirectory: /opt/SUNWvts/bin/sparcv9/testname, or the relative path to which you installed SunVTS. If a test is not present in this directory, then it may only be available as a 32-bit test. For more information refer to the "32-Bit and 64-Bit Tests" section of the SunVTS 5.1 Test Reference Manual (816-5145-10).