Novell is now a part of Micro Focus

Optimizing Printing with NetWare 4.x and 3.1x

Articles and Tips: article

SPENCER COTTAM
Software Engineer
Print Services Development
Novell NetWare Products Division

DAVE DAVIS
Senior Technical Writer
Novell Technical Publications

01 Sep 1993


With the introduction of NetWare 4.0, NetWare's print services have been enhanced considerably. This AppNote gives a detailed description of the printing process to help you understand the path a print job travels from a user's workstation to a shared network printer. It also describes the characteristics of various type of printers and printer languages. Following that is a discussion of potential printing problem areas and ways to alleviate these bottlenecks. Although this AppNote focuses on NetWare 4.x printing, much of the discussion of the printing process and bottlenecks applies to NetWare 3.1x as well. A follow-up AppNote will present the results of some printing performance tests.

Introduction

With the introduction of NetWare 4.0, NetWare's print services have been enhanced considerably. In addition to the increased capacity of the NetWare print server (PSERVER.NLM) to service up to 255 printers, the performance capabilities of print services in NetWare 4.x and in 3.x releases after NetWare 3.11 represent a significant improvement over the capabilities of NetWare 3.11.

This AppNote lays the groundwork for understanding NetWare print services by describing the network printing process and bottlenecks that may affect printing performance on a network. This information will help you set up and configure your network printing environment to meet your needs. You'll also gain a better idea of where to start looking when troubleshooting printing problems.

The AppNote consists of three major sections:

  • A general description of the network printing process

  • An overview of printer characteristics

  • A discussion of potential bottlenecks in the printing process and ways to alleviate them

Although this AppNote focuses on NetWare 4.x printing, much of the discussion of the printing process and bottlenecks applies to NetWare 3.1x as well. A follow-up AppNote will present the results of some in-house testing designed to identify the performance limits of the NetWare 4.x printing environment.

The Network Printing Process

To users not familiar with network printing, the printing process may seem fairly simple. In non-network printing, data is generated on a standalone computer and then sent to a printer cabled directly to the computer. However, in network printing, printers are often shared and several intervening steps must take place: storage, intermediate processing, and transmission between various processing locations. These steps can greatly affect the complexity of the print job's journey and the time taken before a print job arrives at the printer.

Each step in the printing process affects the time necessary for a print job to be completed at the printer. The scenario depicted in Figure 1 describes a typical path print data might follow during this process. Each main step in this process is described more fully after the figure.

Figure 1: Flow chart for a typical printing setup.

Step 1: Print data is generated and transmitted.

The application compiles the data entered by the user and passes it toward a print driver. Initially, there is only an application data file or possibly a document file with imbedded image definition data. No print data yet exists.

A print driver generates the actual printer data and passes it toward LPT1. The driver may be part of the application software, or may have been supplied with the operating system, or may have come from a third party. Print data now exists in one of the formats described in the "Printer Languages" section later in this AppNote.

The speed at which print data can be generated varies greatly. As complexity increases with additional formatting and graphical requirements, the time required to generate print data increases. Streams of simple text characters are created almost instantaneously on modern systems. Formatted text, which requires precise alignment of varying fonts and sizes, produces higher quality output but is more complex and takes longer to generate. Some types of graphics are so complex that they may require hours or even days for a single image to be generated.

Step 2: Data is redirected to a network queue.

In non-network printing, data generation and transmission can be nearly simultaneous on a single computer. However, during network printing, data is not sent directly to a printer as it is in non-network printing. Instead, the data is redirected to a file in a print queue where it is stored on disk while waiting to be sent to a printer.

Redirection of print data and storage in a queue has several advantages for network users:

  • It allows the application and the user to resume work without waiting for the printer to complete a print job.

  • It allows the data to be sent to a separate computer, which then handles transmission to the printer.

  • It allows multiple users to share a single printer and allowsthe use of printers at different locations.

