Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 May 2000 20:13:54 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Warner Losh <imp@village.org>, "Lorenzo Iania" <l.iania@sintesi.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: lpr: order of print requests
Message-ID:  <v04210101b5351bfcfef6@[128.113.24.47]>
In-Reply-To: <200005012009.OAA18596@harmony.village.org>
References:  <017c01bfb11f$ab144c80$0500000a@sintesi.net> <200005012009.OAA18596@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At 2:09 PM -0600 5/1/00, Warner Losh wrote:
>LPR queues up the reuqests and prints them in order smallest to
>largest to reduce the average wait time for a job at the expense of
>having a larger standard deviation in the wait times for jobs.  Maybe
>this is what you are running into.  I don't know if there's a way to
>disable this behavior or not.  At least that's what I recall lpd doing
>years ago when I ran a unix lab in school.  I didn't go check the code
>to see if it still did that or not.

FreeBSD's lpr, as it ships, does not do queue reordering based on
size.  It is probably best that it remain this way.  In the case of
postscript jobs, for instance, reordering a queue based on the
byte-size of the postscript job is pretty pointless.  You can
have a short job which takes a long time to print, or a long job
which pretty much flies right through the queue.  The byte-size
of the postscript job does not accurately indicate how long it
will take to plot.  Postscript is a language.  Saying which job
will print faster is like claiming you can tell which C-program
will execute in less time based on the byte-size of the C source
files.

I am sure that many sites would change lpr's behavior to implement
some kind of prioritization based on file size or file type, but
lpr as exists in freebsd source is FIFO (assuming no one does an
'lpc topq' to explicitly change that order...).

Looking at the source code (the getq() and compar() routines in 
lpr/common_source/common.c), it is clear that it only checks the
last-modification time of the cf files for each job. 'lpc topq'
works by altering those last-modification timestamps.


---
Garance Alistair Drosehn           =   gad@eclipse.acs.rpi.edu
Senior Systems Programmer          or  drosih@rpi.edu
Rensselaer Polytechnic Institute


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v04210101b5351bfcfef6>