[infinispan-dev] ClockService
Bela Ban
bban at redhat.com
Wed Jan 30 03:47:06 EST 2013
On 1/30/13 1:45 AM, Manik Surtani wrote:
>
> On 29 Jan 2013, at 18:27, Mircea Markus <mmarkus at redhat.com
> <mailto:mmarkus at redhat.com>> wrote:
>
>> I guess Bela's question was about why System. currentTimeMillis()
>> would trigger a context switch, I'm also curious about that one :-)
>
> On its own it doesn't. But if we have a cached clock with a scheduled
> thread updating that cached value periodically, that happens in an
> async thread.
Just make sure you have 7 long variables between the cached var and the
next var, so they're on different cache lines... :-) This is what the
Disruptor does. What if a cache line is > 64 bytes ?
The Oracle article wasn't good IMO, so what's the problem again ? The
slowness of System.currentTimsMillis()/nanoTime() ? Does this have an
impact on overall Infinispan performance at all ?
--
Bela Ban, JGroups lead (http://www.jgroups.org)
More information about the infinispan-dev
mailing list