BrowseInterval

Michael Sweet mike at easysw.com
Tue Feb 8 13:25:05 PST 2005


angelb at bugarin.us wrote:
> Can anyone explain how BrowseInterval affects the time it takes a 
> client to receive the server's printer definitions; ie, Added remote 
> printer "hp001"... etc
> 
> If I set the BrowseInterval to 15 minutes, it takes a client system 6
> minutes after it added the last printer entry from the server for
> 2199 printers. Now, if I set the BrowseInterval to 4hrs, it takes
> about 36 minutes to do the same thing.
> 
> Why is it a shorter BrowsInterval takes less time while a longer 
> BrowseInterval takes more time for the client to receive all printer 
> definitions? Shouldn't it be constant regardless of the interval?

Depending on the version of CUPS you are using, the packets may or
may not be rate-limited; the current (1.1.23) release works this
way:

     1. Given the number of printers that need to be advertised,
        the scheduler does N=ceil(num-printers/interval-in-seconds)
        to figure out how many printers to advertise in a 1-second
        time period.

     2. Advertise N printers each second.

     3. After the interval has expired, go back to #1.

The algorithm is slightly more complex that that (printer state
changes will cause additional updates during the browse interval),
but that is the gist of it.

The longest it will take to advertise 2199 printers is 2199 seconds
(1 printer per second, the minimum rate), or approximately 36
minutes.  With an interval of 15 minutes (900 seconds), it will
advertise the printers at a rate of 3 per second, which should
complete in 733 seconds or ~12 minutes (at least with the current
algorithm)

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups mailing list