<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This is an attribute in the &lt;locking /> configuration element and is used to define the number of lock stripes used by the LockManager, *if* striped locking is used.<div><br></div><div>Now I wonder whether we need a tuning parameter of this sort in the data container as well. &nbsp;Consider that the SimpleDataContainer is backed by a CHM and the FIFO and LRU variants are backed by something very similar to a CHM (in that there are lockable segments which contain hash tables). &nbsp;In both cases, I use default concurrency levels (16 segments), but maybe this should be configurable too? &nbsp;Should this be a separate attribute, or could "concurrencyLevel" be reused here? &nbsp;</div><div><br></div><div>The way I see it, LockManager needs a higher number of stripes since transactions could span keys that are in > 1 stripe. &nbsp;Segments, however, are only locked for the duration of a write access to the container which is a) typically very short and b) usually limited to the number of active threads, which is related to the number of cores/CPUs. &nbsp;</div><div><br></div><div>Basically, what I am saying is that the latter could probably be guessed/hard coded rather than made configurable, and even if made configurable, is unlikely to be the same as the number of stripes used by the LockManager.</div><div><br></div><div>Thoughts/comments?<br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-infinispantal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-infinispantal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div>Lead, JBoss Cache</div><div><a href="http://www.jbosscache.org">http://www.jbosscache.org</a><br><a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>