[cups.general] CPU utilization
Michael R Sweet
msweet at apple.com
Fri Mar 27 09:29:09 PDT 2009
On Mar 27, 2009, at 7:49 AM, angelb wrote:
> Hello all.
>
> I've had CUPS 1.3 running for awhile and have been monitoring it
> closely.
> Although it has improved in many ways, it is still a CPU-intensive
> process.
>
> We manage every printer queues from the servers. From the client
> side, we
> don't really do anything with the printer queues. Given that fact,
> is it
> really necessary to pass all the other printer attributes to the
> client; ie,
> info, job_sheets, location, make_model, where in fact these
> attributes are
> essential only for the server?
They are also for the client - otherwise we'd have to display "dummy"
values, and some clients (in particular Mac's) use printer-info as the
display name for printers ("Mike's LaserJet" instead of
"Mike_s_LaserJet").
Also, if you set the default job-sheets value on the server, you want
that same default to apply on the clients.
> In my case, I don't care about those attributes, not from the client
> side at
> least. So, I've played with cups-polld a little by removing those
> attributes
> and recompiled. That alone cut about %2 percent of CPU use on the
> client when
> polling. We have about 2630 queues.
>
> The polling session still shows high CPU utilization. Looking at the
> process
> from beginning to end, the scheduler writes to printcap with very
> low CPU use
> at the beginning and then very high CPU utilization at near end of the
> polling. During my observation, I noticed that at the start of the
> polling
> session, cupsd writes one printer and at near-end of the session, it
> shows and
> keeps a list of writes.
In CUPS 1.3.x and earlier, cupsd re-writes printcap (or whatever local
state file is in use with the Printcap and PrintcapFormat directives)
every time a change occurs. In 1.4 we delay writes to minimize disk
accesses (important for power management), so you'll see updates at
most once per minute with the default settings.
That said, if you don't need the printcap file (and most users don't),
just add an empty Printcap line in your cupsd.conf:
Printcap
____________________________________
Michael R Sweet, Senior Printing System Engineer
More information about the cups
mailing list