[cups.general] Sense and nonsense of RIPCache

Till Kamppeter till.kamppeter at gmail.com
Wed Jul 28 06:48:04 PDT 2010


On 07/28/2010 01:59 AM, Michael Sweet wrote:
> I think it is entirely appropriate for cupsd to set a default value for
> the filters (one place to configure things...), and we could add a
> "percent" unit that would be converted to an absolute value based on
> physical memory.

I have modified the CUPS Raster output device in Ghostscript now so that 
it has the following behavior:

1. If RIPCache is set to a valid numeric value, now both MaxBitmap 
(maximum space used when rendering in full-page mode) and BufferSpace 
(memory used when rendering in banding mode) are set to the same value. 
There is only one of the two buffer types allocated anyway, and with 
BufferSpace being set to 1/10 of MaxBitmap, it is set to only 800K with 
CUPS' default settings which is too small for many documents. Now will 
be set to 8 MB and so more documents render, but there are still 
problems with large paper sizes and high resolutions.

2. If RIP_MAX_CACHE is not set, set to zero or to a non-numeric value 
(like "auto"), Ghostscript will determine the amount of memory needed 
dynamically. This assures that every document will get rendered. Even 
with very high resolution (or very large paper size) Ghostscript's 
memory consumption stays under 1 G.

My suggestion is to add support for memory percentages to CUPS and let 
CUPS default to something like 1/4 of the amount of installed RAM. On 
modern desktop machines this is enough even on big paper sizes and with 
complex documents. This also leaves enough memory for foreground tasks, 
Currently I have patched CUPS for Debian and Ubuntu and it defaults 
RIPCache to 1/4 of the system's RAM. Alternatively, one could default to 
something like RIPCache=auto to let  GhostScript determine the exact 
amount of memory.

    Till





More information about the cups mailing list