Monday, March 28, 2011

JVM Tuning for Oracle SOA Suite 11g

Now you can folow us on facebook and post your comments/views and questions for expert advise. Check this out facebook

Find us on facebook here

Last year I installed couple of 11g SOA Suite instances and delivered it to our development team to work on it. The SOA servers were being used by around 10 developers to build their application. For a week the server seemed to be working fine but then started my nightmare. The servers started becoming unstable. 

Following were the issues:

1.       The servers became too slow, especially the EM console hence making it difficult for  developers to continue working.
2.       EM Login page got struck at the user authentication page.
3.       Data sources went into suspended state hence bringing EM application to halt.
4.       Out of Memory issues

This is where I did have a look into the JVM settings for the SOA application. Till now I was going with default JVM settings as provided by Oracle. I generated some gc logs and used a GC analyzer to view the GC info. That is where I could see frequent GCs with unarguably high pause time. I needed to tune my JVM settings for sure.

JVM tuning is never a ready made solution.Yo would need to use some JVM profiling tools like the JVisualVM. Test your JVM performance using this post Monitoring FMW11g JVM using JVisualVM

With release of the Oracle Fusion Middleware 11g products like SOA suite, BAM, OER, OSB etc a lot has changed the way these products are built and work.  Let’s focus on the SOA Suite. The 11g SOA Suite unlike the 10g now runs on Oracle Weblogic server. The SOA suite application now grows bigger with addition of applications like B2B, BAM etc. In the past releases (10g) B2B and BAM used to be separate installations .On top of this there are two management consoles, the Weblogic Admin Console and the Enterprise Manager FMW console which the product needs to function. Hence as you see the new 11g SOA suite is not only new but also a big. The Application Sever 9Weblogic) has to be tuned appropriately in order to ensure a healthy SOA instance.

Below is my environment info:

Application and Database Server hardware Info

The SOA Application and the database servers both were installed on separate physical boxes. The  specifications of the boxes are mentioned below.

Server Hardware: SUN T 5240                                                                                                                          Operating System: Solaris 10                                                                                                                        Architecture: Sun Sparc 64 Bit                                                                                                                   
Number of CPU: 10                                                                                                                                             Available Memory: 13.6 GB

Application Installed and Version:

