IBM® Rational® DOORS® does not track modules that are opened in the background by Rational DOORS extension language (DXL) programs. For example, if a DXL program opens other modules in the background and does not close them, memory use continues to increase. The DOORS client cannot close the modules, even if it has run out of memory. Eventually, the DOORS client terminates. To avoid this problem, you can use three perms, which are DOORS DXL APIs. These perms perform the following actions:
- Track and close modules
- Monitor the memory use by the DOORS application
- Display appropriate warnings
How to use memory management perms
Use the following perms to manage memory in Rational DOORS:
initNotDisplayedOpenModules(): This perm records the modules that are already prior to any operation. Call this perm at the beginning of any looping operation.
DisplayMemoryWarning(): This perm checks the memory usage of the application and closes modules opened in the back end, when the application uses more memory than the prescribed warning level. Place this perm inside a
whileloop so that the memory is monitored in each iteration, at regular intervals.
closeNotDisplayedOpenedModules(): This perm does all of the cleanup operations at the end and closes all modules opened in the back end, at the end of any operation.
Use the three perms shown in Listing 1. You can use the perms in combination. You can also use them when you iterate through all the objects in a module that has large amount of data. Another instance when you can use the perms is when there are more number of objects in a module.
Listing 1. Example of how to use memory management perms
initNotDisplayedOpenModules()is used before the start of the operation.
DisplayMemoryWarning()is used during actual operation, within a
whileloop, which monitors the memory used by the application and does the clean up job when memory reaches the prescribed limit.
closeNotDisplayedOpenedModules()is used at the end of the operation.
Use these perms in any custom DXL code that includes looping of all objects in a big module with a large amount of data and with links to other modules. To use these perms effectively, place them inside a loop that loops through all the objects or columns in the DOORS module to collect data.
Customize the memory management perms
Memory usage varies from system to system.DOORS can use more memory for its operations on systems with adequate memory. It is impossible to make a general rule about the maximum memory that can be used by DOORS. However, you can use registry values to customize memory management and to set the system memory that DOORS can use.
Set default values in Rational DOORS
By default certain parameters are set. You can override these values with
registry entries set under the DOORS client registry, under the
config key. Use the following registry string keys:
MEM_LEVEL_CLOSE: The default value is 1000MB. When this value is reached, the memory management perm starts closing the opened modules that it keeps track of. To override this maximum value, use the
stringregistry key entry
MEM_LEVEL_CLOSEunder DOORS Client > Config and specify the suitable value. Specify the maximum memory (in MBs) that your system can allocate to DOORS as the value under this registry key. For example if a machine can allocate 2GB of memory to doors.exe without crashing, the value for this registry key needs to be 1800 or 2000. You need to experiment with values until you find the correct setting. The higher the value, the better the performance, but the machine needs to be able to support a high value.
MEM_LEVEL_WARN: The default value is 800MB. On reaching this level, the memory management perm warns the user to either continue or to end the operation to avoid a crash. To override this value, use the registry key entry
MEM_LEVEL_WARNunder DOORS Client > Config and specify a suitable value. Based on this value, Rational DOORS starts closing all back end, open modules when the application reaches the value set in
MEM_LEVEL_CLOSE. Even after closing all background modules, if the memory used by Rational DOORS is more than the value specified for the
MEM_LEVEL_WARNregistry entry, Rational DOORS shows a warning message. This warning indicates that Rational DOORS is using more memory than the value set as the warning level. An ideal value is 800 to 1600 for a 2GB RAM machine.
MEM_LEVEL_STEP: The default value is 200MB. This value is used to step up the
MEM_LEVEL_WARNlevel at run time. A warning is displayed at run time and at that time you can increase the
MEM_LEVEL_WARNlevel. To override this value, specify a suitable value on the registry entry
MEM_LEVEL_STEPunder DOORS Client > Config.
Note: Consider including instructions for how to respond
to these perms. In some cases, a warning is displayed when DOORS reaches
the value specified as the
MEM_LEVEL_WARN level. At that
point, you have to choose whether to continue or stop the application.
These perms can also slightly affect performance because the memory is
checked and modules are closed at regular intervals. Adjust the settings
by using registry entries so that performance is not affected and your
system does not crash.
This article showed how to use DXL APIs to effectively manage memory when you use DXL scripts in DOORS. Now that you have the APIs, you can monitor the memory used by DOORS. You can take action when the memory used by DOORS reaches the maximum threshold level and thus avoid loss of data due to an abrupt stop of the application.
- Browse the Rational DOORS developerWorks page for links to technical articles and many related resources, and check the Rational DOORS Next Generation page on Jazz.net. For detailed instructions, explore the Rational DOORS Information Center.
- Explore the Rational software area on developerWorks for technical resources, best practices, and information about Rational collaborative and integrated solutions for software and systems delivery.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Improve your skills. Check the Rational training and certification catalog, which includes many types of courses on a wide range of topics. You can take some of them anywhere, anytime, and many of the Getting Started ones are free.
Get products and technologies
- Get the free trial download for Rational DOORS Web Access.
- Evaluate IBM software in the way that suits you best: Download it for a trial, try it online, use it in a cloud environment.
- Join the Rational DOORS forum to ask questions and participate in discussions.
- Get connected with your peers and keep up on the latest information in the Rational community.
- Follow Rational software on Facebook, Twitter (@ibmrational), and YouTube, and add your comments and requests.
- Ask and answer questions and increase your expertise when you get involved in the Rational forums, cafés, and wikis.
Dig deeper into Rational software on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.