Simulates a system with various sizes of memory for performance testing of applications.
rmss -c MemSize
rmss -r
rmss -p
rmss [ -d MemSize ] [ -f MemSize ] [ -n NumIterations ] [ -o OutputFile ] [ -s MemSize ] Command
The rmss command simulates a system with various sizes of real memory, without having to extract and replace memory boards. By running an application at several memory sizes and collecting performance statistics, you can determine the memory needed to run an application with acceptable performance. The rmss command can be invoked for either of two purposes:
Attention: When rmss is used on a multiple memory pool system, it may fail with:
Failure: VMM unable to free enough frames for stealing. Choose a larger memory size or retry with less system activity.Or a similar message. This failure can occur when rmss has stolen all the frames from a memory pool, and is unable to steal frames from other pools. A workaround is to decrease memory by increments.
The number and size of memory pools on a system can be retrieved with the command:
echo "mempool *" | kdb
The -c, -p, and -r flags are mutually exclusive. The -c flag changes the memory size; the -p flag displays the current memory size; and the -r flag resets the memory size to the real memory size of the machine.
The -s, -f, -d, -n, and -o flags are used in combination when the rmss command is invoked as a driver program to execute and measure the performance of a command (where a command is an executable or a shell script file) over a range of memory sizes. When invoked this way, the rmss command displays performance statistics, such as the response time of the command and the number of page-ins that occurred while the command ran, for each memory size. These statistics, which are also written to a file, are described in this example.
The -s and -f flags specify the starting and ending points of the range, while the -d flag specifies the increment between memory sizes within the range. The -n flag is used to specify the number of times to run the command at each memory size, and the -o flag is used to specify the name of an output file into which to write the rmss report. The Command parameter specifies the command to be run and measured at each memory size.
Note: The rmss command reports "usable" real memory. On machines where there is bad memory or where the system is using the memory, rmss reports the amount of real memory as the amount of physical real memory minus the memory that is bad or in use by the system. For example, using the rmss -r flag might report:
Simulated Memory Size changed to 79.9062MB
This could be a result of some pages being marked bad or a result of a device that is reserving some pages for its own use (and thus not available to the user).
Note: The rmss command may underestimate the number of page-ins that are required to run an application if the application, combined with background processes such as daemons, accesses a lot of different files (including directory files). The number of different files that must be accessed in order to cause such results is approximately 250 files per 8MB of simulated memory size. The following table gives the approximate number of different files that, when accessed at the given simulated memory size, may result in the rmss command underestimating page-in requirements.
Simulated Memory Size (MB) | Access to Different Files |
8 | 250 |
16 | 500 |
24 | 750 |
32 | 1000 |
48 | 1500 |
64 | 2000 |
128 | 4000 |
256 | 8000 |
You can use the filemon command to determine the number of files accessed while your command runs, if you suspect that it may be accessing many different files.
This command is valid only on the POWER-based platform.
Access Control: You must have root authority to run this command.
rmss -c 13.5
rmss -p
rmss -r
rmss -s 32 -f 8 -d 8 -n 1 -o cc.rmss.out cc -O foo.c
rmss foo.sh
rmss -s 8 -f 16 -d .5 -n 2 -o bar.rmss.out bar
An example of the report printed out by the rmss command follows:
Hostname: xray.austin.ibm.com Real memory size: 48.00 Mb Time of day: Wed Aug 8 13:07:33 1990 Command: cc -O foo.c Simulated memory size initialized to 24.00 Mb. Number of iterations per memory size = 1 warmup + 1 measured = 2. Memory size Avg. Pageins Avg. Response Time Avg. Pagein Rate (megabytes) (sec.) (pageins/sec.) ----------------------------------------------------------------- 24.00 0.0 113.7 0.0 22.00 5.0 114.8 0.0 20.00 0.0 113.7 0.0 18.00 3.0 114.3 0.0 16.00 0.0 114.6 0.0 14.00 139.0 116.1 1.2 12.00 816.0 126.9 6.4 10.00 1246.0 135.7 9.2 8.00 2218.0 162.9 13.6
This report was generated by the following command:
rmss -s 24 -f 8 -d 2 -n 1 cc -O foo.c
The top part of the report gives general information, including the machine that the rmss command was running on, the real memory size of that machine, the time and date, and the command that was being measured. The next two lines give informational messages that describe the initialization of the rmss command. Here, the rmss command displays that it has initialized the simulated memory size to 24MB, which was the starting memory size given with the -s flag. Also, the rmss command prints out the number of iterations that the command will be run at each memory size. Here, the command is to be run twice at each memory size: once to warmup, and once when its performance is measured. The number of iterations was specified by the -n flag.
The lower part of the report provides the following for each memory size the command was run at:
Note: The average page-ins and average page-in rate values include all page-ins that occurred while the command was run, not just those initiated by the command.
The filemon command, and svmon command.