With NetWare, sending a print job to a queue can be accomplished manually via NPRINT.EXE or automatically via a redirection TSR (previously activated by the CAPTURE utility), which intercepts the data headed toward LPT1. In either case, the data is assembled into small packets, which are appended with label information and redirected to a network interface card and the associated driver software.

At the network interface, each packet is transmitted toward the destination file server that will store the data.

The individual packets travel over the network medium, possibly having to traverse repeaters, routers, gateways, and bridges along the way.

Upon arrival at the destination file server, another network interface (card and software) receives each packet of data, and may also check the packets for transmission errors and/or send acknowledgments back to the sending interface. Each packet of data is then passed to the file storage area.

Step 3: Data is stored in queue.

At the file server, the data packets are stripped of their labeling information and stored in a disk file. It is important that any data storage area be large enough to hold both the largest print job likely to be stored and all the print jobs likely to be queued up on a busy day. When the data for a complete job has all been received and stored, the file is closed and the queue management service (QMS) adds the filename to the queue associated with the printer. At this point, the application and user are able to resume work.

Multiple print jobs, possibly from different users, may stack up at times. QMS provides the ability to manipulate the jobs, possibly changing priorities or print sequence, requesting multiple copies, or making other changes. NetWare's PCONSOLE and NWADMIN utilities communicate with QMS to allow the user to view and alter some print job characteristics.

The stored print job waits in the queue until the print server is able to transmit it to a printer. If a print job is behind another job in the queue, the associated print server will request and receive the data file information immediately upon completion of the preceding job. The delay here can be long if there are many other print jobs waiting in the print queue, or if the user stipulated that this job should print at some particular time in the future.

However, if the queue was empty when the completed data file name was passed to the QMS, the associated print server requests the data file information after the next predefined request interval. The default query interval is 15 seconds, but can be altered in NetWare 4.0.

Step 4: Print data is transmitted to a printer station.

After the print server receives the print job information, it begins reading the print data from the file. It assembles the data into small packets, labeling each and passing them to a network interface (card and software). The individual packets are transmitted over the network, possibly traversing repeaters, routers, and bridges along the way.

As the packets are sent, the print server gets packets back from the printer station containing information about the status of the printer, the amount of data that has actually been sent to the printer, and how many packets the print station currently has room to receive.

Step 5: Print data is transmitted to the printer.

At the destination workstation, another network interface (card and software) receives each packet of data, possibly checking the packets for transmission errors and/or sending acknowledgments back to the sending interface. The packet labels are removed, the workstation's foreground task is interrupted, and the print data is passed to NPRINTER (in NetWare 4.x) or RPRINTER (in NetWare 3.1x).

When NPRINTER (or RPRINTER) receives the first data packet, the printer port is initialized and the interrupts are enabled. If the printer is not busy, one character is printed. Control is returned to the workstation's foreground task. After each character is accepted by the printer, a hardware interrupt returns control to NPRINTER long enough to send one more byte. If configured to not use interrupts (polled mode), NPRINTER instead gets control once each clock tick (18.2 ticks per second) and makes a fixed number of attempts to send bytes before relinquishing control back to the foreground task for the remainder of the clock tick period.

If the byte is sent through a parallel port, it is put on the port and a strobe signal is sent. Later, a corresponding return signal tells the hardware that the printer is ready for more, generating the hardware interrupt mentioned in the preceding paragraph.

If the byte is transmitted through a serial port, it is passed to a UART chip which transmits, at a fixed rate, one bit at a time, until all bits have been sent. The serial port generates the interrupt mentioned earlier when all bits have been sent. Additional hardware signals or characters sent back from the printer are monitored by NPRINTER to verify the printer's readiness for more data.

Ideally, the time that NPRINTER is taking control of the workstation to transfer data to the printer is spread out and small enough that the interference is rarely noticed by the user.

Step 6: The printer formats the data and completes the print job.

Each byte travels a cable to the printer, where it is stored until enough bytes have been accumulated to process. Data transmission to the printer usually uses a Centronics-type parallel port or an RS-232 type serial port.

