[ https://issues.apache.org/jira/browse/CASSANDRA-1369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams updated CASSANDRA-1369: ---------------------------------------- Attachment: 1369.txt Patch to use the threadlocal approach. > 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 > Reporter: Jason Fager > Assignee: Brandon Williams > Priority: Minor > Fix For: 0.7.1 > > Attachments: 1369.txt > > > 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.