I present below various Tips & Techniques (not in any particular order) for optimization of a typical DotNetNuke installation.I learned these while using DNN over time, while I encountered some of them while browsing over web.
A typical DNN install requires considerable server resources, and creates significant traffic between the database & web server. These techniques aim to reduce both of these where-ever possible, along with some other optimizations. Some of these may not apply to you, and I advise you to exert discretion in deciding which of these work best for you.
DNN Optimization:
- Host Settings
- Set the “Performance Setting” to “Heavy Caching”.
- Depending upon Hosting resources, set the “Compression Setting” to “Deflate Compression” or “GZip Compression”.
- Depending upon Hosting resources, enable “Whitespace filter” (not of much use, if you have also enabled compression).
- Disable “Users Online” for Installations on which “Users Online” module is NOT used.
- Set the “Scheduler Mode” to “Timer Method”. “Request Mode” causes the Scheduler to be invoked on every request to a page of your installation.
- On sites where Logging is NOT mission critical, enable “Event Log Buffer”, so that log entries are buffered before being flushed.
- On sites where the Site files do NOT update frequently, disable “Auto-sync filesystem”.
- Uncheck “Enable Ajax” on portals that are just informative, and do NOT involve management tasks.
- Admin Settings
- On DNN 5 portals, unselect “Enable Skin Widgets” if they are not being used to prevent redundant skin file downloads.
- Log Settings
Disable all Logs NOT required on an installation. In particular,- Disable “Application Start”.
- Disable “Application End”.
- You might also want to disable others like “Scheduler Started”, “Scheduler Event Started” etc. depending upon if they are not much useful to you. However, “Sceduler event Failure” should not be disabled to enable debugging of any scheduler issues.
- Schedule Settings
Disable or customize all Schdules NOT required on an installation. In particular,- Configure “DotNetNuke.Services.Scheduling.PurgeScheduleHistory, DOTNETNUKE” to run every 5 days (or whatever fits best to your portal depending upon how much Schedule Log your portal generates).
- Configure “DotNetNuke.Services.Search.SearchEngineScheduler, DOTNETNUKE” to run every 5 days and retry after 1 day (again depending upon what fits best to your portal. There is no one size fits all approach here).
- Javascript & CSS Optimization
- Manually optimize all css & js files to remove redundant white-space (or use a free or paid DNN module e.g. Page Blaster to manage this task for you).
- Zero out portal.css (if you dont use it, or better still, delete it).
- Check ~/portals/_default/default.css for any styles not being used on your portal.
- Try to use any other menu except SolPart Menu.
- Try NOT to use table based skins (improves the perceived rendering of your page).
- Cookies: Set the appropriate value for Persistent & Session cookies in web.config.
- Compilation: If you are compiling DotNetNuke or any Extension from source, make sure that you compile the project in Release mode. Moreover, make sure you have debug=”false” in web.config for your production sites.
If you have any other suggestions, or otherwise want to discuss any of the above points, feel free to use the comment form below.
UPDATE (Feb 5, 2015):
I am very excited to announce that we have launched the Caching Provider Module for DNN that can help you greatly improve your DNN site’s performance. Go, check it out here:
http://store.dnnsoftware.com/home/product-details/caching-provider-module-for-dnn/r/13F08F65926C49689BFE
The module provides multiple providers for Page and Viewstate caching that combined can greatly improve the page load time of your DNN page as well as reduce the page’s size thus enabling lightning page load times.
1) Set the appropriate value for Persistent & Session cookies in web.config.
HOST SETTINGS
————-
2) Set the “Performance Setting” to “Heavy Caching”
3) Depending upon Hosting resources, set the “Compression Setting” to “Deflate Compression” or “GZip Compression”
4) Depending upon Hosting resources, enable “Whitespace filter”.
5) Disable “Users Online” for Installations on which “Users Online” module is NOT used.
6) Set the “Scheduler Mode” to “Timer Method”.
7) On sites where Logging is NOT mission critical, enable “Event Log Buffer”, so that log entries are buffered before being flushed.
8) On sites where the Site files do NOT update frequently, disable “Auto-sync filesystem”.
9) Uncheck “Enable Ajax” on portals that are just informative, and do NOT involve management tasks.
ADMIN SETTINGS
————–
9) On DNN 5 portals, unselect “Enable Skin Widgets” if they are Not being used to prevent redundant skin file downloads.
LOG SETTINGS
—————–
Disable all Logs NOT required on an installation. In particular,
9) Disable “Application Start”
10) Disable “Application End”
SCHEDULE SETTINGS
—————–
Disable or customize all Schdules NOT required on an installation. In particular,
11) Configure “DotNetNuke.Services.Scheduling.PurgeScheduleHistory, DOTNETNUKE” to run every 5 days.
12) Configure “DotNetNuke.Services.Search.SearchEngineScheduler, DOTNETNUKE” to run every 5 days and retry after 1 day.
JAVASCRIPT & CSS OPTIMIZATION
—————————–
13) Manually optimize all css & js files to remove redundant white-space.
14) Zero out portal.css.
15) Check ~/portals/_default/default.css
16) Remove whitespace in default.aspx and remove html comments in DNN.
17) Try to use any other menu except SolPart Menu.
18) Try NOT to use table based skins.
Thanks for this. Worked great… I can see big difference now!
Great tips! Thanks for sharing Rahul.
I know that DNN can not be compiled, only the modules can be compiled, I´m rigth? I´m working with 5.X versions. I tried to precompile all the DNN site and I can not see the Labels, it seem that there is a Resources problem, can you see that?
Regards
Hey there! Do you know if they make any plugins to safeguard against hackers?
I’m kinda paranoid about losing everything I’ve worked hard on. Any tips?
Well Epifania, depending upon your use case, you might be able to find a plugin on DNN store:
https://store.dnnsoftware.com/home/product-list/packagetypeid/2
However security would be a sum of your server configuration, DNN version and configuration and all modules and themes combined. The chain would be as strong as its weakest link. So you would need to ensure you are using tried and tested third party modules / themes, and you are following all usual recommendations (e.g. CSF policies etc) to prevent common exploits like CSRF etc.