6

My terminal server users experience a delay when selecting printers from MS Office applications to be printed to network printers. Everything stalls on:

Finding available printers...

The environment is a 4-server Windows 2008 R2 RDS farm. The printers are configured on a dedicated Windows 2008 R2 print server local to the network.

All of the RDS servers experience the delay, however the issue seems to be isolated to Microsoft Office 2010 applications. Adobe, web browsers, etc. are not impacted.

It’s a 5-7 second enumeration delay under normal use, and up to 35 seconds at the busiest periods of the day RDS server.

Here's a video to show the timeline...

enter image description here

There are 16 network printers in this environment using universal drivers where applicable.

enter image description here

Edit:

I already went through the process described at:
2008 R2 Terminal Server: "Insufficient system resources exist to complete the requested service"

  • If you export the following registry keys to a file, how large are the files? [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers] and [HKEY_USERS\.DEFAULT\Printers] – Greg Askew Sep 8 '15 at 14:23
  • @GregAskew They are 1,977KB and 12,784KB, respectively. – ewwhite Sep 13 '15 at 12:52
  • Does the latency happen on a clean user profile? – yagmoth555 Sep 13 '15 at 22:56
  • @yagmoth555 Yes, a new profile sees the same thing. – ewwhite Sep 13 '15 at 22:57
  • 1
    I ask as I remember the old KB from the chat, so I know Office read the status of each printer. In the printqueue if its the case you can remove 'birectional' support. That remove the printer software monitor and such. In fact, if the printer monitor is buggy, removing the support will help the query. You cant see after 'low ink', 'no paper' and such warning, but that remove a lot of network talk, and remove the printer monitor from the vendor – yagmoth555 Sep 13 '15 at 23:16
4

How many of you have ever dealt with an issue where you just knew that something was wrong with your print spooler but could not quite put a finger on it? Maybe print jobs were slow, certain users could print to some printers but not others, or maybe nobody could print at all? - Blake Morrison - Ask Performance Blog - Microsoft Fixit for Printing

The quoted article references two Microsoft FixIt which basically cleans up the Spooler settings and restore it, etc.

Direct link to Print Reset Full Mode - http://go.microsoft.com/?linkid=9829711 Direct Link to Print Reset Lite Mode - http://go.microsoft.com/?linkid=9829710

There are two modes - full and lite. The lite has less things it does. The blog post details what the FixIt does behind the scene.

3

In case it helped, will write an answer with what we talked.

Please check Performance issues due to Inactive Terminal Server Ports

There are several issues that have been associated with a high number of inactive Terminal Server ports. Delayed logon times to RDP sessions, failure of printers to redirect, and slow server performance due to registry bloat from all the ports. These inactive TS ports accumulate because the Remote Desktop Services Device Redirector service creates a new port every time an RDP session is established, but the ports are not always recycled. Every RDP session can possibly create a new port, and every ended session means a new inactive port. Performance degradation is known to occur when 250 or more TS ports exist in the registry. Increasingly large numbers of redirected devices will exacerbate performance delays.

The resolution:

Long logon time when you establish an RD session to a Windows Server 2008 R2-based RD Session Host server if Printer Redirection is enabled

and run that FixIT to clean the registry.

  • I had over 8,000 entries in the registry. I've removed them, but cannot reboot the server to make the hotfix active just yet. – ewwhite Sep 8 '15 at 16:52
  • 3
    I went through and applied this fix to the terminal servers. However, it did not actually resolve the issue with the printer delays. It probably fixed other performance problems and was much-needed, but the original issue remains. – ewwhite Sep 13 '15 at 14:18
2

This is an recurring issue when using horribly written print drivers. In this situation there was two suspects (which both are guilty); HP Universal Print Drivers and Konica Minolta Universal Driver.

For some reason both these drivers refuse to run in anything other than CSR mode (Client Side Rendering). On a terminal server this can get disasterous, as they populate the same keys over and over and over inside HKEY_USERS\.DEFAULT\Printers, just with a different GUID each time. Combine that with users who have every printer on the planet mapped to their userprofile, and you get a shitstorm of printer installation every time they log off.

In this specific situation the terminal servers had millions of entries inside the registry hive.

The steps to "solve" this has been:

  • Install MS hotfix 2778831 if you are running 2008 R2, and MS Hotfix 2871131 if you are running 2008 R2 SP1 or 2012 R2.
  • Keep the list of drivers as minimal as possible. Remove the driver packages that you don't need
  • Update the drivers (this stopped the HP driver from spamming the registry, Konica driver still sucks)
  • Set drivers to shared isolation mode, and change the print processor to winprint in hopes of stopping CSR from activating
  • Clean out all the junk from HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider
  • Stop Windows from deleting and re-creating printer connections every time a user logs off (or disconnects) by setting RemovePrintersAtLogoff=dword:00000000 in the key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider. Remember to restart the spooler.
  • Clean print software from HKEY_USERS\.DEFAULT\Software and printer connections from HKEY_USERS\.DEFAULT\Printers
  • Boot a Windows PE image and compress the registry
  • If using HP UPD in a managed environment - install the group policy templates from HP Managed Print Administration and disable all the extra "features", like the popups about toner remaining and super deals on new toners and such. It slows down the spooler, as it has to trigger a new process to start every time you so much as look at the printer inside Windows.
  • Do not install full printer application packages on a terminal server. Just use normal drivers on a shared print server, without any kind of "easy" discovery methods or dynamic print targets.

I suspect that one just has to do the tasks above at intervals. Maybe it could be scripted.

Do you wonder, after reading all this, if you too have the same problem? Go to %SystemRoot%\System32\config and check the size of the file DEFAULT. If it's anything larger then a few hundred MB's then it's time to put on your detective hat.

  • +1 for the gpo template for hp upd, didnt know that tip – yagmoth555 Feb 26 '16 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.