<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 3 Apr 2009, at 14:26, Mircea Markus wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Manik Surtani wrote:<br><blockquote type="cite">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.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">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;<br></blockquote><blockquote type="cite">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;<br></blockquote><blockquote type="cite">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.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thoughts/comments?<br></blockquote>I'm just thinking that if we would provide such an config param, it would be hard for the users to grasp it. TBH, even the concurrency level its not very easy to explain, but saying something like "increase it if you see lots of timeouts" should help.<br>Can't we determine it based on the LockManager's concurrency level?</div></blockquote><div><br></div><div>Thats what I mean by a guess. &nbsp;Perhaps a mix of some constant x numCPUs, even.</div><br><blockquote type="cite"><div><br><blockquote type="cite">--<br></blockquote><blockquote type="cite">Manik Surtani<br></blockquote><blockquote type="cite">Lead, JBoss Cache<br></blockquote><blockquote type="cite"><a href="http://www.jbosscache.org">http://www.jbosscache.org</a><br></blockquote><blockquote type="cite">manik@jboss.org &lt;<a href="mailto:manik@jboss.org">mailto:manik@jboss.org</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------------------------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">infinispan-dev mailing list<br></blockquote><blockquote type="cite"><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br></blockquote><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br></blockquote><blockquote type="cite"> &nbsp;<br></blockquote><br></div></blockquote></div><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></body></html>