Speed up your site

When your site relies on a lot of external API’s, has a lot of JavaScript, images, Redis cache… and which site doesn’t have most of these things these days, the loading of a page might go slower than you would like, even with extensive caching.

There are a few things that I found can speed up your site considerably, all having to do with the amount of threads and connections.

Increase the maximum amount of connections that can be made simultaneously in your web.config, default is 2 if I remember correctly.

add address=”*” maxconnection=”48″

Optimize the free threads that should be available in your web.config.

httpRuntime minFreeThreads=”352″ minLocalRequestFreeThreads=”304″ targetFramework=”4.6.1″ requestValidationMode=”2.0″ maxRequestLength=”1048576″ executionTimeout=”900″

Optimize the worker and iocp threads, which should be done in the global asax.

ThreadPool.SetMinThreads(workerThreads, iocpThreads);
ThreadPool.SetMaxThreads(workerThreads, iocpThreads);

The settings vary with the amount of CPU’s, but these worked very well for sites hosted in Azure.

You can read more about it here. The complete solution is in a gist.

5 thoughts on “Speed up your site

  1. Love your posts; they are consistently helping our team look into every possible way to improve performance. We are on DXP and wondering if this is still valid for improving speed or if any of these things have been implemented by default for DXP? Thanks again.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s