[Pkg-cups-devel] Bug#665435: cups: too much memory consumption in default configuration (swaps out, brings print server to a crawl)

Jonathan Nieder jrnieder at gmail.com
Sat Mar 24 06:21:49 UTC 2012


tags 665435 + patch
quit

Jonathan Nieder wrote:

> With "RIPCache 16m" in /etc/cups/cupsd.conf the system seems to be
> sane again and printing is still working fine.

I think that might even make a good default.  Alternatively, how about
this patch (untested)?

Based on a suggestion from [1].

[1] http://thread.gmane.org/gmane.comp.printing.cups.general/26383/focus=26400

diff --git i/doc/help/ref-cupsd-conf.html.in w/doc/help/ref-cupsd-conf.html.in
index ce0ec8f6..f88912ec 100644
--- i/doc/help/ref-cupsd-conf.html.in
+++ w/doc/help/ref-cupsd-conf.html.in
@@ -2707,8 +2707,8 @@ RIPCache 2048k
 memory cache used by Raster Image Processor ("RIP") filters such
 as <CODE>imagetoraster</CODE> and <CODE>pstoraster</CODE>. The
 size can be suffixed with a "k" for kilobytes, "m" for megabytes,
-or "g" for gigabytes. The default cache size is "128m", or 128
-megabytes.</P>
+or "g" for gigabytes. The default cache size is "auto", which
+means to set the cache size dynamically.</P>
 
 
 <H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.16</SPAN><A NAME="RootCertDuration">RootCertDuration</A></H2>
diff --git i/scheduler/conf.c w/scheduler/conf.c
index 98770d49..02247cd3 100644
--- i/scheduler/conf.c
+++ w/scheduler/conf.c
@@ -546,7 +546,7 @@ cupsdReadConfiguration(void)
 
   cupsdClearString(&DefaultPaperSize);
 
-  cupsdSetString(&RIPCache, "128m");
+  cupsdSetString(&RIPCache, "auto");
 
   cupsdSetString(&TempDir, NULL);
 
diff --git i/scheduler/cupsfilter.c w/scheduler/cupsfilter.c
index 9f21a52b..f99531ed 100644
--- i/scheduler/cupsfilter.c
+++ w/scheduler/cupsfilter.c
@@ -1338,7 +1338,7 @@ read_cupsd_conf(const char *filename)	/* I - File to read */
   else
     set_string(&FontPath, CUPS_FONTPATH);
 
-  set_string(&RIPCache, "128m");
+  set_string(&RIPCache, "auto");
 
   if ((temp = getenv("CUPS_SERVERBIN")) != NULL)
     set_string(&ServerBin, temp);





More information about the Pkg-cups-devel mailing list