CPU usage spike when using dashboard / apps

Chris Tusciuk asked on September 8, 2014 19:42

Whenever I load up /admin or anything having to do with the dashboard and apps, my CPU usage spikes to 99-100%. For example, if I hit the /admin URL, it spikes to 50% usage for about three seconds, and then drops back down. Then if I go to the Event Log app, it jumps up to 100% usage for about 15 painful seconds, and finally drops back down. Otherwise the apps and content work as expected

The greedy processes tend to be the "IIS Worker Process", "Microsoft Common Language Runtime native compiler", and ".NET Runtime Optimization Service (32 bit)".

This site was just upgraded (from 6.0 to 8.0 to 8.0.18) along with a companion staging instance, and the staging instance doesn't have this problem. The web servers are identically configured AWS EC2 instances running Windows Server 2012.

Recent Answers

Brenden Kehren answered on September 8, 2014 22:05

Are you using a website application or a project for you website? If using an application until each of the modules have been accessed, you will have that initial compile delay and CPU spike, simply because that's how an application is designed to run. Is this the case for you?

0 votesVote for this answer Mark as a Correct answer

Bryan Drenner answered on September 8, 2014 23:21

It's me. I accidentally posted the above question under my boss' account.

Anyway, it is a web application project. The strange thing is that we don't experience the severe spikes on our development, QA testing, or staging environments. Only the production environment is having this issue. It practically takes the site down. However, Production is essentially the same machine and configuration as Staging.

Very fishy, though it may not have anything to do with Kentico.

0 votesVote for this answer Mark as a Correct answer

Charles Matvchuk answered on September 9, 2014 04:51

Bryan, if you can, Export your complete site. Then backup your database and site. Do a fresh install and reimport yoursite (make sure you updated to the proper service pack). Then check if the problem still exists. I had the same issue and when I followed these steps the fresh, updated, imported installation runs great.

0 votesVote for this answer Mark as a Correct answer

Bryan Drenner answered on September 9, 2014 17:31

Thanks, Charles. I'll give that a try.

Brenden, I'm starting to think our problem has more to do with differences in load between the Staging and Production instances. Perhaps the CPU spike is to be expected, as you suggested. The big difference is that Staging's CMS is used more thoroughly, so its modules have already been compiled, and it's not being hit by traffic from the general public. Production is constantly receiving traffic, and the yet its CMS is rarely accessed directly.

Anyway, I'm glad we're not expecting heavy traffic anytime soon. Our sites are clearly not ready for it.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 9, 2014 20:32

Good to hear Bryan.

@Charles, I've done the same and had the same results you stated. Bad part is I don't believe many partners or developers know or follow Kentico best practices and would end up with a larger problem than what it would be worth to perform the export/import. I setup all my client sites using best practice simply because it's what I taught myself and it also puts the client in a better place when upgrading or applying hot fixes or adding other features.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.