Digital Edition

SYS-CON.TV
Database Access Patterns Gone Wild
Inside Telerik, SharePoint and ASP.NET

Telerik Controls are great for building modern, rich clients, and web applications often seen at the enterprise level. I just worked with a company that uses these controls in their soon-to-be-released customer-facing SharePoint portal. They ran a small load test that showed that the response times were ranging between 150ms and 1.3s for most of their pages - which is acceptable. Still, they wanted my opinion on the data - so they shared a dynaTrace session with me. I observed a number of problems prior to the production deployment:

  • "Unbalanced" load balancer will bring a server-cluster down
  • Data driven performance problems will kill a database server
  • Wasteful database connection handling will impact app server performance

Check out the following screenshots that explain my steps and findings while I analyzed their performance data. I hope this is also a good guide for any of your own work you do on Telerik, SharePoint or any other frameworks. It is important to understand what happens underneath the hood - just because it works on a developer's machine or in a small scale load test, doesn't mean it will scale in production.

Step #1: Analyzing Transaction Flow
The transaction flow visualizes the flow of all requests end-to-end through the system. Not only is it interesting to see where my performance hotspots are but it is also very interesting to see how load is distributed, how these tiers are communicating with each other and how they interact with external systems such as the database.

Transaction Flow highlights load balancing, failures and bad database access patterns

Key Takeaways

  • Operations: Make sure your load balancers are correctly configured. You may also want to add a load balancer between your Web Server and App Server as currently there is a 1:1 relationship.
  • Developers: Analyze the performance hotspots and the database access pattern of your application. It should not be necessary to execute that many SQL statements per transaction.
  • Database Admins: Check with engineering on which database statements they execute a lot and which of them can be optimized on the database server.

Step #2: Analyze Database Access Pattern
The Database view shows me which SQL Statements are executed. It is especially interesting for me to identify SQL Statements that are executed multiple times per single request and whether these statements are then prepared or not. If the same statement is executed more than 5 times I wonder if this access pattern can't be optimized, e.g., through a different SELECT, through a stored procedure or by caching the result in the app.

Database view shows which SQL statements are called up to 90x on average per request. Most of them are not prepared

Key Takeaways

  • Operations: A good metric to monitor is the number of SQL Statements executed per transaction as well as the same SQL executed per transaction. As things like this can always slip into production it makes sense to monitor this for every transaction.
  • Developers: Optimize your database access. If these statements have to be executed that many times, make sure these statements get prepared. Otherwise think about caching this data in the app instead of requesting it all over again.

For the rest of the steps, and further insight, click here for the full article.

About Andreas Grabner
Andreas Grabner has been helping companies improve their application performance for 15+ years. He is a regular contributor within Web Performance and DevOps communities and a prolific speaker at user groups and conferences around the world. Reach him at @grabnerandi

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

It would be good if you could put high resolution pictures.




ADS BY GOOGLE
Subscribe to the World's Most Powerful Newsletters

ADS BY GOOGLE

In his session at 20th Cloud Expo, Mike Johnston, an infrastructure engineer at Supergiant.io, will ...
Modern software design has fundamentally changed how we manage applications, causing many to turn to...
Is advanced scheduling in Kubernetes achievable?Yes, however, how do you properly accommodate every ...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with exp...
"There is a huge interest in Kubernetes. People are now starting to use Kubernetes and implement it,...
Today most companies are adopting or evaluating container technology - Docker in particular - to spe...
Skeuomorphism usually means retaining existing design cues in something new that doesn’t actually ne...
Using serverless computing has a number of obvious benefits over traditional application infrastruct...
At its core DevOps is all about collaboration. The lines of communication must be opened and it take...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with exp...
As you know, enterprise IT conversation over the past year have often centered upon the open-source ...
When a company wants to develop an application, it must worry about many aspects: selecting the infr...
DevOps is under attack because developers don’t want to mess with infrastructure. They will happily ...
In an age of borderless networks, security for the cloud and security for the corporate network can ...
Kubernetes is an open source system for automating deployment, scaling, and management of containeri...
Containers and Kubernetes allow for code portability across on-premise VMs, bare metal, or multiple ...
With the rise of Docker, Kubernetes, and other container technologies, the growth of microservices h...
DevOps has long focused on reinventing the SDLC (e.g. with CI/CD, ARA, pipeline automation etc.), wh...
Kubernetes is a new and revolutionary open-sourced system for managing containers across multiple ho...
Isomorphic Software is the global leader in high-end, web-based business applications. We develop, m...