The printer converts the data to dot patterns and stores the formatted print data until enough data has been converted to complete a single physical cycle. The cycle for a laser printer is a full page; the physical cycle for most other printers is one pass of a print head. The formatting process can be brief or lengthy depending on the type of data being processed.

During this process, the computer communicates with the printer, waiting for a ready signal between each byte that is sent. Usually the computer spends much more time waiting than sending. However, it is possible to take advantage of these delays. Allowing the CPU to handle the user's "foreground" tasks during these large delays is what makes it possible for the printer's "background" task to operate with little apparent interference.

If the printer has insufficient memory to store new data until the physical cycle has finished with the old data, the printer may signal NPRINTER to suspend transmission during each cycle.

When the last physical cycle of the printer is complete, the print job is done.

Printer Characteristics

A printer converts print data to dot patterns and physically manipulates paper and ink to produce a printed image.

Types of Printers

Several types of printers are in common use today:

  • Impact printers (usually dot matrix)

  • Ink jet (including bubble jet and paint jet) printers

  • Laser printers

  • Electrostatic printers

  • Thermal wax transfer and dye sublimation printers

Of these, the laser printer is the most common in network environments.

Some of the characteristics of these types are described below:

Most impact and ink jet printers handle a single pass of a print head from one margin to the other. As the head passes across the page, ink is applied to the paper. The printer head may press pins against an inked ribbon, squirt jets of ink, or use other methods to apply the ink.

  • Most impact and ink jet printer heads lay down a pattern either 8 or 24 dots high, then advance the paper in preparation for the next pass.

  • Color and higher resolution images on print head cycle printers may require multiple passes of the head before the paper is so advanced, but each pass is usually controlled as a separate physical cycle. Some of these printers can do a physical cycle with the head moving either direction (bi-directional) or perform a rapid non-printing head return at the end of each uni-directional cycle.

  • A few impact and ink jet printers format an entire page before starting to print. These are usually marketed as plotters.

  • For most laser printers, electrostatic printers, color thermal transfer printers, and dye sublimation printers, dot patterns are laid down as a one-dot-high line from margin to margin. The physical cycle handles a single page. After the completed page is printed, the print page data is cleared from the printer's memory and the "formatter" begins receiving and converting the next page of data.

  • In a laser printer, a laser "head" applies the image,line by line, to a turning drum which then transfers toner (ink)to a sheet of paper.

  • In thermal wax transfer and dye sublimation printers, the paper runs past a full-line head and ribbon. Heat from the print head applies the image directly to the paper.

  • Older electrostatic printers print directly to special paper; current models often use a drum and toner-transfer process similar to that used by laser printers.

  • Printing color images on page cycle printers can be accomplished with multiple head stations in a single pass. With a single headstation, the same result is achieved by making multiple passes, changing the ribbon color for each pass. Such multiple passes are all part of a single physical cycle on some printers, but require separate physical cycles on other printers.

Printer Languages

In the printer, a "formatter" converts the print data to dot patterns, storing enough dots to make a complete physical cycle, usually a single pass of a print head or a single page. The formatter accepts print data in one or more forms, sometimes called printer languages. Formatters that handle more than one such language may include commands to switch between languages, or they may switch automatically by analyzing the data stream.

Such languages fall into two main categories:

  • Printer languages, such as PCL, HPGL, and ESC-P, use data streams in which the data consists of (1) text bytes, (2) 2-5 byte command strings for horizontal and vertical spacing and line-image(vector) graphics, and (3) strings of bit-image (rastor) graphics. This data is easily and quickly converted.

  • Page description languages (PDLs), such as PostScript (PS), use much more complex data streams. Consisting largely of verbose English phrases and programmatic constructions, PDLs allow more complex data manipulations than the simpler printer languages, but require more time to convert.

Potential Printing Bottlenecks

The new NetWare print services represent substantial performance gains over the performance of previous NetWare releases. However, network printing is very complex; printing performance on any network can be no faster than the throughput of the slowest component of the system.

Most performance problems you may encounter in a NetWare 4.0 printing environment will result from non-NetWare-related causes. The following discussion identifies many of these causes and offers some recommendations for alleviating them.

