Posts

Showing posts with the label Performance Engineering

Common Performance Problems in Application Server - Concurrency

Code Deadlock "By drilling into each Code Deadlock event, operations were able to analyze the various thread contentions and locate the root cause of the issue. The root cause of the slowdown turned out to be an application cache which wasn’t thread-safe. If you look at the screenshot below, showing the final execution of the threads in deadlock accessing the cache, you can see that one thread was trying to remove an item, another was trying to get an item, and the last thread was trying to put an item. 3 threads were trying to do a put, get and remove at the same time! This caused a deadlock to occur on cache access, thus causing the related JVM to hang until those threads were released via a restart." Code Deadlock Waiting Threads “I simply take the CPU Time and the Method Execution Time of a particular method, component or framework. Here is an explanation of these two values: §   CPU Time: Is the time spent on the CPU by the executed code §   Execution Time

Common Java Performance Problems - Memory

Stop the   world   (STW) garbage collection "The only remaining problem with the latest result above is the long Old generation (Full) GC pauses of about 8 seconds on average. These pauses have been made rare by proper generation tuning but when they occur they still are a nuisance to users because during their duration the JVM is not executing worker threads (stop-the-world GC). In our case, these 8 seconds are caused by an old and slow test server and could be up to a factor of 3 faster on modern hardware. On the other hand, today’s applications typically also use larger heaps than 1 GB and have larger amounts of live objects in the heap than in this example. Web applications nowadays work with heaps up to 64 GB and (at least temporarily) need half of that for their live objects. In such cases, 8 seconds is short for Old generation pauses. They can easily come close to one minute which is totally unacceptable for an interactive web application" Tuning Garbage Collec

Common Database Performance Problems in Web Application

Most online applications of scale are backed by some form of relational or non-relational database and it can be easily said that backbone of any modern web application is its data.  As a result, the database is critical to the functionality and performance of the application and should not come as a surprise that it is the biggest source of performance issues for web applications.  The problems can occur at many places, the application code might be accessing the database inefficiently, database connection issues or database itself might need tuning.  In this blog, I will be focusing mainly on database performance issues that can occur on application server (business logic) side.  The web application can be JAVA based, PHP based or ASP.NET based but the core of the issue would be same. Application code making excessive database queries This performance anti pattern ultimately results in slow response time as application load increases.  The problem is hard to detect under low

ASP.NET Application - What to Measure for Performance?

ASP.NET Application – What to Measure for Performance? Throughput »         What are number of requests getting executed per second? »         How many numbers of requests waiting to be executed? »         How many numbers of requests being rejected? ASP.NET Applications \ Requests / sec Web Service \ ISAPI Extension Requests / sec ASP.NET \ Requests Current ASP.NET Applications \ Requests Executing ASP.NET Applications \ Requests Timed Out Cost of Throughput »         What is the cost of throughput in term of processor utilization, memory, disk I/O and network utilization? »         What is the cost of hardware needed to achieve given level of performance? Processor Processor \ % Processor Time Processor \ % Privileged Time Processor \ % Interrupt Time System \ Processor Queue Length System \ Context Switches / sec Memory Memory \ Available Mbytes Memory \ Page Rea

ASP.NET Application Performance Considerations

ASP.NET Application Performance Considerations Threading Efficiency Thread pool tuning, Burst load, Creation of thread on per request, Blocking threads, Asynchronous calls Pool Resources Same connection string, Dispose or Close Call, Caching of pool resources, Obtain resource and release time ASP.NET Pages Page timeout, Page Size, Buffering, Page.IsPostBack, Partition Page Content, Expensive loops, Sever.Transfer instead of Response.Redirect Server Controls View State in Server Control, Deep hierarchies of Server Control Data Binding Page.DataBind, DataBinder.Eval Caching Dynamic data and static data, Memory limit, Caching right data, Refreshing cache, Cache API, Output Caching, Partial Page or Fragment Caching, Cache location, Kernel caching State Management InProc, StateServer,  SQL Server View State