[infinispan-issues] [JBoss JIRA] (ISPN-5962) Implementation of RpcManagerImpl.invokeRemotely causes high CPU usage
Dan Berindei (JIRA)
issues at jboss.org
Wed Nov 25 08:44:00 EST 2015
[ https://issues.jboss.org/browse/ISPN-5962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133766#comment-13133766 ]
Dan Berindei commented on ISPN-5962:
------------------------------------
[~sannegrinovero] the benchmark is attached to this issue :)
The "tasks" I'm waiting for do almost the same thing as the spinning in {{CompletableFuture.get()}}, i.e. generate random values from {{ThreadLocalRandom}}. The difference is I do it a lot more times, to minimize the chance that the task finishes before the spinning.
> Implementation of RpcManagerImpl.invokeRemotely causes high CPU usage
> ---------------------------------------------------------------------
>
> Key: ISPN-5962
> URL: https://issues.jboss.org/browse/ISPN-5962
> Project: Infinispan
> Issue Type: Enhancement
> Components: Core
> Affects Versions: 8.1.0.Beta1
> Reporter: Sanne Grinovero
> Assignee: Pedro Ruivo
> Attachments: CompletableFutureBenchmarks.java
>
>
> The method {{org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(Collection<Address>, ReplicableCommand, RpcOptions)}} is implemented by blocking on a {{CompletableFuture}}, but this then stalls on {{java.util.concurrent.CompletableFuture.waitingGet(boolean)}} by spending a significant amount of CPU time by spinning.
> When implementing RPC calls and having to wait for remote operations, spinning is probably not a good idea. Could we try implementing this in some way to hint towards a more pessimistic lock?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the infinispan-issues
mailing list