Application Server: Oracle Weblogic Server (Version 10.3.4 )                                                                              
FMW Product: Oracle SOA Suite (Version                                                                                                         
JVM Used: Sun JDK 1.6 Update 23  
(Latest Sun JDK ,this version boasts of performance boost on Solaris servers)

Application Install Architecture: Stand Alone Install.    
Below is my JVM setting recommendation. Please note, below tuning might be a good one to start with.  As number of concurrent users, deployed applications, load increase the tuning parameter below might change.     

SOA Suite 11g ideally uses two JVMs to function.

1.       Admin Server JVM: This is the weblogic  server (JVM) on which the Weblogic Admin Console and the EM Fusion Middleware Control are deployed. The Weblogic Admin Console is used to manage and control the weblogic resources. The EM Fusion Middleware control mainly is used to work on the SOA suite. It enables application deployment, application monitoring etc.

2.       SOA Managed Server:  This is the   weblogic server (JVM) on which the   entire SOA Suite and B2B product stack is deployed. Hence you can expect it to be a bit heavier than   the Admin Server.

Below is the JVM settings I recommend:

On how to change JVM startup parameters in SOA 11g please check my post here
JVM Heap Recommendations for Development Managed Servers
-server –d64 –Xss256k –Xms4g –Xmx4g –XX:NewRatio=2 -XX:+AggressiveOpts -XX:PermSize=1g -XX:MaxPermSize=1g -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=8 -XX:InitialSurvivorRatio=10 -XX:SurvivorRatio=10 -XX:LargePageSizeInBytes=4m -Dweblogic.StuckThreadMaxTime=900 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/java.hprof -verbose:gc -Xloggc:/tmp/gc.log -Xnoclassgc -XX:TargetSurvivorRatio=90 -XX:ReservedCodeCacheSize=64m -XX:CICompilerCount=8 -XX:+AlwaysPreTouch -XX:+PrintReferenceGC -XX:+ParallelRefProcEnabled -XX:-UseAdaptiveSizePolicy -XX:+PrintAdaptiveSizePolicy -XX:+DisableExplicitGC
JVM Heap Recommendations for Production Managed Servers
-server –d64 –Xss256k –Xms6g –Xmx8g –XX:NewRatio=2 -XX:+AggressiveOpts -XX:PermSize=2g -XX:MaxPermSize=2g -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=16 -XX:LargePageSizeInBytes=4m -XX:InitialSurvivorRatio=10 -XX:SurvivorRatio=10 –XX:-UseTLAB -Dweblogic.StuckThreadMaxTime=900 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/java.hprof -verbose:gc -Xloggc:/tmp/gc.log -Xnoclassgc -XX:TargetSurvivorRatio=90 -XX:ReservedCodeCacheSize=64m -XX:CICompilerCount=8 -XX:+AlwaysPreTouch -XX:+PrintReferenceGC -XX:+ParallelRefProcEnabled -XX:-UseAdaptiveSizePolicy -XX:+PrintAdaptiveSizePolicy -XX:+DisableExplicitGC

JVM Heap Recommendations for AdminServer

Modify the AdminServer JVM since it's running both the WebLogic Console administration application and the Enterprise Manager Fusion Application Control: 

-server –Xms2g –Xmx2g –XX:NewRatio=3 -XX:+AggressiveOpts -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=16 -XX:InitialSurvivorRatio=10 -XX:SurvivorRatio=10 -Dweblogic.StuckThreadMaxTime=900 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/java.hprof -verbose:gc -Xloggc:/tmp/gc.log -Xnoclassgc -XX:TargetSurvivorRatio=90 -XX:ReservedCodeCacheSize=64m -XX:CICompilerCount=8 -XX:+AlwaysPreTouch -XX:+PrintReferenceGC -XX:+ParallelRefProcEnabled -XX:-UseAdaptiveSizePolicy -XX:+PrintAdaptiveSizePolicy -XX:+DisableExplicitGC

Tuning Explanations 

The production recommendation differs from Development by the size of the heap.  Since the Production environment will be hosting significantly more traffic it will need the additional heap space to grow and handle those requests.  Tuning will be required in that there’s a possibility the Production SOA applications may need more or less heap space as required by the following factors:

-          Size of SOA interfaces deployed                                                                                                                                      -          Frequency of SOA interface usage or # of instances per minute                                                                                -          Length of time through which each instance executes

Tuning the environment should be not speculative but a measured one. Using Memory and GC analyzing tools like Oracle Enterprise Manager Grid Control in conjunction with Performance Load Testing activities, you will be able to tune your production environment adequately to prevent any load related outages.Further tuning may need to be monitored on the JVM for Garbage Collection times.  If the time it takes to do partial or Full GC increases significantly then increase the number of ParallelGCThreads.  By default the ParallelGCThreads is set to what’s available at the system level.  Example on a 2xUltraSPARC T2+ [T5240] = 128 which is too high and can cause heap fragmentation.

Since garbage collection in the Old Space or Tenured Space can be costly requiring more pause time and cpu time to complete a full gc, you may need to size up the New, Nursery, or Eden Space.  This is controlled with the NewRatio=n directive.  This sets the Eden Space to 1 / n + 1 size of the Max heap space.  If you find that majority of objects are short lived meaning the heap grows to a high end with heavy load but then returns to a lower level, then you may benefit from a larger Eden space.  This may require using a different directive than NewRatio.  You may need to size your Eden space to 50 – 60% of the total heap size.  Try –XX:NewSize=5g –XX:MaxNewSize=5g where –Xmx8g.

The default 64bit thread stack size is 1024m under SPARCv9.  When defining a 64bit model [-d64] be sure to size down the thread stack size which by default is too large; the 32bit model defaults to 512k on SPARCv9; the Linux x86-64 the Java 32bit model is 256k.  Some performance benchmarks on for WebLogic set the thread stack size to 128k on the Sun T series servers.  Having a high thread stack size can waste a significant amount of stack space [heap space].  Consider setting it to –Xss128k or –Xss256k to free up heap space and thereby reducing the overall max heap the application may need under load.

Thread local portions of the heap in the young generation is free space on the thread stack.  This can be used as a cache and can offer “excellent speedups on smaller numbers of threads (100s)”.  However, this can become a burden to the JVM costing more gc time when the number of threads are in the thousands.  On the Solaris SPARC platform the directive –XX:+UseTLAB is on by default.  When testing an application under heavy load using thousands of threads and experiencing excessive gc, consider turning off TLABs:  -XX:UseTLAB

When sizing the JVM heap or internal heaps ensure you set both the min and max to the same size.  This reduces latency while the JVM is trying to size up or down the heap spaces.  Example NewSize, MaxNewSize or PermSize, MaxPermSize

-XX:+HeapDumpOnOutOfMemoryError This directive creates a Heapdump in case of a out of memory error in the JMV. This would allow you to diagnose the root cause of thr memory leak.

-XX:HeapDumpPath=/tmp/java.hprof : This creates the Heapdump in the specified location.

-verbose:gc -Xloggc:/tmp/gc.log : This option allows you to specify the gc log file location.

Above tuning recommendations could be applied to other FMW products as well. Again the above recommendations should give you a descent start. With growing load and usage you may reconsider the tuning.

Now you can folow us on facebook and post your comments/views and questions for expert advise. Check this out facebook

Find us on facebook here

Looking forward to your thoughts and comments.

Conatact for Oracle FMW 11g/Weblogic Trainings and Freelance Engagements
Call@ +91-9646515972


  1. This article looks a bit oversized; 8GB of heap size in production environment is far too much. We are running in 1268MB heap, even on dev servers you suggest 4GB. This means you need to run a 64BIT O/S to address this amont of memory.



  2. Mark,

    Indeed one would need a 64 bit server. We earlier ran the managed server on a 2 GB heap. But it was the bove settings which helped me get a great performance. And also it depends on the load on the server. The above mentioned 8 GB would help you support a heavy loaded SOA instance with thousands of transactions on it.


  3. Also the above tuning works for SOA instance running AIA


  4. Setting a low maximum heap value compared to the amount of live data decrease performance by forcing frequent garbage collections.

    so –Xmx should have larger value again

    setting the minimum heap size (-Xms) equal to the maximum heap size (-Xmx) minimizes garbage collections.

    So here if both the values are on higher side the performance will be better.

  5. Mark,

    Oracle themselves are not aware of any customer running AIA Foundation Pack 11g with a heap size less than 6GB, so I wouldn't be surprised seeing higher sizes on actual production systems.


  6. This comment has been removed by the author.

  7. Issue here is to find Equilibrium between these different factors. There is no answer that fits all environments. I agree with the author you have to monitor, monitor, and monitor, then Tune.
    We must allow the system to tell us what is best for the application running on it. as we know applications is the driver for system requirements. When we ignore the application requirements we can’t tune blindly. Many so called experts make the mistake of tuning the system without application consideration and they fail every time.

  8. I strongly dis-agree with Soumya comments. He must not have actual experience in this area. Theories don't work without practical experience

    1. thanks a lot Mohit for those encouraging words :)

  9. Soumya, do you have a suggestion on the number of threads to use on PROD (T5240) hardware? You seem to be using 10 threads here. If you had 32 threads and 32gb at your hand, how would you tune your environment considering two MS instances of SOA server with AIA to be started up?

    1. Keep Heap size specified as above.

      For Admin Server you could use 10 threads.

      Use 22 for the SOA Managed Server.

      5240 :) Bad Choice for SOA 11g :)


  10. dear all admin.....
    please tell me about setting jvm for managed server and admin server.this setting on setDomainEnv or other place....
    please tell me


    1. @All My Code Please find your answer at my post:

      Contact for Oracle Fusion Middleware Training and Freelance Engagements

  11. hi

    your biggest problem is your server cpu architecture. On Sun T series you can not run bpel server.

    Change your server (Sun M Series or I advise IBM P7 series)

    Then you can talk GC tunings and etc.!

  12. Hi,

    When I open soa related domin file, having two kinds of mem settings.
    1) Def_mem_args
    2) Port_mem_args

    I want to know the usage of these mem args in SOA environemnt? Normally when I see the mem args section in WLS set domain file, we have only one mem argument value.

    Why we need to thse two mem args? Also internally how usign these things?

    Pls help.


  13. Can the above jvm settings be used with jrockit

  14. Large heap settings are consistent with the following Oracle Whitepaper called "Tuning and Performance for Oracle SOA Suite 11g on Oracle’s SPARC T4 Servers" located here:

  15. I have compiled an eBook on Oracle fusion middleware 11g - BPEL PM. I appreciate, if you may give your comments.
    1. Load & Performance Testing –
    2. BPEL PM Introduction -
    3. JVM Tuning -
    4. Web Logic Server Tuning –
    5. BPEL Engine Tuning -
    6. EM Fusion Middleware Control and WLS Admin Console –
    Thanks for your feedback and encouragement.

  16. Hi this is Kathiresan i am having 3 years of experience as a dot net developer and i am certified. i have knowledge on OOPS concepts in .NET but dont know indepth. After learning android will be enough to get a good career in IT with good package? and i crossed Android Training in Chennai website where someone please help me to identity the syllabus covers everything or not??


  17. Android Training in ChennaiFebruary 18, 2015 at 10:19 AM

    Hi this is Kathiresan i am having 3 years of experience as a dot net developer and i am certified. i have knowledge on OOPS concepts in .NET but dont know indepth. After learning android will be enough to get a good career in IT with good package? and i crossed Android Training in Chennai website where someone please help me to identity the syllabus covers everything or not??


  18. Thanks for sharing this excellent post. Its really very informative and interesting. Keep update your blog. For a best Android training in Chennai please refer this site.
    Android Training in Chennai

  19. Thanks for sharing Valueable information.This post is very interesting.Oracle SOA Certification is one in all the certifications that skilled will acquire from this company. Turning into an Oracle SOA Suite Essentials skilled can demonstrate that you just have the talents and skills so as to meet your job role.
    ORACLE SOA Certification


  20. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
    Greens Technologies In Chennai

  21. This information is impressive..I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic
    Greens Technologies In Chennai

  22. SAS Training in Chennai
    Thanks for sharing this informative blog. I did SAS Certification in Greens Technology at Adyar.
    This is really useful for me to make a bright career..

  23. Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..
    QTP Training in Chennai

  24. There are lots of information about latest technology and how to get trained in them, like Hadoop Training in Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies Hadoop Training in Chennai By the way you are running a great blog. Thanks for sharing this blogs..


  25. Pega Training in Chennai
    This post is really nice and informative. The explanation given is really comprehensive and informative..

  26. Informatica Training in chennai
    Thanks for sharing such a great information..Its really nice and informative..

  27. Oracle Training in chennai
    Wonderful blog.. Thanks for sharing informative blog.. its very useful to me..

  28. Oracle Training in chennai
    I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly..

  29. Thanks for sharing amazing information about pega Gain the knowledge and hands-on experience you need to successfully design, build and deploy applications with pega. Pega Training in Chennai

  30. Who wants to learn Informatica with real-time corporate professionals. We are providing practical oriented best Informatica training institute in Chennai. Informatica Training in chennai

  31. QTP is a software Testing Tool which helps in Functional and Regression testing of an application. If you are interested in QTP training, our real time working. QTP Training in Chennai

  32. Looking for real-time training institue.Get details now may if share this link visit Oracle Training in chennai

  33. Hey, nice site you have here!We provide world-class Oracle certification and placement training course as i wondered Keep up the excellent work experience!Please visit Greens Technologies located at Chennai Adyar Oracle Training in chennai

  34. Nice site.... refer this site .if Our vision succes!Training are focused on perfect improvement of technical skills for Freshers and working professional. Our Training classes are sure to help the trainee with COMPLETE PRACTICAL TRAINING and Realtime methodologies. Green Technologies In Chennai

  35. Job oriented Hadoop training in Chennai is offered by our institue is mainly focused on real time and industry oriented. We provide training from beginner’s level to advanced level techniques thought by our experts. Hadoop Training in Chennai

  36. I also wanted to share few links related to sas training Check this sitete.if share indepth sas training.Go here if you’re looking for information on sas training. SAS Training in Chennai

  37. You have stated definite points about the technology that is discussed above. The content published here derives a valuable inspiration to technology geeks like me. Moreover you are running a great blog. Many thanks for sharing this in here.

    Salesforce Training in Chennai
    Salesforce Certification
    Salesforce Training


  38. Thanks for sharing this useful informative post to our knowledge, Actually OBIEE training will mostly concentrate on real time issues rather than simply teaching you the OBIEE course. This will help you when you join the job and while attending interviews. Obiee Training in chennai

  39. I would recommend the Qlikview to anyone interested in learning Business Intelligence .Absolutely professional and engaging training sessions helped me to appreciate and understand the technology better. thank you very much if our dedicated efforts and valuable insights which made it easy for me to understand the concepts taught and more ... qlikview Training in chennai

  40. Oracle Training in Chennai is one of the best oracle training institute in Chennai which offers complete Oracle training in Chennai by well experienced Oracle Consultants having more than 12+ years of IT experience.

  41. It is really very helpful for us and I have gathered some important information from this blog.
    Oracle Training In Chennai

  42. There are lots of information about latest technology and how to get trained in them, like
    Hadoop Training Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies(Hadoop Training in Chennai). By the way you are running a great blog. Thanks for sharing this.

  43. Great post and informative was awesome to read, thanks for sharing this great content to my vision.
    Informatica Training In Chennai

  44. A Best Pega Training course that is exclusively designed with Basics through Advanced Pega Concepts.With our Pega Training in Chennai you’ll learn concepts in expert level with practical manner.We help the trainees with guidance for Pega System Architect Certification and also provide guidance to get placed in Pega jobs in the industry.

  45. Our HP Quick Test Professional course includes basic to advanced level and our QTP course is designed to get the placement in good MNC companies in chennai as quickly as once you complete the QTP certification training course.

  46. Thanks for sharing this nice useful informative post to our knowledge, Actually SAS used in many companies for their day to day business activities it has great scope in future.

  47. Greens Technologies Training In Chennai Excellent information with unique content and it is very useful to know about the information based on blogs.



  49. Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
    QTP Training in Chennai

  50. Excellent information with unique content and it is very useful to know about the information based on blogs.
    Selenium Training in Chennai | QTP Training In Chennai

  51. In database computing, Oracle Real Application Clusters (RAC) — an option for the Oracle Database software produced by Oracle Corporation and introduced in 2001 with Oracle9i — provides software for clustering and high availability in Oracle database environments. Oracle Corporation includes RAC with the Standard Edition, provided the nodes are clustered using Oracle Clusterware.
    Oracle RAC allows multiple computers to run Oracle RDBMS software simultaneously while accessing a single database, thus providing clustering.

    In a non-RAC Oracle database, a single instance accesses a single database. The database consists of a collection of data files, control files, and redo logs located on disk. The instance comprises the collection of Oracle-related memory and operating system processes that run on a computer system.

    Oracle RAC Training in Chennai

  52. very nice blogs!!! i have to learning for lot of information for this sites...
    android Training in Chennai

  53. Such a informative post.Thanks for sharing your knowledge with us.keep it up for updating post..

  54. Thanks for the good topic. Very useful information.
    We IT hub Online Training are good in giving the oracle soa Training

  55. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    Python Training in Chennai | Python Course in Chennai

  56. I really helpful for reading your Oracle Fusion Middleware Admins ..., you have lots of great content. I look forward to reading more Link from you. Surya Informatics Solutions

  57. DreamHost is ultimately one of the best hosting company for any hosting services you require.

  58. Thanks for sharing useful information article to us keep sharing this info,
    Hi we at Colan Infotech Private Limited , a company which is Situated in US and India, will provide you best java web service and our talented
    java application development.
    team will assure you best result and we are familiar with international markets, We work with customers in a wide variety of sectors. Our talented team can handle all the aspects of
    Java web application development,
    we are the best among the
    Java development company.
    We have quite an extensive experience working with
    java development services.
    we are the only Java application development company.
    which offer custom services to a wide range of industries by exceeding our client’s expectations. You can even interact directly with the team regarding your project, just as you would with your in-house team.Our pro team will provide you the best
    java appliaction development services.
    We are best among the
    java development companies in Chennai,
    please review our customer feedbacks so that you may find a clue about us. If you want one stop solution for java development outsourcing, Colan infotech is the only stop you need to step in. Colan Infotech is the unique
    java web development company.
    were our team of unique
    java application developer
    were ranked top in
    java enterprise application development.

  59. Thanks for the awesome share
    We at Colan Infotech Private Limited best web design company in chennai,is Situated in US and India,
    will provide you best service in qa testing services
    Design Services and Colan Infotech has a group of exceedingly dedicated, inventive and creative experts with an energy for delivering exciting ,
    helpful and stylish Web and Mobile Applications, We are one of the best software testing services company
    and of course we stepped in bangalore too we are best qa and testing services
    can provide quality assurance and testing services,
    we are the best among the software testing company india

  60. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharng this information,this is useful to me...
    Android training in chennai
    Ios training in chennai


  61. Thanks for posting useful information.You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...Really it was an awesome article...very interesting to read..please sharing like this information......
    Web Design Development Company
    Mobile App Development Company

  62. I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
    PHP training in chennai

  63. You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...
    Fitness SMS
    Salon SMS
    Investor Relation SMS

  64. SQL, SQL plus and PLSQL is great language and great experience to work with an wonderful Skill set and thanks for sharing the information about such and beautiful topic.

    Oracle SQL Frequently Asked Questions


  65. These ways are very simple and very much useful, as a beginner level these helped me a lot thanks fore sharing these kinds of useful and knowledgeable information.
    Android App Development Company

  66. great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
    web design Company
    web development Company
    web design Company in chennai
    web development Company in chennai
    web design Company in India
    web development Company in India

  67. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Pega Training in Chennai

  68. it is really amazing...thanks for sharing....provide more useful information...
    Mobile app development company