IBM Rational Performance Tester facilitates the script execution to be performed from the user interface section or alternatively execute the scripts via command line editor.
For more information on how do you specify the command line parameters for script execution, you may refer this link.
Sometimes, it could also be a case that you specify each and every command line parameters, but notice a memory leak problem taking place. And, the same when performed from the RPT web UI section, the memory leak problem does not surface.
So the question arises as to why would the memory leak problems only be observed when you execute the scripts via command line editor and NOT when executed from RPT's web UI??
Generally, The RPT "workbench" process (javaw.exe) for a command line playback will use a default maximum heap size unless you specifically specify a size on the command line. So if you are using the -Xmx option in the eclipse.ini to specify a maximum heap size for the GUI-driven playback, then you should specify the same size for the command line playback using the -vmargs option.
For example, if the eclipse.ini specifies -Xmx4096m, then add "-vmargs -Xmx4096m" to the command line as shown below:
call cmdline -workspace D:\andys\WCMAuthoringFromJazz -project WCM_Authoring_wp85
-resultsproject WCM_Authoring_wp85 -results %portalBuildID%/%portalserver%/%portalserver%WCM_combo_authoring
-exportstats c:\temp\exportStats -usercomments %userComments% -vmargs -Xmx4096m
Having said all these fundamentals, you might also assume that The 2 eclipse.ini files used by RPT have the same heapsize value set. So command line and RPT workbench should be using the same values.
The "full eclipse" eclipse.ini is used for some settings for the command line playback. However, the maximum heap size (-Xmx) for the command line playback is not picked up from the eclipse.ini.
You can readily demonstrate this. . .....
- Modify the -Xmx value in the eclipse.ini so that it is invalid (-Xmx25m for example).
- Try to start the RPT workbench; it will fail with the error "Failed to create the Java Virtual Machine".
- Now try a command line playback; it will start successfully.
As noted earlier, specify the maximum heap for the command line playback using the -vmargs option on the command line. For example, to specify a 4096m maximum heap size, add "-vmargs -Xmx4096m" to the command line:
cmdline -workspace "C:\Workspaces\CmdLineWS" -project "Main" -eclipsehome "C:\Program Files\IBM\SDP" -plugins "C:\Program Files\IBM\IBMIMShared\plugins" -schedule "Schedules\BaseTest" -results "Results\BaseTest_CmdLine" -vmargs -Xmx4096m
Hope this helps!