printing in 2.2.0

Dmitry Melekhov dm at belkam.com
Sat May 12 05:03:23 GMT 2001


Damian Ivereigh wrote:

> > I have some printing problems with 2.2.0.
> > Samba was installed on a Solaris 2.8 server and a SuSE Linux 7.1
> > server. In both cases I got nearly the same effects: selecting a printer
> > is realy slow and cpu usage is high for smbd.
> > 250 printers are connected to the solaris 2.8 server. if you open about 4
> > or 5 printer in one minute cpu goes up to 100%.
>
> I believe I know what the problem is, but the fix is going to be very
> tricky.
>
> The problem appears to be that the algorithms used to get the data out
> of the TDB files are not very efficient. This becomes significant when
> dealing with more than a few dozen printers. There main problem is
> that in several places
> Samba needs to do a partial match of keys. Since tdb is based on a
> hash algorithm, there is now way to select a partial key match (e.g.
> all keys beginning with xyz). So Samba has to resort to trolling
> through the entire file selecting the keys it needs.
>
> There are two main places this happens:-
>
> 1) When looking up printer, driver and forms info it has to troll
> through the entire ntdrivers.tdb file

I think that main problem is here, becase the more drivers I install, the
slower printer properties works.
I.e. I have 6 printers in printcap, when I download driver for one printer all
is OK, when download driver (or alternate driver)
for second printer printer properties works slower  , etc...

>
> 2) When looking for queue information (i.e. what jobs are in each
> queue) it has to troll through all the jobs in printing.tdb looking
> for jobs for that particular printer.
>

> To make matters worse as it reads each key it locks and unlocks the
> record, on most OS's this is quite expensive.
>
> For the job queue info, you can reduce the load considerably if you
> are prepared to live without job queue info. Just change your lpq
> command entry in smb.conf to something like:-
>
> lpq command = echo 'no entries'
>
> and delete printing.tdb
>

This change nothing in my case.

--
Wire connection and Windows reinstallation senior engineer
Dmitry Melekhov
http://www.belkam.com/~dm
2:5050/11.23 at fidonet







More information about the samba-technical mailing list