High CPU from Distributed Query Cache??

  • Ok, this is a weird one so bear with me.

    We have some load balanced application servers that every once a while one of them (not always the same one) will see a CPU spike. It will normally double from it's normal baseline of around of 35% Load. In of itself a server running at 70% CPU isn't the end of the world but it is interesting. My predecessor had setup a job to run manually when this happen to bring the load back down. So of course I'm like let's check out this magic...turns out it's more of a sledgehammer. All the job does is run "DBCC FREESYSTEMCACHE ('ALL') WITH MARK_IN_USE_FOR_REMOVAL". So first thing I think of is there has to be a way of finding the underlying issue.

    I start looking through DMV's to look for any potential bad cached plans but I just couldn't find any issues. After some further testing and a few dozen head scratchers I admit I took a blind shot and tried DBCC FREESESSIONCACHE and sure enough CPU load came back down to normal almost instantly. This confused me more because there are no linked servers attached to those servers and I'm pretty sure no one is using OPENROWSET or OPENDATASOURCE queries against them. Whenever I look at any queries I'd say about 95% of then are LINQ statements (don't like them either but that's another story).

    Next time it happened I just let it go and observed it. Didn't noticed any memory pressure or high disk I/O. It took a few hours but eventually things settled back down. In the end maybe it's nothing to worry about but it's one of those things that is bugging me.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Sorry folks, just realized that I actually didn't ask a question.

    Any ideas what else I can do to troubleshoot this issue? There seems to be so little documentation around FREESESSIONCACHE which leads to believe this is not often used or needed. That being said I'm trying to get to the underlying issue rather than just cover it up which is what people (previously) seemed perfectly content to do.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply