[argyllcms] Re: icclink, ARGYLL_REV_CACHE_MULT and madvise

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Fri, 02 Nov 2007 18:05:10 +1100

Klaus Karcher wrote:

is there a way to determine the optimal setting for ARGYLL_REV_CACHE_MULT programmatically? I want to set the environment variable in my CMM at runtime before calling icclink.

I've certainly thought about this, but haven't looked into it a lot.

Do you think it's worth trying to optimize icclink's performance using the madvise() or posix_madvise() system call? If so: What would be the best advice passed to the system call to describe the memory behavior of revcache -- MADV_SEQUENTIAL or MADV_RANDOM? are there other memory regions expected to benefit from madvise?

The reverse lookup cache is a big potential user of memory, but it
was one of the few ways I could think of of speeding up the rather
slow (but accurate) reverse lookup calculations. Of course it's
usefulness depends on the cache hit rate, which improves when the
reverse sampling is dense.

One issue is that the cache entry size isn't fixed, it depends on
the details of the type of lookup and (if I remember correctly) the
exact lookup (ie. whether it clips etc.).
So I'm not quite sure that the number of entries that will use a certain
amount of memory can be computed in advance. To work well, the whole cache
allocation/addressing approach may have to be re-worked.

Ideally one would then end up setting a maximum percentage of physical
memory to use as the cache, rather than number of entries.

Graeme Gill.


Other related posts: