Skip to main content

Rational Application Developer Performance Tips

Gary Karasiuk (karasiuk@ca.ibm.com), Rational Application Developer Performance Analyst, IBM Toronto Lab
Gary Karasiuk
Gary Karasiuk is a Rational Application Developer Performance Analyst at the IBM Toronto Laboratory. You can reach Gary at karasiuk@ca.ibm.com .

Summary:  This updated article contains a series of hints and tips that you can use to improve the performance of IBM® Rational® Application Developer. The screen shots for this article were taken from Rational Application Developer version 6.0.0.1 and/or version 6.0.1.1.

Date:  14 Mar 2006 (Published 17 May 2005)
Level:  Introductory
Activity:  5055 views

Tips summary at a glance

Many of the tips in this article also apply to our other design and construction products, including IBM® Rational® Software Architect, IBM® Rational® Software Modeler and IBM® Rational® Web Developer. The following table provides a summary of the performance tips discussed in this article.

Legend:

  • Consider - a sense of the relative importance of the tip.
  • Improvement Type - indicates whether the tip should lower the CPU usage or the memory usage. However, if your system is thrashing, lowering the memory may greatly improve the time.
  • Preference - indicates if this item is changed though the Windows > Preferences dialog.

Table 1. Tip summary

Tip Consider Improved Startup Improved Build Improved General Improvement type-Time Improvement type-Memory Preference
Auto Build & Refresh WorkspaceSometimes X X X X
Binary ProjectsAlways X X X X X
CapabilitiesRarely X X
Closing EditorsSometimes X X X X
Closing ProjectsAlways X X X X X
DefragmentingSometimes X X
Early StartupNever X
Fresh WorkspacesAlways X X X X
JVM TuningSometimes X X X X X
Label DecoratorsRarely X X X
Links BuilderSometimes XX X X X
Quick DiffRarely X X X X
Remote Test ServerAlways X X
Restarting Projects (instead of the Server)Always X
Server Startup OptionsAlwaysX X X X
Server Startup Options (Admin Console)AlwaysX X X
Shutting down RADAlways X X
SwappingSometimes X X
Task MangerSometimes
ValidationAlways X X X X X
Upgrade to 6.0.1.1AlwaysXX X X X
Upgrade ServerAlwaysXX X X X


Preferences

Rational Application Developer has a large number of preferences (accessed from the Windows > Preferences menu item) that allow you a great deal of control over how it operates. This section discusses how some of these preferences affect performance.

Build automatically and Refresh workspace automatically

As Figure 1 shows, the default is for Build automatically to be turned on and Refresh workspace automatically to be turned off.


Figure 1. Build automatically and Refresh workspace automatically
Build automatically and Refresh workspace automatically

When Build automatically (auto build) is turned on, it means that every time you save a file, an incremental build happens. This includes not only building (or compiling) the file, but also building the files that depend on it. It also runs validation. Usually the time that it takes to do this isn't noticeable, but if you are finding that your saves are often taking a long time, this function can be turned off. Turning auto build off will improve the performance of your save operations at the expense of slower builds and less up-to-date error information. This option is really one of personal choice, since there are pros and cons to both settings. Personally, I do my development with auto build turned on. You may want to experiment with this option to see which setting suits your style better.

Turning Refresh workspace automatically on will start a background process that searches for changes that have been made by other processes to resources in the workspace. If changes are found, this will cause an incremental build to run if auto build is turned on, but otherwise it does not initiate any builds.

Capabilities

As Figure 2 shows, you can control which capabilities are enabled.


Figure 2. Capabilities
Capabilities

By turning off some of the capabilities, you will remove certain user interface items. This in turn will prevent you from invoking certain functions. Since Rational Application Developer uses lazy loading, any time you invoke a new function, it takes more memory to hold the classes that implement the new function.

If you are not using those functions, turning off the capability won't make any difference. In general, turning off capabilities will not improve your performance, other than preventing you from accidentally invoking a function.

Closing Editors

Any editor that is active (that is, has focus) when Rational Application Developer is shut down, will become active again when Rational Application Developer is restarted. To improve the startup time of Rational Application Developer, you can select the Close all editors on exit preference (Figure 3).


Figure 3. Closing Editors
Closing Editors

Quick Diff

