Posts

Showing posts from 2019

Improving ASP.NET Session State database performance by reducing blocking

On a recent consulting engagement, I was working with a client that had significant performance issues with their ASP.NET session state database. They had a combination of both large session state and a large number of concurrent sessions. They were regularly experiencing command timeouts on that database. In my investigation, curiously I found that a DELETE statement was the culprit. I tracked it to the DeleteExpiredSessions stored procedure. Looking at it, it seems tame enough: CREATE   PROCEDURE  DeleteExpiredSessions AS    DECLARE   @now   DATETIME    SET  @now  =   GETUTCDATE ()    DELETE  ASPState .. ASPStateTempSessions    WHERE  Expires  <  @now    RETURN  0 GO However, the problem is that as session size grows, each delete takes longer and as the number of sessions grows, this simple DELETE ends up causing substantial blocking. It was at the head of nearly every blocking chain. This proc is run every five minutes. There is no need for this proc to d

Main areas of great Azure Architecture

Image
The cloud has changed the way organizations solve their business challenges, and how applications and systems are designed. The role of a solution architect is not only to deliver business value through the functional requirements of the application, but to ensure the solution is designed in ways that are salable, resilient, efficient and secure. Solution architecture is concerned with the planning, design, implementation, and ongoing improvement of a technology system. The architecture of a system must balance and align the business requirements with the technical capabilities needed to execute those requirements. It includes an evaluation of risk, cost, and capability throughout the system and its components. Design a great Azure Architecture While there is no one-size-fits-all approach to designing an architecture, there are some universal concepts that will apply regardless of the architecture, technology, or cloud provider. While these are not all-inclusive, focusing on thes

Static code analysis- SonarQube open source Tool

Image
Introduction SonarQube is an open source product, produced by SonarSource SA, which consists in a set of static analyzers (for many languages), a data mart, and a portal that enables you to manage your technical debt. SonarSource and the community provide additional analyzers (free or commercial) that can be added to a SonarQube installation as plug-ins. SonarSource and Microsoft have been working to integrate SonarQube with MSBuild . SonarQube is an open-source platform developed by SonarSource for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs, code smells, and security vulnerabilities on 20+ programming languages. SonarQube offers reports on duplicated code, coding standards, unit tests, code coverage, code complexity, comments, bugs, and security vulnerabilities. SonarQube can record metrics history and provides evolution graphs. SonarQube includes support for the below programming languages  Java, C#, PHP, J

What is private bytes, virtual bytes, working set comes under App pool worker process?

Private Bytes  refer to the amount of memory that the process executable has  asked for  - not necessarily the amount it is  actually using . They are "private" because they (usually) exclude memory-mapped files (i.e. shared DLLs). But - here's the catch - they don't necessarily exclude memory  allocated by those files . There is no way to tell whether a change in private bytes was due to the executable itself, or due to a linked library. Private bytes are also  not  exclusively physical memory; they can be paged to disk or in the standby page list (i.e. no longer in use, but not paged yet either). Working Set  refers to the total  physical  memory (RAM) used by the process. However, unlike private bytes, this also includes memory-mapped files and various other resources, so it's an even less accurate measurement than the private bytes. This is the same value that gets reported in Task Manager's "Mem Usage" and has been the source of endless amo

Why we use ASP.NET?

As new invention and innovation are made in technologies. People grasp those technologies at a fast rate. People can make their work simple and sort with the help of technology. Microsoft has taken that opportunity by creating his own language name ASP.Net, ASP.Net is very secure, simple and reliable to use and it as simple to create a new web application from that. ASP.Net made the life simpler of business sector.ASP.NET can enable them to develop powerful apps, complex websites and deliver as per their business requirements..NET framework helps build inventory applications, booking system, dynamic websites, mobile apps, supply chain management solution, custom CRM system, and XML web services. It is a valuable programming tool that is ideal for programmers and developers to build dynamic and rich websites, web and mobile applications. It will be a particularly helpful solution for businesses that are seeking to transform in 2019. ASP.NET can enable them to develop powerful apps, c

How to store files gracefully

When building web application, one thing you may need to think about is how you plan to store user files. If you are building an application that requires users to upload or download files(images, documents, pdf's..etc.). file storage can be an important part of your application architecture. Where Should I Store Files When building web applications, you’ve got a few choices for where to store your files.  like Store user files in your database in a text column, or something similar Store user files directly on your web server Store user files in a file storage service like  Amazon S3 Out of the above choices, #3 is your best bet. Storing files in a database directly is not very performant. Databases are not optimized for  storing large blobs of content. Both retrieving and storing files from a database server is  incredibly slow and will tax all other database queries. Storing files locally on your web server is also not normally a good idea. A given web s