| 1 | <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/html; |
| 5 | charset=windows-1252"> |
| 6 | <meta http-equiv="content-type" content="text/html; |
| 7 | charset=windows-1252"> |
| 8 | <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) |
| 9 | [Netscape]"> |
| 10 | <title>Argyll Performance Tuning</title> |
| 11 | </head> |
| 12 | <body> |
| 13 | <h2> <u>Performance Tuning</u></h2> |
| 14 | <br> |
| 15 | Some operations in Argyll can be particularly slow, so it is worth |
| 16 | examining ways of improving performance, or trading memory |
| 17 | consumption for performance.<br> |
| 18 | <br> |
| 19 | (See <a href="Environment.html">here</a> for how to set Environment |
| 20 | variables.)<br> |
| 21 | <h3>Creating Device Links and Profiles<br> |
| 22 | </h3> |
| 23 | In creating device links or the B2A tables of profiles, the |
| 24 | execution time is often dominated by the inversion of forward color |
| 25 | lookup values. An in-memory cache is employed to speed up this |
| 26 | operation, by keeping computed values in case they can be used more |
| 27 | than once. The amount of memory used for caching these values is |
| 28 | pre-set within the inversion code, and by default is set to use half |
| 29 | of the available RAM on the system, with a minimum of 50 Mbytes.<br> |
| 30 | <br> |
| 31 | The reverse cache size can be changed by setting an environment |
| 32 | variable <span style="font-weight: bold;">ARGYLL_REV_CACHE_MULT</span> |
| 33 | to a number greater or less than than 1.0 This will multiply the |
| 34 | size of the cache by that number (i.e. 1.5 would increase the cache |
| 35 | size by 50%, 0.5 would halve it).<br> |
| 36 | <br> |
| 37 | If you find that <span style="font-weight: bold;">colprof</span> |
| 38 | or <span style="font-weight: bold;">collink</span> are |
| 39 | working very slowly, but that your CPU's are nearly idle, then this |
| 40 | is a sign of disk swapping, and that too much memory is being |
| 41 | requested. This can be because other applications are also |
| 42 | using memory, or Argyll's default setting tries to use more memory |
| 43 | than is actually available. You can try shutting down other |
| 44 | applications when this happens, or you can <span |
| 45 | style="font-weight: bold;">lower</span> the amount of memory |
| 46 | Argyll uses by setting <span style="font-weight: bold;">ARGYLL_REV_CACHE_MULT</span> |
| 47 | to a value less than 1.0 (ie. try 0.5). <br> |
| 48 | <br> |
| 49 | If you have a lot of memory available, you can try increasing the |
| 50 | cache size to use more of the available RAM (particularly if you get |
| 51 | a "Warning - Reverse Cell Cache exhausted, processing in chunks" |
| 52 | message during processing), but if you set it to a value too near |
| 53 | 2.0 you risk disk swapping, which can slow progress to a crawl.<br> |
| 54 | <br> |
| 55 | If you have a lot of memory available, then a second adjustment that |
| 56 | can make a great difference to the time taken in creating B2A tables |
| 57 | is the resolution of the inverse lookup acceleration grid. The finer |
| 58 | the grid, the less searching is needed to locate the input |
| 59 | colorspace values that correspond to a target output color value, |
| 60 | but the greater the memory used in this structure, and the greater |
| 61 | the setup time needed to initialize the acceleration grid. The <span |
| 62 | style="font-weight: bold;">ARGYLL_REV_ACC_GRID_RES_MULT</span> |
| 63 | environment variable can alter the default resolution by a scale |
| 64 | factor. A value of 0.5 for instance, would halve the resolution |
| 65 | (typically meaning 1/8 th. the total number of grid entries and |
| 66 | memory), while a value of 2.0 would double it, typically resulting |
| 67 | in 8 times the memory usage. Increasing the resolution too much will |
| 68 | reduce the available memory for the reverse cache, and greatly |
| 69 | increase setup time.<br> |
| 70 | <br> |
| 71 | <br> |
| 72 | <br> |
| 73 | <br> |
| 74 | </body> |
| 75 | </html> |