PortThreadPriority.
Each defined printer port in NT has an associated thread that sends data to the port. This REG_DWORD value's data defines the priority used for these port threads. The value takes ­1, 0, or 1, which correspond to THREAD_PRIORITY_ BELOW_NORMAL, THREAD_PRIORITY_ NORMAL, and THREAD_PRIORITY_ ABOVE_NORMAL. In NT 4.0, these values represent priorities of 7, 8, and 9, on either a workstation or server. Table 1, page 166, includes descriptions and numerical equivalents for each thread priority.

PriorityClass.
This REG_DWORD value, which is used only in NT 3.5x, defines the priority class (i.e., the associated thread priority of the NT Spooler service). The default setting is 0, which means that NT is to use the default priority (THREAD_PRIORITY_NORMAL). In NT 4.0, the SpoolerPriority value replaced this value.

SpoolerPriority.
This NT 4.0 REG_ DWORD value replaces the PriorityClass value and sets the priority class for the print spooler. This value doesn't automatically appear in the Registry, and you have to add it manually to change the data.

By default, the print spooler is set to NORMAL_PRIORITY_CLASS. Valid settings for this value are IDLE_ PRIORITY_CLASS, NORMAL_PRIORITY_ CLASS, and HIGH_PRIORITY_CLASS (NT ignores any other settings). Table 1 provides descriptions and numerical equivalents for each priority class.

SchedulerThreadPriority.
This REG_ DWORD) value sets the priority of the scheduler thread, which is responsible for assigning print jobs to ports. The default setting for this value is 0, meaning that NT is to use a normal thread priority. Valid settings for this value are 0 (Normal), 1 (Above Normal), and 0xFFFFFFFF (Below Normal; note this number is hexadecimal and not a string value). You can modify this Registry value with the System Policy Editor (SPE) utility, or you can place it within a global System Policy file (NTConfig.pol)--it is part of the default .adm templates that the SPE utility includes.

FastPrintThrottleTimeout.
When you enable the Start printing immediately option in the Scheduling tab of a printer's Properties dialog box, some printers pause if they don't receive data for a timeout period (time varies depending on type of printer). To counteract this situation, the spooler throttles back on data sent to the printer after the number of milliseconds represented by the FastPrintSlowDownThreshold value have passed. At that point, 1 byte of data is sent to the printer per period represented by FastPrintThrottleTimeout until the amount of time defined by FastPrintSlowDownTheshold value has passed. You enter this
REG_DWORD value in milliseconds (ms), and the default data is 2000ms (2 seconds).

FastPrintWaitTimeout.
When you enable the Start printing immediately option in the Scheduling tab of a printer's Properties dialog box, the port thread must be synchronized with the application spooling the print job. The FastPrintWaitTimeout value determines how long the port thread will wait before giving up, pausing the current print job, and moving to the next print job. You enter this REG_DWORD value in milliseconds, and the default setting is 24,000ms (24 seconds).

FastPrintSlowDownThreshold.
NT uses this REG_DWORD value with the FastPrintThrottleTimeout value to determine at what point the spooler is to begin throttling back the data the operating system (OS) sends to the printer (to maintain a continuous flow of data to the printer and not trigger a printer timeout). The default setting is the FastPrintWaitTimeout value divided by the FastPrintThrottleTimeout value, but you can manually set this value (enter the value in milliseconds).

NetPrinterDecayPeriod.
This REG_ DWORD value specifies how long NT is to cache a network printer for a local machine's client browser. The cache presents a list of network shared printers when you browse for available printers. The range is in milliseconds, and the default setting is 3,600,000ms (1 hour).

When modifying these Registry values, use the thread priorities and priority classes described in Table 1 as a guideline. As with any type of Registry modification, make any changes in small increments and benchmark them along the way, using a standard test to determine their effectiveness. Modifications to these Registry values will not produce significant benefits except on the busiest print servers serving several printing devices. Also, increasing the priorities of print-related threads on NT servers that aren't dedicated to print serving (i.e., servers being used as file or application servers) will deprioritize the access of other process threads.

