[Samba] continuous access to printer causes high memory usage
Roel van Meer
rolek at alt001.com
Tue Jul 25 15:54:47 GMT 2006
Martin Zielinski writes:
> and http://lists.samba.org/archive/samba/2004-November/096492.html
> The symptoms are the same as you described.
This seems to be exactly what is biting us. I've tried to get a
configuration on the client that would not result in the spooler to go into
a loop, but no success so far.
As an afterthought, why should a repeated access from a spooler result in
unlimited memory consumption of the smbd process? It seems odd.
The output of 'smbcontrol <pid> pool-usage' on the memory-using smbd
processes shows that thare are many references to a structure named
NT_PRINTER_INFO_LEVEL (many thousands, increasing with about 230 every
minute) that keep the memory allocated. This causes the used virtual memory
to increase with about 4 MiB per minute.
Is this something that is in fact correct behaviour but is leading to too
much memory consumption because of the amount of rpc calls?
As there are more people who seem to have this problem I've opened a
bugzilla report: https://bugzilla.samba.org/show_bug.cgi?id=3962
> ~ Martin
> Roel van Meer wrote:
>> Hi list,
>> I am trying to track down a printer-related problem.
>> The most important symptom is a smbd process using almost all memory on
>> my machine (up to 800 MB, at the specific case of which I've posted the
>> logs.) At some point the VM will kill the smbd process, freeing the
>> memory. Apart from this, samba keeps on running fine.
>> Investigation of a level 3 debug log of this process has shown that the
>> client (a Windows XP machine) is accessing one of the samba printers
>> almost continuously, with four rpc calls: SPOOLSS_OPENPRINTEREX,
>> SPOOLSS_GETPRINTERDATA, SPOOLSS_CLOSEPRINTER and SPOOLSS_ENUMJOBS.
>> The printer driver is installed on the samba server. The client is
>> configured to use the printer via a Samba port. When the printer is
>> removed from the client, the rapid calls stop. When the printer is
>> installed again, the calls again occur in rapid succession.
>> Attached you'll find an excerpt of the output of 'ps', my smb.conf and a
>> piece of the log file.
>> I've seen this problem at a few different machines, with samba versions
>> 3.0.20, 3.0.22 and 3.0.23 and different clients (all Windows 2000 or
>> XP). All machines are running Slackware 10.1. The only solution I have
>> found so far is removing the printers from the client.
>> I have been wondering if this problem can be caused by an absent or invalid
>> deviced mode for this printer.
>> Does anyone have a clue about what might cause this? Or a hint about
>> where to look further? I'm more than willing to provide more detailed
>> Thanks in advance,
> Martin Zielinski mz at seh.de
> Software Development
> SEH Computertechnik GmbH www.seh.de
More information about the samba