HP Distributed Print Service Administration Guide

84 Chapter4
Getting Started with HPDPS
Setting HPDPS Environment Variables
jobs without specifying a logical printer name. Defining a default logical
printer also allows you to perform certain configuration tasks without
specifying the logical printer name. For example, to set the default value
of the PDPRINTER to LogPrt1, edit the system-wide /etc/.profile file
and add the line:
export PDPRINTER=LogPrt1
Users can set a different default logical printer in their individual
.profile file by editing this file and adding a line such as
export PDPRINTER=LogPrt4
Tuning Load Handling Using HPDPS Environment
Variables
The PD_MAXTHREADS environment variable, which is a systemwide
environment variable, allows you to specify a limit on the number of
simultaneous command threads in the client daemon. Each thread takes
up memory resources and this prevents the daemon from running out of
memory. Once it hits the limit, it will ignore new requests until a thread
frees up. (The default is 50 if PD_MAXTHREADS is not otherwise set.)
PD_MAXTHREADS is read only at invocation of pdclientd.
The PD_MAXRETRIES and PD_RETRY_INTERVAL environment variables,
which can be modified within each individual user’s own environment,
can be used to keep a command from quitting prematurely in this
situation. Refer to the HP Distributed Print Service User’s Guide for
more information on environment variables.
For example, suppose that one expects that the highest number of
simultaneous HPDPS requests to be 100 (perhaps after some batch
reports complete), and that the HPDPS throughput for this particular
system is measured to be around 1 job/sec. Since PD_MAXTHREADS
defaults to 50, the first 50 requests will be taken immediately and the
rest must wait. It will take 50 seconds for 50 new threads to free up for
the rest of the jobs. Since PD_RETRY_INTERVAL defaults to 5 seconds, each
waiting command will try again every 5 seconds. The longest a job will
wait is 50 seconds divided by 5 second intervals, or for 10 retries. You
should add one more retry in case it just missed.
So in this example, PD_MAXRETRIES should be set to 11.This will set an
upper limit of about 55 seconds as to how long a command can take
before it returns with success or an error message.