Bug 6448 - printcap reload too inefficient
printcap reload too inefficient
Product: Samba 3.6
Classification: Unclassified
Component: Printing
Other Linux
: P3 enhancement
: ---
Assigned To: Björn Jacke
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2009-06-06 13:32 UTC by Björn Jacke
Modified: 2011-05-17 20:17 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2009-06-06 13:32:25 UTC
currently printcap reload is being done by every clients' smbd on its own.

printcap reload isn't expensive when printcap is a file but it is quite expensive when printcap = cups is set. With 100 connected clients or more printcap reload is putting too much load on the CUPS server. Even a high printcap timeout does not help because printcap is being reloaded immediately when smbd gets a HUP signal or then smb.conf was rewritten.

As a fix the printcap reload should probably be done by the forked smbd which currently also handles print queue polling.
Comment 1 Björn Jacke 2009-10-15 18:21:55 UTC
Jeremy, you took the bug. Any news on this?
Comment 2 Jeremy Allison 2009-10-15 19:31:28 UTC
Errr, no sorry. This is a little tricky to do, as any change in the printer list would need to be passed back to the smbd's so they can update any dynamic shares.

Comment 3 Karolin Seeger 2010-01-25 08:21:08 UTC
Too late for enhancements for 3.5. Raising version.
Comment 4 Björn Jacke 2010-09-15 11:39:38 UTC
simo, I think you just fixed this with the aproach of the tdb cache, right?
Comment 5 Jeremy Allison 2010-09-15 11:42:59 UTC
Not in 3.6.0 - code is still only in master, so currently targetted for 4.0.0 only.
Comment 6 Björn Jacke 2010-09-15 15:51:15 UTC
reassign to me.

Note: lp_printcap_timeout needs to be used ...
Comment 7 Guenther Deschner 2011-05-17 12:35:29 UTC
If I'm not mistaken printcap reload is done now in 3.6 by just one background process, correct ?
Comment 8 David Disseldorp 2011-05-17 14:24:00 UTC
(In reply to comment #7)
> If I'm not mistaken printcap reload is done now in 3.6 by just one background
> process, correct ?

Yes, the parent smbd process pulls new printer_list.tdb values from cups on printcap cache time expiry, on completion it pushes a MSG_PRINTER_PCAP message to all child smbds.

The children then pull the new info out of printer_list.tdb and update their printer state accordingly.

This bug can be closed IMO.
Comment 9 Björn Jacke 2011-05-17 20:17:32 UTC
thanks! closing it now ...