In rocket/RocketCore.scala
There exists performance counter which describes cache misses, load, or store.
How can I see this information after rocket core finishes its running?
Could you give me an example on how to do this?
As far as I know, there's nothing on this guide.
Related
I have reached the point in time where I need to monitor my app performance and understand what is going under the hood.
My application is running on Heroku, so I don't have the option to run the regular jmap, jstack commands.
I read all Heroku documents talking about performance, and play documentation, but didn't find an answer.
So is there a good way to measure my default execution context thread pool size?
You can use jmap and jstack with the scripts described in this article on Troubleshooting Memory Issues in Java Applications.
There is also a memory logging agent that logs runtime stats in near real time.
I have a web site and I am using iis as my web server. I noticed that on production server, the cpu reaches 95% usage pretty fast with very little users. this behaviour I don't see on my developement server. I am using visual studio to develop and iis as my local web server as well.
How much big traffic you have on production comparing to development server? How their parameters compare? Before starting a deep analysis of the application itself, I would identify all the infrastructure and environmental differences. Sometime such problems happens because of some other software, like antivirus software running in the background...
Nevertheless, because it sounds rather as a application problem, I would first check Event Viewer for errors. Then I would start from monitoring a few Performance Counters to correlate % Processor Time counter with Current Connections, Available Memory, # of Exceps Thrown / sec, % Time in GC and so on. This kind of behavior usually has a reason from the list:
excessive loops usage due to some logic error, like calling the same service again and again, trying to load or parse malfunctioned file etc. This can be analyzed with dump analysis (look below).
high CPU usage due to Garbage Collector - when memory usage is extensive (or there is a memory leak even) GC may start to consume more and more CPU fighting with the memory shortage. You will see this with memory-related performance counters.
a considerable amount of exceptions thrown (for example due to some environmental problems like network unavailability, production data difference) can also consume a lot of CPU. Event Viewer and exception-related performance counters (as they can be handled silently by your application) should be a indicator here.
To further analyze your application, I suggest to make a full memory dump during high CPU usage. You can do that with Debug Diag tool. Please refer this IIS troubleshooting guide for details.
I am encountering an issue with my asp.net c# web application where the server is hitting very high cpu useage eg. 80%+ on w3wp process.
This has only happened recently after I made numerous changes to my application. I am fairly sure that it may be one of the changes that I have made is causing this issue with high cpu useage on the iis 7 web server.
Is it possible to analyze the process and find what exactly is causing this high useage? Or what is the mechanism for debugging such an issue.
ASP.NET Case Study: High CPU in GC - Large objects and high allocation rates:
A high CPU issue is generally one of 3 things
An infinite loop
Too much load (i.e. too many requests doing lots of small things, so
no one single thing is a culprit)
Too much churning in the Garbage Collector.
Try monitoring the % Time in GC counter and the .NET CLR Memory / # Gen 0 Collections, # Gen 1 Collections and # Gen 2 Collections.
Are you calling GC.Collect() anywhere in your code?
The problem you are describing also sounds symptomatic of High CPU in .NET app using a static Generic.Dictionary, caused by multiple threads hitting the dictionary. If that's the problem:
To resolve this timing issue you should take special care to
synchronize (lock) around access to the dictionary if there is a
possibility that you may have multiple writers working at the same
time or if there is a possibility that you write while someone else is
reading/enumerating through the same dictionary.
Related: ASP.NET Performance Monitoring, and When to Alert Administrators
The quickest way is to enable Page Tracing. This will tell you exactly how long the page took to generate, and in which methods the server spent most of it's time. This should highlight any particularly slow-running methods, allowing you to focus your troubleshooting on the problematic sections.
Simply add the following to any pages you suspect of being troublesome:
<%# Page Trace="true" %>
Now, when you navigate to that page in your browser, you will get a detailed trace at the bottom of it.
I have a web application that hangs under high loads. I'm not going to go into the specifics of the code because I really just want some troubleshooting advice and tooling recommendations.
It's a web app, so each request get's a thread. Under a high load test, the app begins to consume all of the cpu, while becoming unresponsive. I suspect that the request threads are hanging in the new code that we are testing. Due to the fact of the cpu consumption, I'm assuming this must be on my app side. My understanding, which could be wrong, is that total cpu consumption indicated my first troubleshooting efforts should be in looking at the code that's consuming those cycles.
What are some tools and/or methods for inspecting which threads are hanging and on what lines of code? Again, I can easily force the app into the problematic behavior.
I've found and been trying out visualvm. Seems like the perfect tool. Still open for suggestions though. I looked at eclipse TPTP and it seems to be end-of-life-ing as well as requiring a more heavy weight deployment.
You can insert logging messages at starting a thread and closing a thread. Then you start the application and inspect the output while penetrating the code.
Another way is to look for memory leaks. If you are sure you haven't one, you can extend the virtual memory of your JVM.
#chad: do you have Database in whole picture...you may want to start by looking what is happening at DB side...you can very well look into DB locks, current sessions etc.
I have a webserver that is pegged and I've been able to isolate it to a particular website instance. I'd like to dig deeper and isolate the particular page/process that is causing the issue.. Any tips?
You can take a memory dump of the process and poke around with windbg.
There are posts on this issue from Tess Ferrandez blog. Just do as she say.
Which version of IIS are you using? Some of the higher ones allow for a separation of which process gets used to handle requests such as a worker process that you could isolate a bit more that way. I'd also suggest reading through the IIS logs to see what requests were being handled, how long they took, etc.
There are many different quirks to each IIS version. The really low ones just had a start/stop functionality, but the newer ones have really given administrators much more control and power, IMO.
You should try using a profiler to identify what is using up the most resources. I've used dotTrace Profiler, although that can be expensive if you're on a tight budget.
It allows you to see exactly what processes and method calls use of the most processing time of a request really well so you can isolate the most resource intensive operations.
You should really be able to use any profiler to do this, not just dotTrace. I just happen to only have experience with this one in particular.
Change your web garden setting to 10 or greater. Then watch your CPU and memory utilization on the web server.
Continue to increase the web garden setting until either the app is completely responsive with less than 5% average utilization OR you have actually maxed your web server's memory.
UPDATE
It's not about diagnosing, it's about properly configuring the IIS server. Web Gardens are one of the top misunderstood features of IIS. By increasing the available threads to handle new requests you remove the appearance of contention at the web server level and place it squarely where it belongs. In this case at your database. Instead of masking a problem it actually highlights exactly where the problem is.
This turned out to be a SQL problem (sql 2005). The solution was found by using SQL activity monitor to identify a suspended process with a Async_network_io wait type. We then ran SQL profiler to narrow it down to two massive queries which were returning an over abundance of results.