Hello List Members, a customer of us asked me to analyse the performance problems at his Samba 2.2.2 (Solaris 8) print server (E250 single CPU, 1GB Mem). The first issue is a huge amount of 390 (!) network printers to serve. Using the new SpoolSS feature, he needs printer driver download support, we found problems using the printer folder below server view, as it needs an inacceptable time to get the result (some minutes and server CPU at 100%). Some times it looks like a timeout will be reached and the client may freeze. Same behavior can be seen while viewing properties of a printer. Looking into source and using smbd debug level 3 shows, that most time would be used at printing/printing.c->print_queue_status. truss shows, the most time will be consumed by a very hugh amount of fcntl() system calls. As i could see in source the smbd have to do update the print queue status by itself. That would be fine for only a few printers, but gets very complex for a greater amount of printers. Are there any ideas to update print queue status in a more efficient way, e.g. a dedicated process/thread? Any hint to config, a workaround or a patch to speed up printing service would be welcome. Thank you in advance! -- Regards -------------------------------- CLASS AG - http://www.class.de Klaus Jungbauer Senior Systems Engineer Projects Tel +49 (0) 8151/991-241 mobil +49 (0) 172/82 130 25 mailto:Klaus.Jungbauer@class.de
On Thu, 24 Jan 2002, Klaus Jungbauer wrote:> a customer of us asked me to analyse the performance problems at his > Samba 2.2.2 (Solaris 8) print server (E250 single CPU, 1GB Mem). > > The first issue is a huge amount of 390 (!) network printers to serve.That is a lot. :-)> Using the new SpoolSS feature, he needs printer driver download > support, we found problems using the printer folder below server view, > as it needs an inacceptable time to get the result (some minutes and > server CPU at 100%). Some times it looks like a timeout will be > reached and the client may freeze. Same behavior can be seen while > viewing properties of a printer. > > Looking into source and using smbd debug level 3 shows, that most time > would be used at printing/printing.c->print_queue_status. truss shows, > the most time will be consumed by a very hugh amount of fcntl() system > calls.But up the lpq cache time to something larger than 10 seconds. Maybe 60?> As i could see in source the smbd have to do update the print queue > status by itself. That would be fine for only a few printers, but gets > very complex for a greater amount of printers. > > Are there any ideas to update print queue status in a more efficient > way, e.g. a dedicated process/thread?Yeah. This is on the TODO list. JF had a stab at it initially. Not done yet. chau, jerry --------------------------------------------------------------------- Hewlett-Packard http://www.hp.com SAMBA Team http://www.samba.org -- http://www.plainjoe.org "Sam's Teach Yourself Samba in 24 Hours" 2ed. ISBN 0-672-32269-2 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--
I am just an amateur, but: Would it help to partition the work? Do all clients need to access all the printers? What if you used macros, and depending on the client, only make certain printers available? Joel
Is is possible to run several different smbd's at once? I haven't tried this, but, you might be able to run multiple smbd's, each listening to a different port. I don't know much about your system, but there must be artful ways to redirect traffic to different ports, depending upon client source or other input. Ipchains could do this, I belive. smbd can listen to high ports, so you could have as many smbd's running as you like. man smbd talks about changing port numbers. Another possibility is to give your server network interface several aliases, and have diverse smbd's running which only listen to one of several aliases. I have no idea if this would work. You may have to recompile samba to get several different versions, with different locations for lock files and the like. Sounds like a fun project. I'll post this question under the subject Mulitple smbd's ? and see if anyone who knows about this responds. Joel On Mon, Jan 28, 2002 at 10:38:06AM +0100, Klaus Jungbauer wrote:> Hello Joel, > > thanks for help. > > Joel Hammer wrote: > > > > I am just an amateur, but: > > Would it help to partition the work? Do all clients need to access all the > > printers? > > It would be a solution, but my customer wants to use only one print > server for administrative reasons and to build up a high availability > cluster (and spent no more than two systems). > > > What if you used macros, and depending on the client, only make certain > > printers available? > > That won't help. The smbd spent the most time to update the printer > queue status and that coresponds to the number of server side configured > printer queues. > > > > Joel