Optimizing performance of a three tier application

Optimizing of a system or an application is never an easy task. Optimization is done mostly to increase the availability of the application and reduce the amount of resources that are used by the operating system.

It is common that more than one element of the system is changed or tuned during the optimization activities but the decision which subsystems or layers to optimize should always be based on observations where the bottlenecks of the system are.

The article lists and briefly describes a set of hints and good practices one should consider when attempting to deal with the challenging task of software optimization.

Database

Database optimization has always been a big topic. Slow data access is quite often a reason for poor application performance. The first thing one should always do when dealing with such a problem is to monitor the behavior of the system. This will almost always provide a good hint as to where the problem may be located. There are several most important aspects that are looked at when trying to squeeze more power out of the database:
• Schema optimization. It is worth analyzing whether it may pay off to do some database denormalization. Some parts of the database may be used in a huge amount of queries and gain from duplicating or parting some pieces of information may overcome the costs of increased data maintenance. Once can also try to see if it is possible to reduce some many-to-many data relations. It may pay off to add some indexes to the schema.
• Queries optimization. There is a set of rules that should be applied to database queries to make them faster to execute. Constructing the queries to minimize the number of records that are joined together may help to reduce query execution time.
• ORM optimization. Using an ORM software to manage the database is a very comfortable approach. However, it is not always the fastest one. Forcing an ORM to build a complicated query may result in very poor performance. It may be easier to retrieve some special data directly.

Back-end software

When the investigation leads to a conclusion that the low performance problem is located in the backend software rather in the database tier, one should start with checking which elements cause the biggest problem. There is quite a lot of profiling software on the market. Something appropriate for the specific software should be used to check which functions are the blockers.

It may turn out that some algorithms need to be revised and this way one can improve the overall performance of the system. It is worth trying if the layer responsible for data presentation does not use too much resources for rendering.

Logging and tracing

One of the aspects that is worth mentioning separately is logging and tracing mechanisms. Tracing what happens in the system is essential in the development phase, but it has to be remembered that it consumes a lot of extra CPU. Turning off excessive logging usually significantly improves the overall performance. Those features should only be switched on when there is a need for diagnosing a certain problem.

Final thoughts

After the analysis and optimization of the software it may turn out that it is not enough. There are two basic ways of dealing with this problem. The first one is buying new hardware so that the application may run faster. The second one is to use different technologies that are more suited for the performance demands. Changing the presentation layer can make much of a difference. It may be worth to turn an HTML based application into a RIA. The rendering would then be performed by the client workstations, thus decreasing the load of the system.
Verax System website

Share:


Tags: Application optimizing, ORM system, System optimizing, Verax Systems


About Verax Systems

View Website

Artur Nowakowski
Press Contact, Verax Systems
Verax Systems
Wagrowska 6
Poznan
61-369