1

We are having high CPU issues on our CD servers while running Sitecore 9. The CPU on each server (Quad core 2.6GHz Intel Xeon) are nearly maxed out while the memory usage remains fine. We have load balancing and our traffic isn't exceptionally high. Over the course of several hours the CPU usage will gradually increase until it maxes out at 100%. We have the servers to cycle the w3wp.exe process when this happens, but obviously this is not ideal. Any known issues or tips on troubleshooting this? Common issues to look for? We are caching our renderings. I am not highly experienced with Sitecore, but have a technical background and can figure things out. Thanks!

  • 1
    I think You are going to need something like redgate tools and find what code is causing the issue. – Chris Auer Dec 4 '18 at 2:44
  • Hi Justin, welcome to Sitecore Stack Exchange. Sadly, I am not sure if this question is answerable. We're going to need to more information about your implementation, custom configs, what's enabled, modules in use, custom code, etc. Chris is right, you might need to run some profiling tools like RedGate or dotTrace to get an understanding of what the w3wp.exe process is doing. I believe in it's current state, this question is too-broad. – Pete Navarra Dec 4 '18 at 3:05
  • 2
    A simple thing you can always check is the log files to see if there are excessive exceptions being logged (located at /YourSitecoreFolder/Data/logs). Another thing you can use is the Sitecore Log Analyzer, which might point you to ERROR or WARN message trends around the times you're seeing CPU spikes: marketplace.sitecore.net/Modules/Sitecore_Log_Analyzer.aspx – Dan Sinclair Dec 4 '18 at 3:13
  • Get a memory dump of the process and analyze that using debug diag. Look at event queue table getting over 5k records. Is indexing backed up? – Gabbar Dec 5 '18 at 17:28
  • 1
    I've used debugdiag (microsoft.com/en-us/download/details.aspx?id=49924) in the past to help troubleshooting this. Redgate tools are a great resources as well. But your best resources might be sitecore logs to see what is going on during the spikes. For me, I had to make adjustments to my indexing strategies. – Mikeyp Dec 5 '18 at 21:19
5

You can try the following to identify your issues:

  • Enable Sitecore Pipeline Profiling by setting

    <setting name="Pipelines.Profiling.Enabled" set:value="true" />
    <setting name="Pipelines.Profiling.MeasureCpuTime" set:value="false" />  
    

    and browsing to /sitecore/admin/pipelines.aspx

  • Profile a Sitecore Page by going into debug mode (add these parameters to your url ?sc_debug=1&sc_prof=1&sc_trace=1)

  • Use Visual Studio Profiler to identify your cpu issues. (Debug>Profiler>Performance Profiler)

There is also a very good blog post by Jeremy Davis to learn more on profiling. https://jermdavis.wordpress.com/2017/10/02/measure-if-you-want-to-go-faster/

| improve this answer | |

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