Performance live server

Topics: General, Troubleshooting
Nov 9, 2011 at 11:53 AM
Edited Nov 9, 2011 at 12:03 PM

After a few weeks/months work i finished my website and published it to our live server. The strange thing is that the performance is very bad compared to the develop machine.

I have set debug to false in web.config en compiled everything on release mode.

the only difference is that the server is connecting to an other sqlserver but i connected in a virtual server network. So the latency is very minimal.

Do you guys have some advice because we want to bring this website up and available for everyone.

maybe an other problem has something to do with it? http://orcharddbcache.codeplex.com/discussions/278827  

Nov 9, 2011 at 12:43 PM

Is your live server dedicated, and how do its specs compare to your development machine? Is it in full or medium trust?

A live server in a shared hosting environment has its CPU time split amongst many websites and so will often be slower than your development environment.

Even if SQL latency is minimal, Orchard can run a lot of queries for a given request, and that latency could add up to something significant.

If you have full rights on your server you might consider running some SQL profiling to see what's going on and apply approriate indicies to the database. This will also show you if any queries are returning a lot of records and might need paging.

Check debug and error logs to see if anything screwy is going on.

You might want to deploy the Cache module as a quick fix to get static pages serving quickly until you can figure out some better optimisations.

Nov 9, 2011 at 12:54 PM

thanks for your tips. It's a very fast virtual server with a lot memory and other websites run smooth on it. We have full rights so i can change everything if necessary.

I use paging everywhere it's needed and the server must be fasten then my development machine.

I can't use the cache module because for almost every page the user must be authenticated.

So i'm a little bit stuck here. They only problem i see in the log is the one i described here: http://orcharddbcache.codeplex.com/discussions/278827

Nov 9, 2011 at 1:52 PM

I strongly suspect it's the SQL server latency (impossible to say of course without profiling). It's possible that you have 3rd party modules or even core Orchard modules that aren't paging correctly. Even then, Orchard runs a lot of separate queries, particularly if you're querying lists of content.

You'll be interested in Sebastien's upcoming version of Cache, it implements "donut caching" which means you can have non-cached regions of the page.

Nov 9, 2011 at 1:55 PM

that sound indeed very interesting!

Coordinator
Nov 9, 2011 at 8:45 PM

Profiling seems to be in order here.

From: randompete [email removed]
Sent: Wednesday, November 09, 2011 6:53 AM
To: Bertrand Le Roy
Subject: Re: Performance live server [orchard:278839]

From: randompete

I strongly suspect it's the SQL server latency (impossible to say of course without profiling). It's possible that you have 3rd party modules or even core Orchard modules that aren't paging correctly. Even then, Orchard runs a lot of separate queries, particularly if you're querying lists of content.

You'll be interested in Sebastien's upcoming version of Cache, it implements "donut caching" which means you can have non-cached regions of the page.

Nov 10, 2011 at 7:49 AM

Ok i tested everything and even when i connect with my development iis directly to the live database the website is way faster on my development machine the the live server. So beginning to think this has something to do with IIS configuration or something.

Is it possible that Orchard continuous detects changes on the live server and always recompiles everything? how can i check this and how can i stop this? What can cause this?

Coordinator
Nov 10, 2011 at 7:51 AM

You'll want to start observing a few perf counters. If that doesn't give you a good insight, profiling is the next step.

Nov 10, 2011 at 8:35 AM
Edited Nov 10, 2011 at 1:47 PM

ok thanks you guys for your help. When i disable the database cache module on my development machine the website is as slow as it is on the live server. I noticed the following errors on my live server which i don't receive on my development machine:

2011-11-10 09:53:22,427 [21] Orchard.Data.SessionConfigurationCache - Error storing new NHibernate cache configuration: Type 'Orchard.Contrib.Modules.NHibSecondLevelCache.Data.Providers.AbstractDataServicesProvider+OrchardLoadEventListener' in Assembly 'App_Web_kffu5yao, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
2011-11-10 09:53:27,699 [21] Orchard.Data.SessionConfigurationCache - Error reading the cached NHibernate configuration: End of Stream encountered before parsing was completed.
2011-11-10 09:53:29,275 [21] Orchard.Data.SessionConfigurationCache - Error storing new NHibernate cache configuration: Type 'Orchard.Contrib.Modules.NHibSecondLevelCache.Data.Providers.AbstractDataServicesProvider+OrchardLoadEventListener' in Assembly 'App_Web_kffu5yao, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as seria

So there must be something wrong with the permissions for the caching module. any ideas?