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.
system.net
connectionManagement
add address=”*” maxconnection=”48″
connectionManagement
system.net
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.
Great Tip! Will this speed up Episerver Backend UI where there is 900 xhr in CMS admin? have you tried it?
LikeLike
Haven’t look at that , but it should, as it optimizes the handling of threads all over
LikeLike
Good one! In relation to this and performance with HTTP services in general it’s also super important to be able to control HttpClient lifetime and usage which is often overlooked.
LikeLike
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.
LikeLike
Hi Chaz, I am glad they are helpful. It is still valid methinks, but I don’t think it has been implemented by default for DXP
LikeLike