Friday, April 19, 2013

Terminal Server slow when printing documents - bloated print spooler registry hive

source: http://social.technet.microsoft.com/Forums/en-US/winserverprint/thread/42f8e930-c50b-4166-88f4-4832ea9e2f13/


  • 0 Points
     
    Alan/Patrick,
    Hi, sorry, went away on leave for a while so didn’t respond.
    Alan – our case was REG:112081612189183.
    For someone who has been dealing with MS support for about 20 years, this was the most disappointing of any support call I’ve ever had raised – to have the call shut down, without a perfmon trace, process explorer analysis, or hang dump analysis (of spooler) – and simply blame “3<sup>rd</sup> party drivers” without any proof – is utterly deplorable.
    Anyway, for anyone’s benefit who has similar problems – trying to do direct printing from RDS – I’ve managed to get a solution working. 
    Here are the details;
    • A nightly print spooler clean-up script that;
      • Stops the spooler
      • Deletes the entire key under “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider”
      • Re-creates the key (empty) and sets the value "RemovePrintersAtLogoff"=dword:00000000
        • Note, this was vital.  MS support had recommended we set this to 1, along with some other keys (InactiveGuidPrinterAge,  InactiveGuidPrinterTrim) with specific values.  If we used these MS support recommended values, our RDS serer would not enumerate printers for more than 3-4 hours before requiring a restart of the spooler.
      • Restart the spooler
      • Map a printer (just to make sure it works)
    • Clean up the USERS\.DEFAULT\Printers key on all existing servers
      • There was heaps of crap here, the default user NTUSER.DAT was over 800MB in size
    • Modify the security on the registry, using GPO to deny SYSTEM write access as below, to stop the crap writing here again;
      • USERS\.DEFAULT\Printers
        • Deny Set value
        • Deny Create Subkey
    • Run NGREGOPT on all servers to compress the DEFAULT and SOFTWARE hives back down.
      • Even though we had deleted the crap from “Client Side Rendering Print Provider” and the DEFAULT user hive, the registry files were still large of course, and needed to be compressed to reduce paged pool usage.
      • Note, make sure no users are on the server when this is run !
    With the nightly spooler ‘refresh’ and the registry security changes, we are no longer seeing any problems.  In addition the paged pool has gone down from 5GB to 1GB – which I believe was related to the registry bloat that had occurred previously.  Cleaning up the keys and using NGREGOPT has fixed this.
    In addition, I am running a spooler check script every 30 minutes on each of the 13 servers.  This script checks how long it takes to enumerate the printers for the specific test user.  If it takes more than 20 seconds, we get an alert.
    Since I have made the changes above, we no longer have any printing problems… touch wood.. even using HPD 5.4 for most printers, and other (RICHO) 3<sup>rd</sup> party drivers.
    If anyone wants the scripts (the spooler refresh or the check script) let me know on david.frith<at>glfconsulting.com.au
    ta
  • Wednesday, January 30, 2013 11:20 AM
    Avatar of Blackforce Dale
    (Partner)
    0 Points
     
    Has anyone tried this hotfix?
    http://support.microsoft.com/kb/2778831
  • Wednesday, January 30, 2013 11:41 AM
    Avatar of David Frith
    0 Points
     
    Dale - wow, that sounds like the hotfix we are after
    about time Microsoft !
    Gee, makes me even more angry that our support call was closed on us by Microsoft blaming 3rd party drivers ...
    It will be on our farm within 2 weeks, and I'll try removing the nightly registry clean up - but looking at the article, it sounds 99% sure to solve the problem


source: http://social.technet.microsoft.com/Forums/en-US/winserverprint/thread/42f8e930-c50b-4166-88f4-4832ea9e2f13/

8 comments:

  1. Hey There, only became awake into a site through Google, also discovered That it is genuinely informative. I am gonna be careful with Brussels. I'll be thankful if you keep this in the future. A whole lot of people will probably be profited by the own writing. Cheers! hp dj3630 printers troubleshoot

    ReplyDelete
  2. I'm glad I found this web site, I couldn't find any knowledge on this matter prior to.Also operate a site and if you are ever interested in doing some visitor writing for me if possible feel free to let me know, im always look for people to check out my web site. Laptop cu gia re

    ReplyDelete
  3. You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site dokument

    ReplyDelete
  4. The blog resembles a chocolate for me. I need to have it constantly.CanvasPrints

    ReplyDelete
  5. You have beaten yourself this time, and I appreciate you and hopping for some more informative posts in future. Thank you for sharing great information to us. Website translation into another language service

    ReplyDelete
  6. An interesting dialogue is price comment. I feel that it is best to write more on this matter, it may not be a taboo topic however usually individuals are not enough to talk on such topics. To the next. Cheers. fake documents generator

    ReplyDelete
  7. I'm still having this issue... and would love to get BOTH scripts, if they are still available. I just sent an e-mail to you. Thanks in advance.

    ReplyDelete