FBUtilities.hash can result in thread contention on call to 
MessageDigest.getInstance()
---------------------------------------------------------------------------------------

                 Key: CASSANDRA-1369
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1369
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
    Affects Versions: 0.6.4
            Reporter: Jason Fager
            Priority: Minor


FBUtilities.hash() calls MessageDigest.getInstance() on every invocation, which 
in turns calls the synchronized method Provider.getService().  
FBUtilities.md5hash() is frequently invoked from RandomPartitioner, and minor 
thread contention in this codepath can be observed when running 
contrib/py_stress against an out-of-box Cassandra installation.

One possible solution is to preallocate md5 MessageDigest instances and store 
them as threadlocals.    

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to