General Bottlenecks

Make sure that file server and workstation hardware are appropriate for the tasks to be performed. Upgrading any component, such as replacing a slow hard drive with a faster hard drive, can usually increase performance, but may not if the upgraded component is limited by some other bottleneck in the system.

Server Memory. File server performance can be degraded due to excessive file activity. Adding random access memory (RAM) to a file server for use by NetWare's file caching may increase performance on busy servers.

Overburdened Servers or High Network Traffic. Performance may be limited by too few servers or an excessive amount of traffic on the network itself. Additional servers may reduce the load on an overburdened server.

As network use increases, delays in delivery of data packets may increase.

  • Increased Ethernet traffic increases packet-start delays and the possibility of packet collisions.

  • Packet collisions require data to be retransmitted, possibly slowing delivery of print job data to the printer.

  • On a Token-Ring network, traffic directly increases the delay in receiving tokens and the start of data transmission.

Proper planning of the total network using individual segments separated by routers and bridges can keep localized network traffic at reasonable levels.

Effective network administration, including the careful division of print resources among file servers and workstations to reduce multi-hop links on common paths, also can help reduce print job delays.

Machine Speed. Performance may be limited by slower computers. Use faster 486 and 386 machines whenever possible on your system, especially for servers that will be handling the most traffic and workstations tied to fast printers. NPRINTER for NetWare 4.0 is a fast print utility. Using older, slower machines with fast printers can result in situations where printer data throughput is so high as to impose noticeable delays on foreground tasks.

These delays will be more noticeable on a 286 machine than on a 386 machine, and more noticeable on an 8086 machine than on a 286 machine. Slower clock speeds also make these delays more noticeable. In such situations, these delays can be reduced or eliminated by setting the buffer size to 3KB or lower to limit throughput. (The default setting is 3KB.) This can be done in PCONSOLE at the Printer Configuration screen.

Bottlenecks Specific to Printing

Application and Driver Software. Generating print data is often the most time-consuming stage of the printing process. In the simplest situations, such as printing directly from DOS, data generation is essentially instantaneous. However, word processors may take from several seconds to several minutes per page to generate data, with delays increasing with the addition of graphics and complex fonts or formatting. Generating graphical data using CAD software or other types of visualization applications may take from several seconds to many hours per page.

Using different drivers can result in dramatic differences in both the speed at which data is generated and the quality of the data generated. While sometimes these differences are a trade-off between speed and quality, there are other cases where one driver will supply both better quality and faster performance than another.

For example, CAD output using an HPGL driver is usually several times faster than output using a PCL driver. If the target printer can use either driver, using the HPGL driver will increase data generation speed while providing output of equal or superior quality.

Be sure to match application and driver for best performance. When possible, choose application software and print drivers that are efficient for the tasks to be performed.

  • Install the applications that take the most time and are used the most often on the fastest workstations available.

  • Investigate the driver/application options available for a particular task. Be sure to consider drivers produced by third-party manufacturers.

  • Test the efficiency of each option with one or two representative tasks.

  • Select the best possible combination from your tests.

Printer. Another important printing bottleneck is in the printer itself and the type of data being sent to the printer.

For most jobs on non-laser (head-pass cycle) printers and for printing plain text jobs on laser (page cycle) printers, the physical printer engine is usually the limiting factor. The speed of the printer is rated in pages per minute for page cycle (such as laser) printers and characters per second for head cycle printers.

When a page description language (PDL) such as PostScript is used, the formatter in the printer may be the limiting factor. The speed of PDL formatting varies greatly between printers. Unfortunately, the technical specifications for most printers seldom address this parameter.

Non-PDL print jobs that include a lot of graphics or formatting may send so many bytes per page that the interface may become the limiting factor. This is discussed in the following section.

