RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1191691 - cups-browsed very inefficient
Summary: cups-browsed very inefficient
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cups-filters
Version: 7.1
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Tim Waugh
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1110700 1191021
TreeView+ depends on / blocked
 
Reported: 2015-02-11 18:34 UTC by Tim Waugh
Modified: 2015-11-19 12:08 UTC (History)
3 users (show)

Fixed In Version: cups-filters-1.0.35-18.el7
Doc Type: Bug Fix
Doc Text:
Cause: Local and remote CUPS schedulers were asked for information repeatedly with no cache. Consequence: Excess load was placed on local and remote CUPS schedulers. Fix: The information is now cached during each poll. Result: CUPS scheduler load is reduced.
Clone Of:
Environment:
Last Closed: 2015-11-19 12:08:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1223719 0 unspecified CLOSED Cups is not pulling Description of Printers from Cups server 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2015:2360 0 normal SHIPPED_LIVE Moderate: cups-filters security, bug fix, and enhancement update 2015-11-19 10:41:12 UTC

Internal Links: 1223719

Description Tim Waugh 2015-02-11 18:34:35 UTC
Description of problem:
Upstream revisions 7314--7324 fix several inefficient code paths in cups-browsed:

- when listening for CUPS Browsing packets, cupsGetDests() is called each time a packet is received, fetching the entire list of local printers
- when using BrowsePoll, cupsGetDests() is called for each remote printer discovered
- when sending CUPS Browsing packets, cupsGetDests() is called each BrowseInterval

The fixes (a) fix IPP notification handling and (b) use it to track changes in local printers. If there are no changes, recomputing is avoided.

This takes load off cupsd as well as cups-browsed.

Version-Release number of selected component (if applicable):
cups-filters-1.0.35-16.el7

How reproducible:
100%

Steps to Reproduce:
1.Run 'cupsctl --debug-logging' (as root)
2.Run 'cups-browsed --debug' (as root)
3.Watch /var/log/cups/error_log to see how many times CUPS-Get-Printers is requested

Actual results:
Happens in the situations described above.

Expected results:
Only happens after changes to the local printers.

Additional info:
Recommend just using the latest utils/cups-browsed.c. It also fixes several instances of searching through lists for things that should be in hash tables, etc.

Comment 1 Zdenek Kabelac 2015-06-05 07:55:27 UTC
I'd add couple comments here -

cups-browsed seems to be the only 'permanent'daemon process which is able to keep my fan spinning.

IMHO - it really should do any  'ipp' processing only when it's really queried for some list of printers.

i.e.  I print something just few times per month - yet - long office printer list is processed with poor slow CPU hunger parser every minute.
And not just that - even my '/etc/hosts' file with longer list of blocked sites seems to be scanned every minute because of this.

Would be very cool to see 'browsed' only collecting list of printers addresses - and processing them just when needed  (thus just following systemd design) - I've no problem to get the list of printers some miliseconds later...

Comment 2 Tim Waugh 2015-06-08 16:25:17 UTC
FWIW: The "right" way of doing this is not to use cups-browsed at all. It is only there for applications that do not use libcups (and its client-side DNS-SD discovery), and instead use their own discovery by querying the local cupsd process, expecting that cupsd does discovery (it doesn't, since 1.6).

If all the applications did it this way, discovery would be entirely on demand.

Comment 5 errata-xmlrpc 2015-11-19 12:08:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-2360.html


Note You need to log in before you can comment on or make changes to this bug.