Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're implementing a .NET DXA based solution for a client, and part of the scope of work will be to conduct load testing to bring the site in line with a performance budget.

Our initial investigations using a simple single JMeter test (50 users ramping up over 5 seconds) is that the website response times go through the floor and CPU maxes out as soon as we put any load on it. We thought this may just be limited to our implementation, but having testing against a vanilla DXA solution the problem persists.

Instrumentation indicates that the performance bottleneck occurs when resolving links, and that this doesn't seem to change regardless of whether we have object caching enabled.

When we switch on asp.net output caching for the PageController we do find that we can alleviate the issue, but once the cache expires it seems to cascade again.

The final site will be behind Akamai, which combined with page caching will hopefully help, but it would be great if there's a better approach as it feels like we'd just be masking an underlying issue.

Has anybody else experienced this issue, and if so do you have any pointers?

Thanks in advance,

Tom

screenshot of graph

share|improve this question
    
Do you have SDL cache enabled in the storage configuration? – Chris Morgan Mar 2 at 15:31
    
Hi guys, thanks for the help - it turns out that we had a typo in the object caching configuration (doh!); everything is working much better now! – tomjgroves Mar 2 at 16:19
1  
Nice to hear. Indeed, with object caching set up correctly you'll get very fast response times as Nuno noted awhile back (note queries are now cached as well). It'd be great to see the comparison results with caching working--could you post the follow-up graph if you have time? – Alvin Reyes Mar 3 at 8:15
2  
@AlvinReyes here you go - this is with object caching and .NET output caching. Quite the difference! Thanks again to everybody for the prompt and useful advice :-) – tomjgroves Mar 3 at 9:07
up vote 8 down vote accepted

There are various optimization and checks you can do for performance in DXA

  • Enable DD4T caching.
  • <add key="CacheSettings_CallBackInterval" value="30" /> <add key="DD4T.CacheSettings.Page" value="3600" /> <add key="DD4T.CacheSettings.Component" value="3600" />
  • Outputcaching as you mentioned.
  • Make sure your binaries css, images, and js are getting cached(max age) in browser, it could be a big performance impact as each binaries request also go to your code which do some validation before serving the binary. we recently faced issue because of this.
  • Make your code CDN ready with cache-control:public for the binaries, it will help when you get the code at production. CDN/Akamai is very much required on production.
share|improve this answer
    
Cheers Raj; as I mentioned we had an issue with a typo around object caching, but this was very helpful indeed. – tomjgroves Mar 2 at 16:19
    
Great, object cache @chris already mentioned in the comment so i skipped that :). Object cache, its very basic stuff but above steps only from my experience in DXA. – Raj Kumar Mar 2 at 16:29
    
@RajKumar - In your experience do you have any pointers or best practices for setting these Cache-Control headers for binaries for DXA/DD4T? – Ryan Durkin Mar 24 at 12:27

You enable Tridion caching by updating your Storage Configuration, as shown below

<ObjectCache Enabled="true">
  <Policy Type="LRU" Class="com.tridion.cache.LRUPolicy">
    <Param Name="MemSize" Value="16mb"/>
  </Policy>
  <Features>
    <Feature Type="DependencyTracker" Class="com.tridion.cache.DependencyTracker"/>
  </Features>
</ObjectCache>

Then for each item you would like to store in cache, you should also set

<Item typeMapping="Page" cached="true" storageId="defaultFile"/>

You may also wish to consider MemSize. You can see if Items are being removed from cache due to memory limits by enabling logging

You can read more on Tridion caching here: http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-5BAC30F0-A91F-424F-8D08-093B863B65EF

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.