High CPU after Publishing Lync Topology

I have now experienced this issue at two different clients so I thought I would share how we are handling it in case others are experiencing it.

Background: After you publish a Lync topology where you add and/or delete and object, you see the CPU utilization spike to 100% across all of your front-ends.

This issue has been around awhile. Ken Lasko talked about it on his blog (http://ucken.blogspot.com/2014/01/high-processor-utilization-on-lync-2013.html) back in January of 2014. He had suggested simply restarting the AppPool’s on the CMS servers.

Recently, a co-worker and I decided to attempt Ken’s script but we found that it wasn’t helping us. Simply restarting the AppPool’s on the CMS servers wasn’t enough to bring down the CPU utilization on the other front-ends (we currently have 4 pools with 2 more on the way). Due to the number of Front-ends (12 currently), we really didn’t want to RDP into each of them so we utilized a script I had written to perform the IISRESET.  It goes out and finds all of the Lync Front-ends and then will perform the IISRESET.

NOTE: You must have remote management enabled for this script to work. Windows 2008 R2 does not have it enabled by default.

Here is the script:

<#

    Written by: Adam Ball

    Description: Looks up all the Front-ends in the Lync Topology and performs an IISRESET on them.

    Version 1.0

.#>

 

#Get all of the Pools with Web Servers in the environment

$pools = Get-CsService -WebServer | select PoolFqdn

 

#Get all computers from the pools running Web Services

$computers = @()

foreach ($i in $pools ){

    $computers += ( Get-CsPool $i .poolfqdn) . computers

    }

Write ”IISReset will be performed on “ + $computers

 

#Reset IIS on all Web Servers

foreach ($i in $computers ){

    Write ”Performing IISReset on “ + $i

    Invoke-Command -ComputerName $i -ScriptBlock {iisreset }

    } 

comments powered by Disqus