Optimizing the print spooler file.
The location of the default spooler file NT uses for printer spooling can increase performance. NT spools print jobs to disk before printing them (as long as the printer's print spooling option is turned on). By default, NT spools jobs to the %systemroot%\system32\ spool\printers folder. However, on servers that experience a heavy disk load on the boot partition (where the %systemroot% folder is located) due to application and paging file activity, disk spooling activities might be slowed because of disk contention. This situation can adversely affect overall printing performance because the disk spooling thread must wait for other system activities before receiving disk time to write spool data.

To alleviate this problem, consider moving the default spool file location on a print server to an alternative drive. To do so, open the Printers folder and select File, Print Server Properties. Next, select the Advanced tab of the Properties dialog box. To move the spool location, change the value listed in the Spool Folder option to an alternative folder, as Screen 4, page 168, shows. (Before doing so, make sure that this folder exists and that all users who will print to this machine have at least Change permissions on the folder if it is on an NTFS partition.)

You can change the Spool Folder location in NT 3.x, but you must use a Registry editor to edit the Registry directly. The value for the default Spool Folder for all printers is in HKEY_ LOCAL_MACHINE\SYSTEM\Current ControlSet\Control\Printers (which is the same Registry location under NT 4.0). The value to modify is DefaultSpoolDirectory of type REG_SZ. The default setting is %systemroot%\system32\spool\ printers, but any valid directory pathname is acceptable.

You can modify the DefaultSpoolDirectory value by editing the associated string data and replacing it with the name of an alternative directory for printer spool files. Again, be sure that any users who will be printing to that machine have at least Change permissions (if on an NTFS partition) and that the folder already exists.

Tuning Network Print Browsing
When you share a printer on a networked NT computer, the NT Spooler service issues a broadcast message to all other print servers on the network about the existence of the new printer share. The other print servers receive notice of the new printer share and add it to their printer browse lists. In addition, all print servers automatically rebroadcast their entire list of available print servers and shares every 10 minutes to all other print servers on the network. This activity can cause excessive traffic on large networks with many active print servers.

To reduce this traffic, you can implement several Registry modifications that relate to print browsing. These entries are in the same Registry subkey we examined earlier in regard to print browsing: HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Control\Print. Several values within this Registry subkey relate to print browsing.

DisableServerThread.
You can set this REG_DWORD value, which has a default setting of 1 (enabled), to 0 to disable the print browser thread (which notifies other print servers of the shared printers on that computer).

Be aware that when you disable the print browser thread by changing the DisableServerThread value, you will prevent other print servers and clients on the network from seeing the printers shared on that computer via the Network Neighborhood. You'll need to make any connections to shared printers on the machine manually (via UNC names) rather than via the Network Neighborhood. When you disable this thread or reduce its announcement frequency, you can significantly reduce network traffic on a large network containing several print servers (print servers includes any Microsoft Windows-based machine sharing a printer on the network, not just NT server computers). Finally, note that you can also set this particular Registry value via System Policy Editor (SPE), and it is part of the default set of system policies included with SPE. You might find this method more convenient for configuring the entry for multiple NT systems on a network.

ServerThreadTimeout.
This REG_ DWORD value specifies the amount of time that the server thread waits before sending announcements about available printers on the machine. This value is in milliseconds, and the default setting is 36,000ms (36 seconds). Setting this number higher reduces network traffic by reducing the frequency of print browser announcements.

NetPrinterDecayPeriod.
This REG_ DWORD value specifies the amount of time the machine is to cache print server and share lists obtained from print servers on the network. If you adjust the ServerThreadTimeout value, set a longer decay period value to correspond to the longer announcement intervals. This value is in milliseconds, and the default setting is 3,600,000ms (1 hour).

RefreshTimesPerDecayPeriod.
This REG_DWORD value specifies the number of times per decay period that the machine is to refresh the browse lists of browse masters and backup browsers. The default setting is 2 (times per hour, the default decay period) and can range from 1 to 5.

Improving Print Server Performance
A final Registry modification that can improve a print server's network performance is to increase the Server service's network request buffer. This change can help network printing performance because NT handles all network print jobs from remote clients via the Server service.

The SizReqBuf value under the HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Services\LanMan Server\Parameters Registry key defines the server's request buffer size. The value SizReqBuf is of data type REG_ DWORD. The default setting is 4356 bytes and can range from 512 bytes to 65536 bytes.

If the value doesn't appear, you can add it using the Registry editor's Add Value option. Experiment by increasing this value in 64-byte increments to see whether you realize additional printer performance. (Reboot the system each time you change the value to be sure the changes take effect.)

Ready to Print
Now you're ready to test these strategies for improving printing performance under NT. Always test any optimiza-tions (especially those involving modifications to the Registry) on a non-production machine that won't affect your network or users. Only after you establish that you can safely implement the modification in your environment should you deploy it on production machines.

End of Article

Prev. page     1 [2]     next page -->



You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

Sean Daily’s “Tuning NT Printing” (June 1998) was extensive and interesting, but unfortunately, I didn’t find anything about printing from a DOS program. I use the NET USE LPTx statement for redirecting printing to a network device, but after I have executed printing in a DOS program, I have to wait 30 seconds for the printer to start printing. If I close the DOS program, printing starts immediately. I want to shorten the time between when I execute printing and when the printing physically starts. Novell NetWare provides the Capture command, which has a Timeout option, but I don’t know whether Windows NT has anything comparable.<br>--Jack Badow<br><br>

<i>The most likely solution to your problem lies within a Virtual DOS Machine (VDM)-related Registry entry that affects the timeout period NT uses when it waits for a DOS VDM-based print job to complete. The LPT_Timeout value entry (type REG_SZ) in HKEY_LOCAL_MACHINE\SYSTEM\\CurrentControlSet\\Control\WOW controls the amount of time NT waits for a DOS application to close a print job handle that an application opens. The default value is 15 seconds; you might experiment with lower values to see what setting improves your situation.<br>--Sean Daily</i>

Jack Badow

Again, there is nothing about network printing from DOS over terminal server. i'm trying to do exactly that, with the print queue held on a NetWare 4 server running NDS. I've managed to find out how to print, but not how to switch of banner pages, and also the notification message. I'm using Gateway Services for NetWare, and the Netware Client is not installed, so Novell's CAPTURE command doesn't work.

Caroline Lawson

Do you have any windows 2000 print server tuning I have a printer spooler issue. We have to restrat the spooler on 3 of our servers. they all have over 100 printers. I am spooling them to a drive with 32gig space. The erros we get before we require a spooler restart are printing missing text. Not printing at all. Can be on any printer, any user. HP and Xerox printers are used

Jason

 
 

ADS BY GOOGLE