Use a printer that is appropriate for your needs.

  • If printing is frequent and if time and quality are paramount, a fast laser printer may be necessary.

  • If you use PostScript or another high-level PDL for the majority of your print jobs, the speed of the printer's formatter becomes more important.

  • If the mix of your print jobs contains mostly plain text, the speed of the print engine (as described in pages per second or characters per second) is more important.

  • If your printing mix contains mostly graphics and bit-mapped images (including bit-mapped text), the speed of the printer's interface should be a prime concern.

Interface. With bit-mapped graphic images, including text output from many word processing configurations, printer speed may be limited solely by how fast the data can pass through the workstation's print port to the printer.

Choose an interface that is fast enough to keep up with the bulk of the print jobs to be run on a particular printer. To do this, you will need to estimate the data transmission rate for that printer.

  • For printers rated in characters-per-second (CPS), use the CPS rating for the preferred font and point size as the estimated data transmission rate. Assume that only print engine limitations will limit printer output.

  • For page-per-second rated printers, estimate print data transmission this way:

    - For a representative print job, count the number of pages to be printed.

    - Print the job to a file and record the finished file size in bytes.

    - Divide the total pages (pages-per-job) by the pages-per-minute and multiply by 60 to yield seconds-per-job.

    - Divide the total bytes (bytes-per-job) by seconds-per-job to yield the bytes-per-second needed to keep up with the print engine.

    For example, a six-page job would take a minimum of 60 seconds on a 6-page-per-minute laser printer. If the job "printed" 12,000 bytes (a likely low end for plain text), the target throughput is 0.2KB per second. The same job on a 17-page-per-minute printer would yield a target throughput of 0.6KB per second.

    For another example, a one-page graphic of 1 million bytes would target the 6-page-per-minute printer at 100KB per second and would target the 17-page-per-minute printer at 283KB per second.

    This method of estimating data transmission is not useful for PostScript or other page description language printing which requires print job formatting at the printer.

If possible, use an interface that can provide print data transmission rates as fast as the target throughput calculated above.

Parallel port speeds vary greatly, but are mostly much better than serial port speeds. Laser printers that seem otherwise similar may have maximum parallel port speeds ranging from a low of less than 5KB per second to a high of over 150KB per second. Unfortunately, this information is seldom available in technical specification documents for most printers. Computer and printer manufacturers are working on standards for high speed parallel ports capable of speeds around 2MB per second.

NPRINTER.EXE software for NetWare 4.x and RPRINTER for releases after NetWare 3.11 can send data to a printer's parallel port as fast as most laser printers can receive it. The current limit is about 35KB per second and will increase as new versions take advantage of new hardware that is likely to appear.

However, in NetWare 3.11, the processing steps used to monitor and drive the port at the computer may be another a factor inhibiting performance. Some newer laser printers can accept parallel port data faster than the NetWare 3.11 RPRINTER.EXE limit of about 6.3KB per second.

Serial ports are essentially limited by the baud rate used. In general, the data rate in bytes per second will approximate the baud rate divided by ten. At 9600 baud, the maximum data throughput is about 0.96K bytes per second. NPRINTER.EXE for 4.0 and RPRINTER for releases after NetWare 3.11 support 19.2K baud and 38.4K baud, which yield maximum data throughputs of about 1.92K bytes and 3.84K bytes per second, respectively.

If interrupts cannot be used because of interrupt conflicts or lack of interrupt support in the hardware, polled mode can be used. However, polled mode has an artificial speed limit imposed to keep CPU load to reasonable levels. The speed limit of polled mode for parallel ports is about 9 kilobytes per second and may be above the level necessary for many situations.

In releases after NetWare 4.0 and after NetWare 3.11, polled mode for serial ports will constrain the data throughput to about 30 percent of the maximum rate of interrupt mode at the same baud rate. (For example, at a rate of 19.2KB per second, polled mode will limit the baud rate to about 0.6KB per second.)

