共用方式為


Optimising Office Web Apps rendering performance

 

I was recently working with one of our large enterprise customers and they were experiencing rendering and performance related issues with Office Web apps in SharePoint 2010, specifically the word and PowerPoint viewing services.

I did a bit of digging and changed some of the worker process/CPU core allocation settings and we found rendering performance improved quite significantly. We also made sure they patched the office web apps install bits as they hadn't patched with SP1 or the June CU for OWA. This made some big improvements as well.

**All of the changes listed here may very in your environment but are based on supported and documented articles**

Key TechNet references:

Here are the steps to change the OWA worker process and CPU core allocation settings using trusty PowerShell:

1) Get the number of cores available to the worker processes via WMI calls:

 $CPUConfig = Get-WmiObject Win32_Processor 
$NumCores = $CPUConfig.NumberOfcores

 

2) Calculate the Worker Process Count based on the Number of Cores multiplied by 2. (The recommendation is to have 2 worker processes per CPU Core):

 $WorkerProcessCount = ($NumCores * 2)

 

3) Next we change the Word Viewing Service MaxActiveProcessCount parameter (by default is is set to 3 worker processes) (Apologies for the wrapping of the code)

 $serviceAppId = (Get-SPServiceApplication | 
where {$_.TypeName -eq "Word Viewing Service Application"}).ID 
Set-SPWordViewingServiceApplication -Identity $serviceAppId -MaxActiveProcessCount 

$WorkerProcessCount 

 

4) Finally we change the PowerPoint viewing service ViewingWorkerProcessCount parameter (Apologies for the wrapping of the code)

 Get-SPPowerPointServiceApplication | Set-SPPowerPointServiceApplication 
-ViewingWorkerProcessCount $WorkerProcessCount

Finally for the word viewing service, we found that changing the default setting for MaxRenderingLifetimeInSeconds from the 5 minute default had some positive effects as well. This will vary according to your environment and should be changed based on the following formula (From TechNet):

  1. Divide the maximum number of pages of the largest documents by 700. This will determine the number of minutes required to render the documents.
  2. Then multiply the number of minutes by 60 to determine the maximum rendering time in seconds.

 

Happy rendering!