Write a comment

Many Citrix or terminal server farms have problems with printer drivers and sometimes even the Administrator is not aware of that. Drivers that are not 100% multiuser aware can have a bad influence in many different ways. Often those buggy drivers can slow down the login process or cause high CPU consumption. In worst cases, printer drivers can even stop the login process for the whole server, kill the spooler service or can cause a blue screen of death (very rare with Windows 2003 and up). For the first two issues, the Citrix health monitor can help tracking the problem.

Troubleshooting such problem was quite complex and did require advanced knowledge to find the badly behaving printer driver. When finally the driver was found (often through analyzing a crash dump file) and forwarding the information to the vendor, it ends with the vendor would usually respond that they can't reproduce the error in their environment.

To help find bad printer drivers and further reproduce the terminal server scenario Citrix published a command line utility called "AddPrinter". Later Citrix developed a GUI for AddPrinter and called it StressPrinters which is a much better name for the utility. Now with the StressPrinters utility Administrators can easily "Stress Printer Drivers" in a simulated terminal server environment. This is very helpful to the admin, and more importantly, vendors can now reproduce the driver problem.

Citrix forwarded the utility to every major printer manufacturer and hopefully, they will come up with better printer drivers in the future. In the meantime, Administrators of Citrix and terminal server Farms should test all their printer drivers with StressPrinters.

Understanding Citrix StressPrinters

Basically what StressPrinters does is the creation and deletion of printers with the specified printer drivers set in the GUI of StressPrinters. Also, this is done within a very short timeframe to simulate peak logon- and logoff times. How stressful the test should be can be defined by the Administrator. The testing of printer drivers can be very CPU intensive for the server running StressPrinters and therefore should not be done on a production server. StressPrinters is not related to any Citrix specific component and therefore can be used for any multiuser environment. StressPrinters can also be used on a Windows XP workstation as well. This will also allow printer vendors to reproduce the exact same error you might have with a specific printer driver.


Using StressPrinters

Using StressPrinters is straight forward and is the reason why everyone should use the utility. Under CTX109374 you will find the download of StressPrinters (logon is required, but it is free). Unzip it to a folder on a non-production Citrix Server where all of the printer drivers in use are installed.


The simple printer stress test

Launch StressPrinters and you will see the following screen:

Select all of the printer drivers you like to "stress", then choose the number of add events for how often the printer should be created (around 3-5 times). Optionally you can set additional parameters but it's not necessary. A description of each parameter can be found at the same Citrix StressPrinters article CTX109374. Hit the "run" button to start the printer stress test. You will see the output of the test for each printer driver.

At best nothing is displayed for a printer other than it ran successfully. You might get some "Warnings" but most do not indicate a bad driver. It may be that the driver needs more time for a successful test. The worst case scenario is that the Windows Print spooler hangs or gets killed by a printer driver and is definitely a sign to remove that printer driver immediately. For every new printer driver, StressPrinters should be used BEFORE the drivers go onto production servers.


The advanced printer stress test

There are reasons why you want to perform an advanced printer stress test. Print drivers might pass the stress test but in an unusual amount of time or with high CPU usage. These parameters should be monitored during the printer stress to optimize further the logon- and logoff procedure.

Example StressPrinters test with native and non-native drivers
The following snapshot shows StressPrinters output from two printer drivers, one native and the other non-native (HP is just an example but the same can happen with any non-native driver).


Testing printer drivers with the following StressPrinters settings:
Number of add events: 1
Maximum delay: 0 ms
Repeat test: 0
Verbose mode: active

The "Warnings" are not that important and basically, both drivers are suitable for a TS environment but have a look at the total elapsed time for each driver. The native driver just took 9 seconds to complete the test but the non-native took 54 seconds!Let's have a deeper look on the stress test with Microsoft Performance Monitor (perfmon); process "spoolsv.exe" added.


HP LaserJet 4100 Series PCL – native Microsoft Printer Driver

Time for Printer creation/deletion 9 seconds | max. ~ 18% CPU usage on Intel Core Duo
Logon: 6 seconds | ~18% CPU , Logoff: 3 seconds | ~11% CPU, max. context switches 1,000


HP LaserJet  4250 PCL6 non-nativ HP Printer Driver (61.63.461.42)

Time for Printer creation/deletion 54 seconds | max. ~65% CPU usage on Intel Core Duo
Logon: 6 seconds | ~18% CPU , Logoff: 48 seconds | ~65% CPU, max. context switches 10,000


As shown in the previous graphs the non-native driver uses much more server resources as the native printer driver and will, therefore, interfere dramatically with the user logon and/or logoff. 



Citrix StressPrinters should be used to check out ANY printer driver that goes into production environments which include drivers that are mapped from a print server. During the stress test CPU usage and total elapsed time should be observed and they should both be part of the consideration if the print driver should be used. Using StressPrinters will help minimize all kinds of problems that can result from bad printer drivers.



Write comments...
or post as a guest
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.