[cups.bugs] cups-lpd eats tons of resources

Erik Slagter eslagter at wlz.nl
Tue Jun 29 06:35:51 PDT 2004


Hi,

We use about 200 printers all connected to one cups host. The printers
are driven using socket and lpd protocols. The queues on the cups host
are printed to using the lpd protocol. This means each job gets accepted
by cups-lpd.

Now it appears that moderate usage can completely use up all available
cpu power on the cups host which, imho, is not acceptable for this
moderate amount of print requests. Also users complain about having to
wait for printouts.

I did some debugging using strace and found out that cups-lpd for each
accepted job, requests all properties of all (in our case +/- 200!)
printers from cupsd. This keeps the cpu quite busy.

Then I had a look at the source (from CVS) and found out that this
indeed the case and is solely done to confirm whether a given printqueue
actually exists.

To back my claim up that this eats very very much cpu cycles, I made a
few changes to the cups-lpd daemon with the effect that no printer
properties are requested. This happens to work fine (as long as no
non-existing queues are requested). Also this happens to shorten print
time by a factor ~15.

I understand that my changes are just a quick hack to prove a point.
Given the outcome of our tests, I'd really like to have this changed in
cups-lpd, possibly using a lighter mechanism to test printer existance.
Ideas to come to my mind are: querying only 1 printer instead of all, or
even scanning /etc/printcap (if cups-lpd and cupsd are on the same
host).

For those who like to see for themselves I have attached my hack as
patch to the cvs source.

You'd make my day if this gets fixed in a right way.

Erik Slagter, Waterlandziekenhuis NL.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cups-lpd.c-diff
Type: text/x-patch
Size: 3233 bytes
Desc: 
URL: <https://lists.cups.org/pipermail/cups/attachments/20040629/73a78721/attachment.bin>


More information about the cups mailing list