Quick diff (Figure 4) is a function that shows a line in the margin to show you what has changed. Disabling quick diff will slightly improve your performance while editing files.


Figure 4. Quick Diff
Quick Diff

Label Decorators

Disabling all or some of the label decorations (Figure 5) will slightly improve your performance.


Figure 5. Label Decorators
Label Decorators

Links Builder

The Links Builder keeps track of hyperlinks. If you have a lot of HTML files in your workspace, there can be a lot of links to keep track of. In some cases, disabling the Links Builder can greatly improve your build times.


Figure 6. Links Builder
Links Builder

Early Startup

These preferences (Figure 7) control which plug-ins start automatically as part of startup. At this point in time, I wouldn't recommend disabling any of them. For the scenarios that I have tested, I have not been able to measure much of a performance difference.


Figure 7. Early Startup
Early Startup

Validation

This setting (Figure 8) is one of the big hitters. Running all of the validators all of the time is a reasonably expensive operation. If you are finding that your builds are taking too long, you could turn off all or some of the validators. Or you could have them run only during manual builds.


Figure 8. Validation
Validation

If a validator is turned off, it means you won't have the benefit of any errors, warnings, or informational messages that it might have produced.

In particular:

  • The JSP Compilation Validator is quite expensive to run.
  • The XML Validator can be expensive to run if it is referencing DTDs or XML schemas on external servers.

If the external server is slow, it will slow down the validator, which in turn will slow down the build. One way to speed up this validator is to move remote DTDs or XML Schemas to your local system, and then update the XML catalog to reference these local copies. (Search for "XML catalog" in the online help for information on how to set this up).


Other Tips

Binary Projects

As your application grows it may not be practical or desirable to keep your entire application in source form in your workspace. We have seen large workspaces with over a hundred projects. It is very unlikely that every developer will need to change everyone of those projects. A better approach is to keep the projects that you intend on changing in source form, and the projects that you are just using in binary form.

To learn more about this topic, you can search the online help for "binary projects". You can also review the article, Optimizing Multi-Project Builds Using Dependent Project JARs in WebSphere Studio Application Developer--see Resources. (This article was written for WebSphere® Studio Application Developer, but the ideas are the same.)

Closing Projects

As a general rule you should not have projects in your workspace that are not needed. They just cause extra overhead when building, validating and indexing your workspace. You should either close them or delete them. It is better to have multiple workspaces, each with a set of related projects, than one big workspace that has everything.

Defragmenting

Rational Application Developer is a very large product; a typical installation has over 100, 000 files. We have found that defragmenting your hard disk after installing Rational Application Developer can improve your cold startup time by as much as 7%. It is also a good idea to defragment your hard disk before installing Rational Application Developer.

Please be aware that if you haven't defragmented your disk in a while, and if it is a large disk, that the defrag operation could take quite some time to run.

Fresh Workspaces

Periodically starting with a clean workspace, and re-importing your source will improve performance. This is quite easy to do if your projects are all stored in a source control system (which is a best practice in its own right).

Over time, there is metadata that accumulates in the workspace (in the .metadata directory). This includes things like log files, for instance. Cleaning this up every so often means that there are less things needed to keep track of for Rational Application Developer.

The process would be:

  1. Make sure that you have everything checked into your source control system.
  2. You could create export a Team Project Set for the set of projects.
  3. You could also export your preferences.
  4. Shutdown Rational Application Developer.
  5. Delete your workspace.
  6. Startup Rational Application Developer.
  7. Import your preferences.
  8. Import your Team Project Set.

Task Manger

If you find your performance is too slow, how do you tell if it is memory based or processor based? And if it is memory based, what is it that is using up the memory? This is where the Task manager (Figure 9) can be very helpful.


Figure 9. Task Manger
Task Manager

If you sort by Mem Usage, it will list the processes that are using the most physical memory. If you are running both Rational Application Developer and the WebSphere test server, the large javaw.exe is most likely Rational Application Developer, and the large java.exe is most likely the WebSphere Application Server. Note the distinction between javaw and java.

The other number to pay attention to is the Commit Charge at the bottom of the window. If the Commit Charge is higher than the amount of physical memory that you have on your system, then your system may be thrashing. In this case, reducing the amount of memory that is needed or getting more memory will help your performance.

