Knowledge Essentials - 3Essentials Hosting

DNN memory consumption

Article ID: 2229

 Back to Search

DNN's memory usage is a common topic in support requests and DNN related forums.  There are many things within the DNN application platform that can contribute to DNN's memory usage, and several optimizations will leave you weighing the balance between performance vs resource consumption. 

The following discussion is meant to provide you some ideas about how you can reduce memory consumption of a DNN installation, or at least understand how some performance optimizations you may have made may increase your DNN installations memory footprint. 

The DNN version itself will have variations depending on development platform, core modules, default performance tuning options and various developement related considerations.  So the base memory footprint itself will potentially vary just based on the DNN version you're running.

DNN configuration and performance optimizations...  there are multiple performance optimization related settings like caching, and caching type, that will directly impact memory usage, and conversely performance/load times.  Basic concept here being, if you cache content that's stored into the database into the application's memory (apppool), then when the next visitor requests the same information, the app doesn't have to retrieve it from the database, it can serve it from the cache... that's significantly faster performance.  However, the more you cache, the more memory you use.  So tuning these aspects affect performance vs memory consumption.  

For example, go into your DNN installations Host Settings > Advanced Settings > Performance settings, and you'll find options there for Module Caching Method (memory or disk) and Cache Performce (ranging from low to heavy).    The combination of these settings will impact performance and resource consumption. 

Modules/extensions...  

  • possibly how many modules are installed within the DNN installation may increase memory usage, even if you're not using the module... does .Net load those modules assemblies into memory whether the module is activley used within the site.. i.e., if you have a 3rd party document management module that you obtained and installed ina  DNN installation, but then decided not to activley use it in your site... are the libraries for that module still loaded within the process space, or is .Net and DNN smart enough to say "don't load those libraries because the module isn't actively used wtihin this site?"  According to the documentation we find, no.  Modules/extensions you have installed on your DNN installation that aren't being used, are still loading assemblies in the process space, consuming memory resources.  
  • the modules themselves are code, and as such will consume memory resource, not only for core functionality, but they are also completely capable of performing their own caching in memory for core module functions or performance optimization, and as a result, they can directly influence memory consumption.  How much? depends on the module.  One module may use almost no memory, then next may use a ton, and may cache a ton.

So a few simple items we come away with are:

  1. Uninstall any unused modules. This will remove unnecessary assemblies from the /bin and improve startup performance as well as making more memory available for caching. If your site is running 5.0 or higher, go to Host->Module definitions - if the "In use" column says "No" (rather than "Yes") consider deleting the module. If the "In use" column says "Yes" but you are surprised by your usage, the "Yes" text is a hyperlink that will allow you to determine where instances are installed.  Alternatively the dashboard module can be used to see this data.
  2. Empty the recycle bin - log in as a host and go to admin->recycle bin and delete any pages/modules.
  3. Comment out any unused module or page caching providers in web.config. Whenever a module or page is updated every caching provider is told to remove an item from the cache, even if the provider may not currently be in use.
  4. In the DNN host  settings > performance area, lower the caching options downward from heavy towards low.  

Be aware, while these options above will lower the memory usage on your site, they will also slow the speed.   This is the trade off, resource consumption vs performance. 

Beyond that, it's time to dig into DNN related performance tuning documentation to educate yourself on the available options, and potentially perform some testing/experienting with various configuration options and their impact to memory consumption.  It's also worthwhile to review the modules you have on your site and understand their memory usage and caching options... for that information, look to the module vendors documentation.   
 
The following are some references we've found generally helpful in this endeavor:
 
Downloads Associated With This Article
No downloads are currently associated with this article.