New Orchard CMS site has very poor performance

Topics: Customizing Orchard, General, Installing Orchard, Troubleshooting
Dec 28, 2015 at 3:16 PM
We just finished moving our website from a home-grown CMS into Orchard. Performance seemed to be pretty good until we deployed to the production server (which is in the DMZ). Now our site is unbearably slow. We had to roll back to the old site.

I know this is very general, but what are some areas to look at when it comes to performance of an Orchard site? I have compared IIS between production and QA servers and not seen any noticeable differences, but I may have overlooked something. Any help is much appreciated!
Dec 28, 2015 at 4:05 PM
  • Are all pages slow, or just certain ones?
  • Anything in the log files? For example, if a lot of exceptions are being thrown, that may degrade performance.
  • Make sure the database is in the same region (I once accidentally connected my site to a database on the other side of the continent; didn't work out so well).
  • Compare the memoy being used with the available memory on the machine.
  • Unless you're in a web farm, enable the second level cache (SysCache).
  • Enable the output cache feature.
Dec 28, 2015 at 4:25 PM
Thanks for the reply! It seems to be on most of the pages. I will check the logs for any exceptions. The database and site are hosted in the same physical location.

I enabled SysCache and memcache but I can't find any documentation on setting it up. I get a page on the admin site under settings for cache with options on duration and grace period, but we cannot find any docs at all to help us set it up.

When you say output cache, are you referring to setting it up inside of IIS?
Dec 28, 2015 at 4:36 PM
SysCache doesn't require any configuration, but if you use Memcached you'll have to setup the cache service. I don't know of any documentation, but if you look at the module's source code you should be able to see pretty quickly what web.config (if any) settings need to be configured.

By OutputCache I was referring to the OutputCache feature part of Orchard (on the Modules screen). You have it enabled already, because it's that feature that provides the configuration page with grace time and all. This blog post explains how it works and some of its settings:
Dec 28, 2015 at 5:39 PM
Edited Dec 28, 2015 at 5:43 PM
Before turning SysCache on I'd perform some database profiling first. Missing indices, N+1 issues etc. is what I usually find killing site performance. Please also compare QA and production database servers - slight differences here can make a huge difference performance-wise.

In addition, please also check what transaction isolation level were you using within the custom CMS. Orchard uses ReadCommitted by default, but this can be changed via Sites.config file. If you don't want to change that, setting up snapshot isolation on is an easy way to speed things up transparently:

Dec 28, 2015 at 5:46 PM
Simply setting the duration and grace period to 5000 and 2000 respectively has helped to speed up the site considerably. I still want to get the home page working better. Like the example in the ideliverable link above, our home page has several projections and widgets being loaded and it's still taking several seconds to load.

I'm interested in the snapshot isolation as well. I may get that set up on the QA server and test it out.