Memory is a resource that needs to be conserved, and this view of the Task Manager is a good way to see where your memory is going.

Remote Test Server

You may find that your application is large enough and your computer is small enough that you just can't fit Rational Application Developer, the WebSphere test server and possibly a database manager on your computer. However, you may be able to take advantage of a divide and conquer approach. If you have access to a second system, you could run the test server there and free up resources on your development machine. The article, Setting up a Remote WebSphere Test Server for Multiple Developers, explains how to set this up--see Resources. (This article was written for WebSphere® Studio Application Developer, but the ideas are the same.)

Shutting down Rational Application Developer

As you use more functions, more classes get loaded into memory. For example, let's say that you usually don't use the XML editor, but in this session you did edit one XML file. Rational Application Developer uses lazy loading, so the code for the XML editor isn't loaded until it is needed. However, once it is loaded it will never be unloaded. There are also some bugs where Rational Application Developer leaks memory. Currently, the only way to free this memory is to shutdown and restart Rational Application Developer. You should probably shutdown Rational Application Developer at least once a day.

If you think you have found a memory leak, please contact us. We take memory leaks very seriously, and would be eager to investigate this situation.

Swapping

If you minimize Rational Application Developer, it is very possible that Windows will swap Rational Application Developer out of physical memory. This happens with any large application, but it is particularly bad for Java based applications (like Rational Application Developer), since the memory that it uses is so dispersed. Swapping an application back into memory is very slow, often slower than starting the product from scratch. It is so slow that developers sometimes think that their system is hung.

One way to tell if Rational Application Developer is swapping back in, is to bring up the Task manager and look for the Rational Application Developer (javaw.exe) process. You know that Rational Application Developer is being swapped in, if you see the Mem Usage counting up (a megabyte or two per second) slowly.

This problem has been addressed by Eclipse 3.1, so we hope that it will be addressed in our next major release.

In the meantime, there are some third party plug-ins available that address this problem. One that is often mentioned is KeepResident--see Resources. While I can't endorse this particular plug-in, it has been reported that many people have had success with it. It is something that is easy to try, and if you find that your system becomes unstable, you can just remove it. It prevents Rational Application Developer from being swapped out, so it can slow down your other applications.

Another approach is just to never minimize Rational Application Developer.

JVM Tuning

There have been a number of articles that discuss parameters that you can use to tune the JVM. The main parameter that is usually mentioned is the -Xmx parameter. This parameter is used to limit the amount of memory that the Java heap is allowed to allocate. The default for Rational Application Developer's JVM is to use up to one half of the physical memory. So for example, if you are running on a 1GB machine, the heap could grow to 0.5GB.

In general, I think it is better not to change this parameter, especially on machines that have 1GB or less memory. The consequences of setting this too low are quite bad, since Rational Application Developer will fail with an OutOfMemoryError.

Other parameters that are safer to experiment with are: -Xmaxf and -Xminf. These parameters control how the heap is expanded and contracted. The defaults are:

  • -Xmaxf0.6
  • -Xminf0.3

The numbers are percentages. -Xmax0.6, instructs the JVM to try to compact (shrink) the heap if the amount of free space exceeds 60%. Setting this to a smaller number will cause your heaps to be smaller, at the cost of doing more garbage collections. For example, -Xmaxf0.4 will cause heap compaction if the free space exceeds 40%.

The -Xminf parameter is used to control the minimum free space. The setting -Xminf0.3 instructs the JVM to expand the heap, if after doing a garbage collection it doesn't have at least 30% free space.

If you are having memory problems you could try experimenting with -Xmaxf0.4, -Xminf0.2

The advantage of using these parameters over the -Xmx parameters is that you won't artificially get an OutOfMemoryError.

Another parameter that you can add is -Xgcpolicy:optavgpause. This will cause part of the garbage collection to run concurrently and will help reduce any pauses that are caused by garbage collection.

If you want to change any of these parameters, one way of doing it is by editing the rationalsdp.ini file. This file is found in the Rational Application Developer installation directory. If you would like to try an experiment, try copying and pasting these lines into your rationalsdp.ini file:

VMArgs-Xminf0.2
VMArgs=-Xmaxf0.4
VMArgs=-Xgcpolicy:optavgpause


Test Server Tips

