Link to home
Start Free TrialLog in
Avatar of devon-lad
devon-lad

asked on

Slowdown in app using Word 2013 interop on Win2008R2 session hosts

We're experiencing a significant disparity in performance when running an in-house app on session hosts compared to running on local PCs.  There is a particular session host the app is used on, but we have tested on other session hosts and getting the same results.

A particular process with the same test data takes 2 minutes on the session host and 30 seconds on the PC.  It has been tested on the session host when no one is logged in.  And we've also tried turning AV off - all Word add-ins are disabled.

We've narrowed it down to a bit of code that is calling setupstyles on the document object that has been loaded.

Session host details:
- Hyper-V VM running Win2008R2 64-bit
- Office 2013 32-bit
- 26 VPU in NUMA nodes
- 32GB static memory
- 8 x local 15k SAS drives in RAID10 using PERC710 controller - these are dedicated to the session host VM
- 1Gbps connection to network

PC details:
- Windows 7 Pro 32-bit
- Office 2013 32-bit - exactly the same config as the session host as all deployed and customised through the same group policies
- Dual core processor
- 2GB RAM
- Single 7200k SATA drive
- 1Gbps network connection

When testing the problematic process on each platform we can see the following in perfmon:

Session host:
- Processor usage staying below 40% (that's when it's loaded with 20 or 30 users)
- Processor queue staying below 5
- Memory usage around 13GB
- Disk latency less than 5ms
- Disk queue depths less than 2

PC:
- Processor usage going up to 80%
- Memory usage around 50%
- Much higher latency and queue depths on the disk compared to the session host

Disk benchmarking shows the throughput on the session host storage is around 9 times that of the PCs.

So without sitting in the user's chair it would be fair to assume the session host is performing the task faster - but it's not.

Roaming profiles used on both PC and session host with no redirection - so process will be using the local disk in each case for writing any temp data.

So what exactly is happening when the setupstyles method is being called?
Avatar of devon-lad
devon-lad

ASKER

Bit more detail on the code.

When stepping through the code on a session host it's a for loop that is checking for a style name and then updating the style.  This takes much longer on the session host than on the PC.
Try changing the default printer to fax on all machines.... word probably trying to communicate with printer somewhere
When testing on the session host, I'm setting the default printer to Microsoft XPS - and have been logging in at the console so there is no printer redirection going on.
Default styles? Where is the template located?  Try changing the template to the Normal template?

Time each iteration of the for loop?
Changing the style settings for Headings 1 to 3 and Normal.  Template is Normal template stored locally as far as I'm aware.
ASKER CERTIFIED SOLUTION
Avatar of devon-lad
devon-lad

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Old template might have been bloated with styles?  Tnx for sharing.
Found own solution.