file descriptor limit and MaxClient - revisited

angelb angelb at bugarin.us
Thu Jul 5 10:45:09 PDT 2007


Hello all.

Trying to learn more about CUPS basic functions, which is lots and
complex IMHO, and without digging into the source codes, it seems as
if CUPS does not recognize the system's setting for the maximum number
of open file descriptors.

Looks like the maximum clients per host will always be 341 regardless
of what your system's OFD setting is.

Here, I set root's OFD to 8k. And also confirmed the same setting for
the cups id:

[root at cupsserver]# ulimit -a|grep open
open files                      (-n) 8192

[root at cupsserver# su - cups
[cups at cupsserver ~]$ ulimit -a|grep open
open files                      (-n) 8192

Stop and restarted cupsd.

Looking at a servers log:
I [05/Jul/2007:11:45:55 -0500] MaxClients limited to 1/3 (341) of the file descriptor limit (1024)...
I [05/Jul/2007:11:45:55 -0500] Configured for up to 341 clients.
I [05/Jul/2007:11:45:55 -0500] Allowing up to 341 client connections per host.

So, setting MaxClients to a higher value is ineffective since CUPS does
not seem to honor it. I just want to know if this is a bug or there's
something I'm not doing correctly.

Also, I don't quite understand how this MaxClient and MaxClientPerHost
works. If my assumption is correct, Client in this context refers to
"printer queues?" and "host" is the clients that runs the cupsd where
print jobs are sent.

And so, the MaxClients in the server dictates how many queues, at any
given time, can connect to the server. And the MaxClientPerHost also
tells how many "printer queues", from a client at any given time, is
allowed to connect to the servers.

So, if the server only allows 341 printer connections, and say you have
10 clients, assuming one of your client consume all of the 341
connections at any given time, the other 9 clients will never be able
to print.

But if all things equal, the most jobs each client can submit at any
give time will be 341/10 or ~34. This may not work well in a large
environment...."assuming" my assumptions above is correct... :)

Any suggestion or comments is appreciated.

Thanks,
Angel










More information about the cups mailing list