Restarting Projects (instead of the Server)

It is considerably quicker to restart a project instead of restarting the server (Figure 10).


Figure 10. Restarting Projects
Restarting Projects

Server Startup Options

There are a number of server options that significantly affect performance.


Figure 11. Server Startup Options
Startup Options

You get to the editor above by double-clicking a server entry in the Servers view.

The Enable hot method replace in debug mode option should always be enabled. Not only does this option allow hot method replace, but more significantly from a performance point of view, it enables "Just In Time" compilation while in debug mode. This greatly speeds up how quickly your application runs and how fast the server starts. This option only applies to debug mode, and has no effect when running the server in normal mode.

If you don't need the universal test client (it is enabled by default), you should clear its checkbox so that it wont be installed.

The Optimize server for testing and developing option should always be checked. This sets some JVM parameters that improves the startup time of the server.

Server Startup Options (Admin Console)

In addition to the server configuration changes that you can make inside of Rational Application Developer, there are additional changes that you can make from the WebSphere Admin Console. Once you have your server running, you can start the Admin Console from inside of Rational Application Developer by selecting the Run administrative console menu item from the server context menu, as shown below:


Figure 12. Run administrative console
administrative console

Once the Admin Console is running, select the server (it is usually called server1), and ensure that the Run in development mode and Parallel start options are selected. This will provide even more server startup improvements.


Figure 13. Admin console options
console options

While you have the Admin console running, you might also want to check if there are any unneeded applications that could be removed. There are a couple of small sample applications (DefaultApplication, ivtApp and query) that are installed by default. These can be safely removed.


Figure 14. Uninstall options
uninstall options

Upgrade

Upgrade to 6.0.1.1

Version 6.0.1.1 of Rational Application Developer, was a performance release. We made a number of significant performance and memory improvements. If you are currently using an older version of Rational Application Developer, we strongly encourage you to upgrade.

In this release we focused on items that really effect your productivity, either big things that were really slow or things that are used very frequently.

A number of customers are developing very large applications with Rational Application Developer, and in some cases are running into performance problems with the associated large workspaces. We worked on improving the performance of large workspaces. Here are some sample data from one customer who is developing a very large online shopping application:

Task 6.0 6.0.1.1 Improvement
WebToolsSaveParticipantJob45 mins<1s
EJB Validation40mins4 mins10 times
Clean all (16 projects)20 mins4 mins5 times
Publish to Sever15 mins5s180 times

We also made some memory improvements for large workspaces. For example, with the workspace above, the working set of Rational Application Developer for doing a full build, was reduced from 1.1GB to 368 MB.

As an example of a function that is used frequently, we made memory and startup improvements to Page Designer. Page Designer is the component that edits HTML pages. Depending on the complexity of the page, we saw some improvements in the 2 times range.

For our Rational Software Architect customers, we made improvements in dealing with very large models. For one of our huge customer models, we saw some basic modeling tasks (like adding attributes or operations) drop from 40 seconds to 3 seconds.

For our Enterprise Generation Language (EGL) customers, we have made some dramatic build and memory improvements for them as well. For example, for a "telco" project that we test with, we saw the clean build time drop from 1800 seconds to 340 seconds, and the incremental build time drop from 1877 seconds to 31 seconds.

While the numbers above are from real workspaces, your environment is different, so you may or not see these kinds of improvements. However, the improvements above are big enough to suggest that it is worth upgrading to see what effect they will have in your environment.

Upgrade Server

To see all the publishing improvements you will need to upgrade your test server to v6.0.2.5. This can be done by using the Find Optional Features function of the Rational Product Updater, and then selecting the new test environment.


Figure 15. Rational Product Updater
product updater

Conclusion

This article offers several tips for improving the performance of Rational Application Developer. If there are other tips that you know of and that have been effective in your environment, please send them to me. I will include them in the next update of this article.


Resources

About the author

Gary Karasiuk

Gary Karasiuk is a Rational Application Developer Performance Analyst at the IBM Toronto Laboratory. You can reach Gary at karasiuk@ca.ibm.com .

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=83164
ArticleTitle=Rational Application Developer Performance Tips
publish-date=03142006
author1-email=karasiuk@ca.ibm.com
author1-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Rate a product. Write a review.

Special offers