Bug 7656 - Scalability problem with hundreds of printers
Scalability problem with hundreds of printers
Status: RESOLVED FIXED
Product: Samba 3.5
Classification: Unclassified
Component: Printing
3.5.4
All Linux
: P3 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-27 09:19 UTC by Volker Lendecke
Modified: 2011-08-27 08:12 UTC (History)
0 users

See Also:
asn: review+


Attachments
Patch for 3.5 (2.54 KB, patch)
2010-08-27 09:20 UTC, Volker Lendecke
no flags Details
Patch for 3.5 (2.61 KB, patch)
2010-08-27 09:35 UTC, Volker Lendecke
no flags Details
Patch (2.03 KB, patch)
2010-09-06 23:05 UTC, Volker Lendecke
asn: review+
Details
Fixed patch (2.00 KB, patch)
2011-02-01 10:13 UTC, Andreas Schneider
no flags Details
Fixed fixed patch (2.33 KB, text/plain)
2011-02-01 10:17 UTC, Andreas Schneider
gd: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Lendecke 2010-08-27 09:19:04 UTC
With hundreds of printers in /etc/printcap and load printers = yes, Samba 3.5 will spend significant amounts of time in the loop in set_printer_hnd_name().

Not sure the patch to follow should make it into the next 3.5 release, but I would like to make it visible here.

Volker
Comment 1 Volker Lendecke 2010-08-27 09:20:00 UTC
Created attachment 5941 [details]
Patch for 3.5

This patch has successfully been tested by a customer of mine.

Volker
Comment 2 Volker Lendecke 2010-08-27 09:35:47 UTC
Created attachment 5942 [details]
Patch for 3.5

The customer asked to be mentioned. Code is the same, just the commit msg changed.

Volker
Comment 3 Jeremy Allison 2010-08-27 18:44:18 UTC
Looks good for 3.5.x.
Jeremy.
Comment 4 Karolin Seeger 2010-09-06 13:48:10 UTC
Pushed to v3-5-test.
Closing out bug report.

Thanks!
Comment 5 Andreas Schneider 2010-09-06 16:33:01 UTC
The patch is great, but not complete.

As the cache entry isn't invalidated or deleted if a printer is updated a printer rename doesn't work (SetPrinter, GetPrinter). The samba3.posix_s3.rpc.spoolss.printer rename test is currently failing. To be complete the cache entry should be deleted if the printers is deleted.

Volker, could you please complete the patch?
Comment 6 Volker Lendecke 2010-09-06 23:05:50 UTC
Created attachment 5949 [details]
Patch

Is that what you have in mind? I can't test it right now, "make selftest" for some reason does not work for me, I'm still on the make oldtest.

Volker
Comment 7 Karolin Seeger 2010-09-21 03:23:16 UTC
Reassigning to Andreas for patch review.
Comment 8 Andreas Schneider 2010-09-29 07:25:38 UTC
The patch looks fine. It is already in master and in v3.6 as it was working correctly here.
Comment 9 Andreas Schneider 2010-09-29 07:27:46 UTC
Karolin, could you please apply or pick the patch for Samba 3.5?
Comment 10 Karolin Seeger 2010-10-06 14:14:47 UTC
Sorry, both patches do not apply to current v3-5-test branch...
Comment 11 Andreas Schneider 2011-02-01 10:13:08 UTC
Created attachment 6239 [details]
Fixed patch
Comment 12 Andreas Schneider 2011-02-01 10:17:23 UTC
Created attachment 6240 [details]
Fixed fixed patch
Comment 13 Guenther Deschner 2011-02-09 09:12:29 UTC
Comment on attachment 6240 [details]
Fixed fixed patch

looks good
Comment 14 Guenther Deschner 2011-02-09 09:12:54 UTC
Karolin, please add to 3.5
Comment 15 Karolin Seeger 2011-02-09 13:58:07 UTC
Pushed to v3-5-test.
Closing out bug report.

Thanks!