Sunteți pe pagina 1din 2

Kevin Lwinmoe: www.KL-Patterns.

com

Optimizing Rational Software Architect 7.0


Contributed by Kevin Lwinmoe
Monday, 08 January 2007
Last Updated Friday, 08 February 2008

{xtypo_rounded1}Targeted Audience: J2EE Software Engineers, Business Analysts, Requirement Analysts, Software
Modelers, Data Modelers, and Architects who utilize Rational Software Development Platform 7.0 with IBM J9 JVM 1.5
for Enterprise solutions. Eclipse 3.2.1 users with IBM J9 JVM 1.5 will also find the following information
useful.{/xtypo_rounded1}

This article discusses how I changed the Eclipse 3.2.1 ini configuration file of the Rational Software Architect 7.0 (RSA)
to obtain the best performance. On Windows XP, this configuration file is located at C:\Program Files\IBM\SDP70. You
will be able to search for this file in Linux system easily. RSA is a superset version of the Rational products such as
Rational Application Developer, Rational Web Developer, Rational Software Modeler, and Rational System Developer.
As you can see RSA is very powerful product and it has numerous features and plug-in, which is exactly why you need to
tweak and fine tune JVM configuration for the RSA environment.

According to this article , you need at least 768 MB RAM for RSA and 1GB RAM is recommended. And as it stated,
additional memory will improve the performance and responsiveness of RSA. Because of my personal experience, I
highly recommend at least 2GB of physical memory even when you are using JVM 1.5 or 1.6, which are optimized out-of-
the-box for the best performance and perform better than previous versions of JVM.

In truth, having 2GB of physical memory alone does not guarantee that your interaction with RSA will be smooth and
RSA will be in its optimum environment. One of the reasons why you need to hand tune JVM configuration for RSA is
because RSA was configured initially to meet its official memory requirement. However, as you start to utilize the various
capabilities of RSA, you will experience the sluggish responsiveness when you switch between different type of editors,
views, perspective, etc. Therefore, you still need to tweak RSA for the best performance, in addition to installing an extra
physical memory chip. Note that RSA is built on top of Eclipse 3.2.1. Here is an example of the default eclipse.ini
configuration file for RSA on Windows XP.

-vm
C:\Program Files\IBM\SDP70\jdk\jre\bin\javaw.exe
-vmargs
-Xquickstart
-Xms40m
-Xmx768m
-Xgcpolicy:gencon
-Xscmx96m
-Xshareclasses:singleJVM,keep
-Xnolinenumbers
-XX:MaxPermSize=512M

Let’s go through step by step as we go through the default configuration file.


Step 1: Choosing JVM

You can use –vm to indicate which JVM you want to use. In my case, the default configuration is using IBM J9
JVM 1.5. I am fine with it. (It should be another article for discussing about the features and benefits of using IBM J9
JVM). Hint: If you are using Eclipse 3.2.1 distributions, you can use –vm flag to use SUN HotSpot JVM 1.6. For
RSA, let’s stick with IBM J9 JVM 1.5. Step 2: Use –Xquickstart flag

This is for improving start-up time by delaying optimizations.


Step 3: Configure initial memory size and maximum memory size

You can use –Xms for setting the initial memory size and –Xmx for setting the maximum memory size. I
basically allocate 1GB for both the initial memory size and the maximum memory size. I learned this trick from
configuring and setting up Java Application server for production environment.
Step 4: Choose the right Garbage Collection Policy (GC)

According to the configuration file, generational concurrent policy is being used by default. Well, it is perfectly fine for
RSA. Optthruput is the default GC Policy if you do not explicitly set the policy with –Xgcpolicy flag. If you want to
run your application as quickly as possible, use optthruput. This is not good for using with RSA or eclipse. If your
application requires good response time to unpredictable events, use optavgpause. This policy is optimized for
http://kl-patterns.com Powered by Joomla! Generated: 1 October, 2010, 06:35
Kevin Lwinmoe: www.KL-Patterns.com

PauseTime and offers concurrent Mark and Sweep. There is another policy for application with high allocation rates on
many threads. It’s called subpool. The bottom line is that gencon is the best GC policy for RSA. So let’s
stick with it.
Step 5: Increase the size of new shared class cache

Use –Xscmx for increasing the size of new shared class cache. The default size was 96MB. In my case, I set it up
to 256 MB.
Step 6: Increase the min/max size of the percentage of the heap free after GC.

Use –Xminf for setting the minimum and –Xmaxf for setting the maximum. It takes a decimal value
between 0 and 1. (0.40 means 40%). For my case, I set it up to 40 percent for the minimum size and 60 percent for the
maximum size. Note that the default configuration file does not have these values. So you need to add it.

Step 7: Increase the initial size of permanent generation.

Use -XX:MaxPermSize for setting the initial size of permanent generation. For my case, the default was 512MB but I set
it up to 768MB.

In conclusion, I am happy with the performance of my tweaked and optimized RSA. The overall performance of RSA is
better and I don’t experience sluggish responsiveness anymore. I will continue to update this article as I discover
tips and tricks of configuring JVM to improve the performance of RSA 7. I am sure that there are still tricks and tips to be
discovered. Have fun exploring! Here is an example of my eclipse.ini configuration file. Note: I am experimenting with
how different JVM flags from SUN JVM work with IBM J9 JVM 1.5.
-vm
C:\Program Files\IBM\SDP70\jdk\jre\bin\javaw.exe
-vmargs
-Xquickstart
-Xms1000m
-Xmx1000m
-Xgcpolicy:gencon
-Xscmx256m
-Xshareclasses:singleJVM,keep
-Xnolinenumbers
-XX:MaxPermSize=768M
-Xminf0.40
-Xmaxf0.60
-XX:+UseParallelGC
-XX:+AggressiveHeap
-XX:GCHeapFreeLimit=10
-XX:GCTimeLimit=60 References
- http://blogs.sun.com/watt/resource/jvm-options-list.html
- Optimizing Multi-Project Builds Using Dependent Project JARs in WebSphere Studio Application Developer

- 2006 JavaOne Conference, What’s Hot in IBM’s Virtual Machine for the Java™Platform? by Trent
Gray-Donald

http://kl-patterns.com Powered by Joomla! Generated: 1 October, 2010, 06:35

S-ar putea să vă placă și