[jboss-cvs] JBossAS SVN: r100244 - projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 2 02:58:02 EST 2010
Author: laubai
Date: 2010-02-02 02:58:01 -0500 (Tue, 02 Feb 2010)
New Revision: 100244
Modified:
projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Book_Info.xml
projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Performance_Tuning.xml
projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Revision_History.xml
Log:
Partial edit of Performance Tuning.
Modified: projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Book_Info.xml
===================================================================
--- projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Book_Info.xml 2010-02-02 07:10:12 UTC (rev 100243)
+++ projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Book_Info.xml 2010-02-02 07:58:01 UTC (rev 100244)
@@ -7,7 +7,7 @@
<subtitle>for JBoss Enterprise Web Platform 5.0</subtitle>
<edition>1</edition>
<issuenum>1</issuenum>
- <pubsnumber>0.9</pubsnumber>
+ <pubsnumber>1.1</pubsnumber>
<productname>JBoss Enterprise Web Platform</productname>
<productnumber>5.0</productnumber>
<!-- <pubdate>, 2009</pubdate> -->
Modified: projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Performance_Tuning.xml
===================================================================
--- projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Performance_Tuning.xml 2010-02-02 07:10:12 UTC (rev 100243)
+++ projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Performance_Tuning.xml 2010-02-02 07:58:01 UTC (rev 100244)
@@ -5,20 +5,23 @@
<title>JBoss Enterprise Web Platform 5 Performance Tuning</title>
<section id="Tuning_Introduction">
<title>Introduction</title>
-
-<para>
+ <para>
<indexterm><primary>JBoss Enterprise Web Platform 5 Performance Tuning</primary><secondary>performance</secondary></indexterm>
<indexterm><primary>Performance</primary><secondary>JBoss Enterprise Web Platform 5 Performance Tuning</secondary></indexterm>
<indexterm><primary>JBoss Enterprise Web Platform</primary><secondary>performance tuning</secondary></indexterm>
- Developing applications and deploying them to an Enterprise Web Platform does not guarantee best performance without performance tuning of the applications and server.
- Performance tuning involves ensuring your application does not consume resources unnecessarily while ensures best performance of the applications and Enterprise Web Platform.
-</para>
-<para>
+ Performance can be affected by application design, hardware, network profile, operating system,
+ application development, testing and deployment. Performance tuning ensures that your
+ application does not consume unnecessary resources. Read this chapter to understand how to make
+ your applications and your Enterprise Web Platform instance as efficient as possible.
+ </para>
+
+<!--<para>
+ Problems
Application design, hardware/network profile, operating system, application software development, testing and deployment all play a major role in performance tuning. A bottleneck in performance therefore could be caused by these factors not just your application. Recent studies show that most performance problems are the result of the applications not the middleware or the operating systems. This could be associated with the technological developments in computer software, hardware and networking which has increased their reliability.
</para>
<para>
Improvement of application design and undertaking performance review of your applications before implementation is vital to avoiding bottlenecks after implementation. To undertake a performance review you need to setup a test environment undertake and analyze the test results. To effectively undertake a review, you also need to identify peak application workload times and the difference from normal workload periods. Peak workload times could be during the day, week, certain periods of the month, quarter or year. In understanding peaks workloads it is advisable not to go by averages as the peaks may be much more than the averages calculated over a period. The system requirements are bound by the peaks in the workload not the averages. On undertaking tuning it is recommended to carry out a few more tests and tuning of your system until a satisfactory performance is achieved.
-</para>
+</para>-->
</section>
@@ -33,45 +36,48 @@
<section><title>CPU (Central Processing Unit)</title>
<para>
- The CPU is the central processing unit of your computer which consists of:
- <itemizedlist>
- <listitem>
- <para>
- a control unit which receives and decides what type of instructions it has received,
- </para>
- </listitem>
- <listitem>
- <para>
- CPU registers that store intermediate processing information temporarily,
- </para>
- </listitem>
- <listitem>
- <para>
- a program counter which holds the location of the succeeding executable tasks,
- </para>
- </listitem>
- <listitem>
- <para>
- instruction register that stores currently executing tasks,
- </para>
- </listitem>
- <listitem>
- <para>
- CPU cache which is a limited memory that holds data currently being processed by the CPU.
- </para>
- </listitem>
- </itemizedlist>
-
- Understanding your CPU architecture can be helpful in identifying your CPU specifications and how it works. For AMD CPU's please refer to <ulink url="http://www.amd.com/us-en/Processors/ProductInformation/0,,30_118,00.html">http://www.amd.com/us-en/Processors/ProductInformation/0,,30_118,00.html</ulink> for more information. For Intel CPU's please refer to <ulink url="http://www.intel.com/products/processor/index.htm?iid=subhdr+prod_proc">http://www.intel.com/products/processor/index.htm?iid=subhdr+prod_proc</ulink> for more information.
+ The CPU is the central processing unit of your computer.
+ It consists of:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ a control unit which receives and decides what type of instructions it has received,
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ CPU registers that store intermediate processing information temporarily,
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ a program counter which holds the location of the succeeding executable tasks,
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ instruction register that stores currently executing tasks,
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ CPU cache which is a limited memory that holds data currently being processed by the CPU.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Understanding your CPU architecture can help you identify your CPU specifications.
+ For AMD CPUs, refer to <ulink url="http://www.amd.com/us-en/Processors/ProductInformation/0,,30_118,00.html">http://www.amd.com/us-en/Processors/ProductInformation/0,,30_118,00.html</ulink>. For Intel CPUs, refer to <ulink url="http://www.intel.com/products/processor/index.htm?iid=subhdr+prod_proc">http://www.intel.com/products/processor/index.htm?iid=subhdr+prod_proc</ulink>.
</para>
</section>
<section><title>RAM (Random Access Memory)</title>
<para>
- Random access memory (RAM) is the next level of storage that can be used to hold executing programs and/or data. RAM chips provides a higher amount of storage than the CPU cache and can improve computer performance. Storing data or programs frequently used in RAM can highly improve performance as they can be retrieved faster than from the hard disk drives.
+ Random access memory (RAM) is the next level of storage that can be used to hold executing programs and/or data. RAM chips provide a higher amount of storage than the CPU cache and can improve computer performance. Storing data or programs frequently used in RAM can greatly improve performance as they can be retrieved faster than from the hard disk drives.
</para>
<para>
- RAM is crucial for example when tuning your database management system to manage buffer cache. This would involve storing frequently used database information in RAM for quick application access while taking caution not to affect overall performance of other applications and operating system.
+ RAM is crucial for example when tuning your database management system to manage buffer cache. This involves storing frequently used database information in RAM for quick application access while being careful not to negatively affect overall operating system performance or the performance of other applications.
</para>
</section>
@@ -80,11 +86,10 @@
Unlike the CPU and RAM, hard disk drives do not require a power source to retain information/data. In case of power loss, information stored in the CPU and RAM is lost while that stored in the hard disk is retained but may be corrupted depending on the type of operation that was in progress during the power loss.
</para>
<para>
- However retrieval and storage of information from disk drives takes much longer as they use mechanical heads to read and write information to the cylinders of the disk. Storage areas in RAM and in the CPU can be accessed with equal speed while on the hard disk, movement of the disk head to the requested disk block/blocks where information is stored is necessary.
+ Retrieval and storage of information from disk drives takes much longer as they use mechanical heads to read and write information to the cylinders of the disk. Storage areas in RAM and in the CPU can be accessed with equal speed while on the hard disk, movement of the disk head to the requested disk block/blocks where information is stored is necessary.
</para>
<para>
- Practices such as disk defragmentation and cleanups can help improve file retrieval and overall performance of your applications.
- It is therefore crucial to manage the disk storage carefully with the retrieval and processing of data in mind. You also need to identify a suitable file system for your operating system to ensure the best performance possible.
+ Practices such as disk defragmentation and cleanups can help improve file retrieval and overall performance of your applications. It is therefore crucial to manage the disk storage carefully with the retrieval and processing of data in mind. You also need to identify a suitable file system for your operating system to ensure the best performance possible.
</para>
<para>
Understanding the main architectural differences and issues that may occur with different computer hardware profiles can help identify a suitable hardware performance and disaster management strategy that would be suitable for your needs.
@@ -118,7 +123,7 @@
Identifying network architecture and infrastructure is therefore critical in performance tuning and fixing system bottlenecks.
</para>
<para>
- Most modern operating systems provide you with network hardware configuration tools while some hardware manufacturers may also provide extended network hardware configuration tools with their drivers.
+ Most modern operating systems provide you with network hardware configuration tools. Some hardware manufacturers may also provide extended network hardware configuration tools with their drivers.
</para>
<para>
Most operating systems support different communication protocols which you can tweak. Factors such as TCP buffer memory space, connection buffer limits and acknowledgment options among others should be take into account in your network design.
@@ -134,7 +139,7 @@
<section id="JVM_Tuning">
<title>Tuning the JVM</title>
<para>
- For Java-based applications, it is recommended to also be familiar with tuning of your Java Virtual Machine (JVM). Some key aspects of your JVM that need tweaking include managing out of memory exceptions, Java heap settings and garbage collection. Please refer to the JDK 6 documentation on <ulink url="http://java.sun.com/j2se/1.6.0/docs/">http://java.sun.com/j2se/1.6.0/docs/</ulink> for further discussions on this.
+ For Java-based applications, it is recommended to also be familiar with tuning of your Java Virtual Machine (JVM). Some key aspects of your JVM that need tweaking include managing out-of-memory exceptions, Java heap settings and garbage collection. Please refer to the JDK 6 documentation on <ulink url="http://java.sun.com/j2se/1.6.0/docs/">http://java.sun.com/j2se/1.6.0/docs/</ulink> for further information.
</para>
@@ -150,29 +155,29 @@
In addition, using benchmarking tools to test your applications may be a quick way to pinpoint issues in your code which can often be causes for performance bottlenecks. Iterative tests are recommended to identify cache and other hardware issues that may arise due to start up or other factors.
</para>
<para>
- The JBoss Enterprise Web Platform web console <ulink url="http://localhost:8080/web-console/">http://localhost:8080/web-console/</ulink> provides you with monitoring tools starting with the JVM environment statistics on the default page and access to monitoring tools and snapshots.
+ The JBoss Enterprise Web Platform web console, <ulink url="http://localhost:8080/web-console/">http://localhost:8080/web-console/</ulink>, provides you with monitoring tools starting with the JVM environment statistics on the default page and access to monitoring tools and snapshots.
</para>
- <note><title>Performance Monitor v/s Profiler</title>
+ <note><title>Performance Monitors and Profilers</title>
<para>
A performance monitor informs you on overall application performance such as requests per second.
Profiling tools such as <ulink url="http://www.jboss.org/jbossprofiler/">JBoss Profiler</ulink> will tell you how long it is taking your application to service a request, and how often it services certain types of requests. This can usually be broken down all the way to the individual methods. For example, how many times a method was called and the average/maximum/minimum amount of time spent in the method.
</para>
</note>
<para>
- It is also important to take caution not to create bottlenecks for other applications while fixing a performance issue in one application.
+ It is also important not to create bottlenecks for other applications while fixing a performance issue in one application.
</para>
<section>
<title>Instrumentation</title>
<para>
- Applications should be instrumented for performance analysis. In most cases, the actual production workload is different than the expected workload. Without instrumentation of your applications, you will lack accurate tracking data. Workloads on your applications can also change over time, as the business size, models or environment changes.
+ Applications should be instrumented for performance analysis. In most cases, the actual production workload differs from the expected workload. Without instrumentation of your applications, you will lack accurate tracking data. Workloads on your applications can also change over time, as the business size, models or environment changes.
</para>
<para>
- Instrumentation in the past would have had to be embedded in the application. Today, there are many solutions for instrumentation that do not require developers to code. Commercial products, and the JBoss AOP framework can be used for just this purpose. You can also turn on call statistics in the containers, and Hibernate statistics. For more on this please refer to the AOP and Hibernate project pages.
+ In the past, instrumentation had to be embedded in the application. Today, there are many solutions for instrumentation that do not require developers to code. Commercial products, and the JBoss AOP framework can be used for just this purpose. You can also turn on call statistics in the containers, and Hibernate statistics. For more on this please refer to the AOP and Hibernate project pages.
</para>
<para>
- Taking successive thread dumps (includes the current call stack for each Java Enterprise Web Platform thread) can give the application developers enough information to get a sense for what is going on in the application. This is something that you might do after the application has hit a performance wall. If the performance problem lasts for five minutes, you might generate a thread dump one a minute. You can use the JVM "jps -l" command to get a list of running Java applications and the process ids for each. Note the process ID for the "org.jboss.Main" application. You will then run the "jstack ProcessID" command (replacing ProcessID with the "org.jboss.Main" process ID) and that will generate the thread dump. Of course, you should redirect the output of the jstack command to save the output ("jstack ProcessID > threaddump1.txt").
+ Taking successive thread dumps (includes the current call stack for each Java Enterprise Web Platform thread) can show application developers what is happening in the application. If an application has hit a performance wall, and the performance issue lasts for five minutes, generating a thread dump every minute may help solve the problem. You can use the JVM <command>jps -l</command> command to get a list of running Java applications and the process IDs for each. Note the process ID for the <classname>org.jboss.Main</classname> application. Then run the <command>jstack ProcessID</command> command (replacing ProcessID with the <classname>org.jboss.Main</classname> process ID) to generate the thread dump. Of course, you should redirect the output of the jstack command to save the output: <code>jstack ProcessID > threaddump1.txt</code>.
</para>
@@ -183,37 +188,43 @@
<section id="JBAS_Tuning">
<title>Tuning JBoss Enterprise Web Platform</title>
<para>
- Before tuning the JBoss Enterprise Web Platform, please ensure that you are familiar with its components outlined in the introduction section of this book. You should also be familiar with any particular services your application may use on the server and tune them to improve performance. It is also important to establish optimal database connections used by your applications and set these on the server. This section discusses these among other JBoss Enterprise Web Platform performance tuning topics.
+ Before tuning the JBoss Enterprise Web Platform, please ensure that you are familiar with its components, as outlined in the introduction section of this book. You should also be familiar with any particular services your application may use on the server and tune them to improve performance. It is also important to establish optimal database connections used by your applications and set these on the server. This section discusses these among other JBoss Enterprise Web Platform performance tuning topics.
</para>
<section id="Memory_Usage_Tuning"><title>Memory usage</title>
<para>
- Memory usage of Java applications including the JBoss Enterprise Web Platform is dictated by the heap space allocated. You could therefore as an example, reduce 1GB heap space you currently have allocated to 800MB to reduce memory footprint (if you have enough headroom).
+ Memory usage of Java applications including the JBoss Enterprise Web Platform is dictated by the heap space allocated. You could, for example, reduce the currently allocated 1 gigabyte heap space to 800 megabytes to reduce memory footprint (if you have enough headroom).
</para>
<para>
- The Java Virtual Machine (JVM) manages segments (generations) of memory. If a segment of the heap space is exhausted, you will see a Java OutOfMemoryError (OOME). All bets are off, when you get a Java OutOfMemoryError. The application should be restarted to correct any bad state. Part of tuning is checking how much memory headroom you have while under load. If available memory is too low, you will need to increase the max Java memory size (possibly switching to a 64-bit JVM if needed).
-
+ The Java Virtual Machine (JVM) manages segments generations of memory. If a segment of the heap space is exhausted, you will see a Java <errorname>OutOfMemoryError</errorname> (OOME). The application should be restarted to correct any bad state. If the available memory is insufficient, increase the maximum Java memory size. You may need to switch to a 64-bit JVM.
</para>
- <para>
- Running out of memory generates an Error that is not likely to be masked in a Java catch block because it is an Error rather than an Exception. An OOME is also thrown when the permanent memory is exhausted and that is not part of the heap. That is a JVM specific area of memory where information on loaded classes is maintained. If you have a mountain of classes (e.g, a lot of EJBs and JSP pages) you can easily exhaust this area. Oftentimes an application will fail to deploy or fail to redeploy. Increase your permanent memory space as follows to avoid OOMEs. The default with the <literal>-server</literal> switch is 64 megabytes:
+ <para>
+ An OOME is also thrown when the permanent memory is exhausted. Permanent memory is not part of the heap. It is a JVM-specific area of memory where information about loaded classes is maintained. If you have a large number of classes, this area may not be sufficient and your applications will fail to deploy or redeploy. The default value for the <code>-server</code> switch is 64 megabytes. You can increase permanent memory space to avoid OOMEs like so:
+ </para>
<screen>-XX:MaxPermSize=256m</screen>
- </para>
<para>
- Note this is in addition to the heap. In this case we have 512M heap, 256M permanent space for a total of 768 megabytes. Don't forget the JVM itself takes up a chunk of system memory and there is also per thread stack space (size varies based on OS). That can add up with a lot of HTTP/S processors.
+ This adds 256 megabytes of permanent space to the 512 megabytes originally provided by the heap for a total of 768 megabytes. Remember that the JVM consumes system memory, and that stack space is also consumed on a per-thread basis (size varies with operating system).
</para>
- <para>
- <literal>-XX:MaxPermSize=256m -Xmx512m</literal> (total of 768 megabytes allocated from system - this is not the total size of the VM and does not include the space the VM allocates for the "C heap" or stack space)
+ <para>
+ The total memory allocated from the system in the following is 768 megabytes:
+ </para>
+<screen>-XX:MaxPermSize=256m -Xmx512m</screen>
+ <para>
+ This is not the total size of the VM and does not include the space the VM allocates for the <emphasis>C heap</emphasis> or stack space.
</para>
-
- <para>
- The HotSpot Java Virtual Machine consists of various garbage collection tools which you can use to collect garbage collection information that you can use to tune your applications. You can find more information on the HotSpot Virtual machine on <ulink url="http://java.sun.com/javase/technologies/hotspot/">http://java.sun.com/javase/technologies/hotspot/</ulink>.
- </para>
- <para>
- Java 6 includes new tools that help monitor Java applications. Jmap can generate a heap dump file (<ulink url="http://java.sun.com/javase/6/docs/technotes/tools/share/jmap.html">http://java.sun.com/javase/6/docs/technotes/tools/share/jmap.html</ulink>) that can easily be read by the Eclipse Memory Analyzer tool (<ulink url="http://www.eclipse.org/mat/">http://www.eclipse.org/mat/</ulink>). The jstat tool (<ulink url="http://java.sun.com/javase/6/docs/technotes/tools/share/jstat.html">http://java.sun.com/javase/6/docs/technotes/tools/share/jstat.html</ulink>) can help give you a precise picture of
-your permanent memory space and the other segments on the Java memory heap.
-
- </para>
-
+ <note>
+ <title>HotSpot JVM</title>
+ <para>
+ The HotSpot JVM consists of various garbage collection tools which you can use to collect garbage collection information that you can use to tune your applications. You can find more information on the HotSpot Virtual machine on <ulink url="http://java.sun.com/javase/technologies/hotspot/">http://java.sun.com/javase/technologies/hotspot/</ulink>.
+ </para>
+ </note>
+ <note>
+ <title>Monitoring Tools for Java 6</title>
+ <para>
+ Java 6 includes new tools that help monitor Java applications. <application>Jmap</application> can generate a heap dump file (<ulink url="http://java.sun.com/javase/6/docs/technotes/tools/share/jmap.html">http://java.sun.com/javase/6/docs/technotes/tools/share/jmap.html</ulink>) that can easily be read by the Eclipse Memory Analyzer tool (<ulink url="http://www.eclipse.org/mat/">http://www.eclipse.org/mat/</ulink>). The <application>jstat</application> tool (<ulink url="http://java.sun.com/javase/6/docs/technotes/tools/share/jstat.html">http://java.sun.com/javase/6/docs/technotes/tools/share/jstat.html</ulink>) can help give you a precise picture of your permanent memory space and the other segments on the Java memory heap.
+ </para>
+ </note>
+<!--hajime-->
<section id="VFS_Tuning">
<title>VFS Tuning</title>
<para>
@@ -223,14 +234,14 @@
<itemizedlist>
<listitem>
<para>
- <property>jboss.vfs.forceCopy</property> - has the options true and false, with the default being false.
+ <property>jboss.vfs.forceCopy</property>
</para>
<para>
- This defines how nested jars should be handled. If forceCopy equals true, we create a temporary copy of the nested jar, and re-wire VFS accordingly. If forceCopy equals false, we handle nested jars in-memory, which doesn't create temporary copy, but is more memory consuming. Currently JBoss Enterprise Web Platform forces temporary copy by default.
+ This defines how nested jars should be handled. If forceCopy equals true (the default), we create a temporary copy of the nested jar, and re-wire VFS accordingly. If forceCopy equals false, we handle nested jars in-memory, which doesn't create temporary copy, but is more memory consuming.
</para>
- <para>
+<!-- <para>
If the <property>useCopyJarHandler</property> property is used as part of URI query, you can configure force-copy at runtime, per URI root (if it doesn't already exist).
- </para>
+ </para>-->
</listitem>
<listitem>
<para>
Modified: projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Revision_History.xml
===================================================================
--- projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Revision_History.xml 2010-02-02 07:10:12 UTC (rev 100243)
+++ projects/docs/enterprise/EWP_5.0/Administration_And_Configuration_Guide/en-US/Revision_History.xml 2010-02-02 07:58:01 UTC (rev 100244)
@@ -8,8 +8,8 @@
<simpara>
<revhistory>
<revision>
- <revnumber>2.0</revnumber>
- <date>Mon Jan 25 2010</date>
+ <revnumber>2.2</revnumber>
+ <date>Tue Feb 01 2010</date>
<author>
<firstname>Laura</firstname>
<surname>Bailey</surname>
More information about the jboss-cvs-commits
mailing list