I really didn't think over everything you were discussing, but you're on the right track for a solution to my issue.
Every time a job is printed, lprng scans the entire spool before deciding to print the next job. It does a DNS lookup on the originating host of every job. So if you have 5 jobs in the spool, it has to do 5 lookups, print job #5, do 4 lookups, print job #4, etc. Now imagine having three spools running with 800+ jobs in each spool. If your DNS is anywhere but your local machine, especially if your DNS is off your LAN (an ISP's DNS at 30+ms, or across a corporate WAN at 75-150+ms), this is a substantial use of bandwidth, and time. If the NS lookup is done one time, at the time the control file is created, then this reduced a 1000 job spool from (does the math...erm..) about 500,000+ DNS lookups for the entire spool, to only 1000. I'm looking at having to, very soon, setup 130 systems with BIND slaving our primary internal DNS because of this problem. I just haven't had time to tackle the source myself and find a way around it. The lookups on jobs are irrelevent to us as it is, since we don't use hostname/address-based permissions, which I believe is the only use for these particular looukps. A patch like this would at least put me a step closer to blowing away these lookups. I did mis-understand a fair bit of what you are doing (and I haven't kept up, so I'm not sure of the background behind why you had come up with this), but it is a stepping stone, at the very least. Thanks... Bradley Hartin - [EMAIL PROTECTED] Communications and Network Administrator Straus-Frank Company On Sat, 14 Jun 2003 [EMAIL PROTECTED] wrote: > > > I am *absolutely* interested. I've had to setup BIND caching on all my > print servers (one central, four highly active sub-servers, another 120 > elsewhere). The slowdown from the DNS lookups is staggering. > > Thanks, > > Bradley Hartin - [EMAIL PROTECTED] > Communications and Network Administrator > Straus-Frank Company > > On Sat, 14 Jun 2003, Henrik Edlund wrote: > > > As there seemed to have been a lot of discussion about this with people > > wanting this, and no clear and easy solutions, I took a few hours today > > and wrote a small patch set that introduces two new config variables in > > lpd.conf (or printcap): > > > > force_controlfile_originate_hostname=10.0.0.0/255.255.255.254 > > force_controlfile_username=_unauthenticated=10.0.0.0/255.255.255/254 > > > > They work like other options with network addresses, they take multiple > > ones including netgroups. > > > > The first, for the matching addresses, will rewrite the control file with > > the real remote address. Just put 0.0.0.0/0.0.0.0 there to always do it. > > > > The second, for matching addresses per username, will rewrite the username > > in the control file with that username. > > > > The patch set is really small is I used Patrick's coding style (which I > > don't like but I can adjust) when writing them so they would fit nicely > > with the rest of the code. > > > > $ grep + getqueue.c.patch lp.h.patch vars.c.patch | wc -l > > 54 > > $ grep - getqueue.c.patch lp.h.patch vars.c.patch | wc -l > > 14 > > > > If someone is interested and can post the patches to the list. > > > > Henrik > > > > ----------------------------------------------------------------------------- > > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST > > The address you post from MUST be your subscription address > > > > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests > > or lprng-digest-requests) with the word 'help' in the body. For the impatient, > > to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] > > with: | example: > > subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] > > unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] > > > > If you have major problems, send email to [EMAIL PROTECTED] with the word > > LPRNGLIST in the SUBJECT line. > > ----------------------------------------------------------------------------- > > > > > > ----------------------------------------------------------------------------- > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST > The address you post from MUST be your subscription address > > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests > or lprng-digest-requests) with the word 'help' in the body. For the impatient, > to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] > with: | example: > subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] > unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] > > If you have major problems, send email to [EMAIL PROTECTED] with the word > LPRNGLIST in the SUBJECT line. > ----------------------------------------------------------------------------- > > ----------------------------------------------------------------------------- YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST The address you post from MUST be your subscription address If you need help, send email to [EMAIL PROTECTED] (or lprng-requests or lprng-digest-requests) with the word 'help' in the body. For the impatient, to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] with: | example: subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] If you have major problems, send email to [EMAIL PROTECTED] with the word LPRNGLIST in the SUBJECT line. -----------------------------------------------------------------------------