Alleviating Interface-Related Bottlenecks. Here are some recommendations for alleviating bottlenecks related to the printer interface:

  • Unless distance requires the use of a serial port, use the parallel port for best performance.

  • Use interrupt mode when possible, as that allows the fastest speeds and produces the least load on the CPU per byte transferred.

  • If the jobs and printer will limit throughput to well below 5KB per second, a serial port or polled mode parallel port may perform as well as an interrupt mode parallel port configuration.

  • If data transmission rates of 5KB to 35KB per second are expected, a fast parallel port running in interrupt mode might be the best choice. As mentioned earlier, printer parallel port interfaces vary widely. Be sure that your printer parallel port is capable of supporting these speeds. If it is not, you should use a network-direct device, as discussed in the following paragraph.

  • If data transmission rates over 35KB per second are expected, (over 6KB per second if you are printing with NetWare 3.11 or earlier) a network-direct printer interface connecting the printer's internal bus to the network may be advisable. Several companies make such cards for laser printers. Connecting a fast printer directly to a network eliminates both the parallel port delays and the minimal overhead that NPRINTER.EXE imposes on the workstation.

    Note: Using external network-direct hardware that still connects to the printer's parallel port will provide little improvement in printing speed over NPRINTER on printers that cannot accept data faster than 35KB per second through the parallel port. This includes most current printers.

If you are using a network-direct printer interface card, most of these devices have two modes: a queue-server mode (also called print-server mode) and a remote-printer mode.

  • Queue-server/print-server mode can be up to 20 percent faster than remote printer mode and puts slightly less load on both network and the file server being used. However, in NetWare 4.x versions and releases after NetWare 3.11, remote printer modes are nearly as fast as queue-server/print-server modes, making the trade-offs fairly even between the two modes.

  • Remote-printer mode allows additional flexibility in controlling print forms and in monitoring printers via PCONSOLE.

Configuration. Altering your system's configuration can sometimes help you improve printing performance:

  • Avoid using polled mode if heavy use of non-PostScript graphics and formatting data is expected with fast printers.

  • Increase buffer size for busy networks.

    When running NPRINTER, throughput is also affected by the buffer size defined for the printer object in PCONSOLE. With no load on the network, maximum data rate can be achieved with any buffer size larger than 5KB. The default buffer size of 3KB may limit the throughput to about half of the maximum. As network traffic increases, packet delays will decrease throughput for any buffer size. For very busy networks, a buffer size of 20KB may be desirable to ensure having enough data stored to carry over long packet delays. The buffer size needed for maximum data throughput will range from 6KB to 20KB depending on the traffic load on any particular network.

  • Set the sampling interval to fit your network's usage patterns.

    The delay between the time a job enters an empty queue and when it starts printing is determined by the printer's sampling interval setting (called sampling frequency in NetWare 4.0). This parameter can be set in PCONSOLE for NetWare 4.x.

    When a printer isidle, the print server assigned to that printer queries the assigned queue at regular intervals. The sampling interval is the number of seconds between each query. This interval also represents the maximum wait-to-start time for a print job once it enters an empty queue (assuming no other queues are involved and the printer is ready). On average, the wait will be half of the maximum time. For single-page, text-only jobs, this delay may be the bulk of the total wait time.

    If such jobs are common, try lowering this setting. However, many idle printers making frequent queries can add noticeably to network traffic. A reasonable compromise must be reached, based on your network's configuration and usage characteristics.

  • Auto-load NPRINTER.NLM.

    If you are using NPRINTER.NLM for printers connected to a port on a file server, configure it to be auto-loaded by PSERVER.NLM. NPRINTER.NLM runs faster when it is auto-loaded than when it is manually loaded.

Summary

This AppNote has discussed the network printing process and the characteristics of various types of printers and printer languages. Understanding how NetWare print services work will help you set up and configure your network printing environment to better meet your needs. It will also help you decide where to begin the troubleshooting process if a problem occurs. The discussion of potential bottlenecks should be helpful to those who are trying to optimize network printing performance.

In an upcoming AppNote, we will present the results of tests administered in our labs. These tests were designed to measure the performance improvements of NetWare 4.x over NetWare 3.11 and to identify the limits to which a NetWare 4.x printing environment can be pushed before performance begins to degrade. These tests also helped us identify many of the system bottlenecks discussed in this AppNote.

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates