Aug 26, 2010

ColdFusion jrun and the JVM

I have been doing a little work on tuning our jvm on one of our CF8 Standard servers; I have made several changes with advice from others and have seen improvements one setting I see is this:

-Dsun.io.useCanonCaches=false

I'm not sure what this setting is or does if you know can you provide a detailed explanation. Thanks

7 comments:

  1. performance
    optimisation for file names canonicalization
    ReplyDelete
  2. Well this argument seams to be turning it off?
    ReplyDelete
  3. When files are used for IO, the JVM makes a call to getCanonicalPath() to determine the absolute unique path to a given file. Normally the results of these calls are cached in memory making subsequent calls faster. Apparently there was a bug in an earlier JVM which would not return some calls using the proper case which would impact *nix systems. There is also an issue where the canonical path cache can grow to huge levels which can impact other areas of the JVM. Turning the cache off prevents both of these problems, though can cause slightly increased IO activity as canonical paths are constantly being recalculated. On some systems the tradeoff is worth the reduced memory usage and garbage collection requirements to keep the cache clean.
    ReplyDelete
  4. Guess I will not include this argument as we run Windows. Thanks Insrq
    ReplyDelete
  5. Cannonical Paths are relevant on both Windows and *unix JVMS
    ReplyDelete
  6. @Andrew yes of course but Insrq seams to indicate the bug was affecting *nix systems only and it was for older jvm's at this stage I'm still unconvinced I should be adding this setting.
    ReplyDelete
  7. I am not saying you should or it is wise to, but if someone else comes here and reads this they might get the impression that Canonical Paths is a *unix only thing.

    That's all I wanted to mention.
    ReplyDelete