Marcações

Examining performance related issues in WebSphere Commerce

Everything seems to be running fine with your WebSphere Commerce installation, orders are flowing, customers are browsing with no problem, things look great. Then it happens, your site is not responsive and you are not sure what the cause of this is. Before you panic, you need to look and see what is going on, then you can look at why it happened.

When you call support it's a good idea to have a basic idea of what happened. Was it a hang, did the process crash, was it high cpu, or did you see an out of memory error? First we will look at how you can determine this, and second we will look at the general troubleshooting steps you can do on your own. It's important to have a general idea of what happened/is happening to your system when starting your troubleshooting, and when thinking of what data to collect. Depending on the situation some data may not provide much information, while leaving out other data can hinder solving the problem.

The first thing you want to look at is how to monitor the process of your system. For most UNIX® type systems this will be something like top or tprof depending. These can be used to see individual threads in a process so that you can see what exactly in the JVM is causing a problem. Now on windows you will run into a problem where the task manager does not give you that kind of information, that is why we recommend using something like TPROF for Windows.

Once you can see what is going on with the CPU and the threads, it is good to examine what is going on. If you see the CPU is high, it's good to collect the top or tprof data and compare that against javacores. It is good to take javacores every so often. This technote entitled "How to map threads from tprof data to javacores" describes how to examine the threads and map them to the hex id that is in the javacore. With that you can see what threads are consuming CPU.

Now if you notice the heap is filling up and you are running out of room, you will want to review the heap. This can be more challenging depending on the size heap produced. It's a good rule of thumb that you will need to have close to the amount of memory for the tool to process the heap, as the heap took up. Now I use the following tool Memory Analysis Tool, along with the following add-ons: IBM Diagnostic Tool Framework for Java Version 1.10, IBM Extensions for Memory Analyzer. With those two installed it will allow a better view of the heap dumps that are provided. Things to look for is to run the leak suspects tool and have it process what could be filling up the heap, another is to review the heap in the histogram tool and see if there is an abnormal number of objects from various sources. You can view this webinar on how to use it at eclipse.org (external link) Memory Analyzer Project.

Taken all together your system is running fine, what should you do NOW?

Ensure your system is setup to gather cores if needed (AIX, Linux, Solaris)

If on Windows have TPROF or some other tool to measure cpu usage both by process and threads within a process