Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C16091798E for ; Wed, 27 May 2015 17:49:20 +0000 (UTC) Received: (qmail 70799 invoked by uid 500); 27 May 2015 17:49:17 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 70757 invoked by uid 500); 27 May 2015 17:49:17 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 70743 invoked by uid 99); 27 May 2015 17:49:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 May 2015 17:49:17 +0000 Date: Wed, 27 May 2015 17:49:17 +0000 (UTC) From: "Josh Elser (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-3853) Contention around ConcurrentLinkedQueue.size() in AsyncSpanReceiver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACCUMULO-3853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14561355#comment-14561355 ] Josh Elser commented on ACCUMULO-3853: -------------------------------------- Yeah, I was feeling that there's likely a better datastructure to do what we want. I'll copy your comment over to ACCUMULO-3854. That's something we can look at changing for 1.8 maybe? > Contention around ConcurrentLinkedQueue.size() in AsyncSpanReceiver > ------------------------------------------------------------------- > > Key: ACCUMULO-3853 > URL: https://issues.apache.org/jira/browse/ACCUMULO-3853 > Project: Accumulo > Issue Type: Bug > Components: trace > Affects Versions: 1.7.0 > Reporter: Josh Elser > Assignee: Josh Elser > Fix For: 1.8.0, 1.7.1 > > Time Spent: 20m > Remaining Estimate: 0h > > Trying to debug slowness in the replication merkle test, I saw a lot of stack traces sitting here: > {noformat} > "replication task 1" #297 daemon prio=5 os_prio=0 tid=0x0000000004624000 nid=0x6b46 runnable [0x00007ff8867b6000] > java.lang.Thread.State: RUNNABLE > at java.util.concurrent.ConcurrentLinkedQueue.size(ConcurrentLinkedQueue.java:450) > at org.apache.accumulo.tracer.AsyncSpanReceiver.receiveSpan(AsyncSpanReceiver.java:171) > at org.apache.htrace.Tracer.deliver(Tracer.java:81) > at org.apache.htrace.impl.MilliSpan.stop(MilliSpan.java:177) > - locked <0x00000000a7fe3560> (a org.apache.htrace.impl.MilliSpan) > at org.apache.htrace.TraceScope.close(TraceScope.java:78) > at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:898) > - locked <0x00000000b0086118> (a org.apache.hadoop.hdfs.DFSInputStream) > at java.io.DataInputStream.readFully(DataInputStream.java:195) > at java.io.DataInputStream.readFully(DataInputStream.java:169) > at org.apache.accumulo.core.data.Mutation.readFields(Mutation.java:965) > at org.apache.accumulo.server.data.ServerMutation.readFields(ServerMutation.java:52) > at org.apache.accumulo.tserver.logger.LogFileValue.readFields(LogFileValue.java:45) > at org.apache.accumulo.tserver.replication.AccumuloReplicaSystem.getWalEdits(AccumuloReplicaSystem.java:702) > at org.apache.accumulo.tserver.replication.AccumuloReplicaSystem$WalClientExecReturn.execute(AccumuloReplicaSystem.java:531) > at org.apache.accumulo.tserver.replication.AccumuloReplicaSystem$WalClientExecReturn.execute(AccumuloReplicaSystem.java:506) > at org.apache.accumulo.core.client.impl.ReplicationClient.executeServicerWithReturn(ReplicationClient.java:189) > at org.apache.accumulo.tserver.replication.AccumuloReplicaSystem.replicateLogs(AccumuloReplicaSystem.java:429) > at org.apache.accumulo.tserver.replication.AccumuloReplicaSystem._replicate(AccumuloReplicaSystem.java:291) > at org.apache.accumulo.tserver.replication.AccumuloReplicaSystem.replicate(AccumuloReplicaSystem.java:212) > at org.apache.accumulo.tserver.replication.ReplicationProcessor.process(ReplicationProcessor.java:134) > at org.apache.accumulo.server.zookeeper.DistributedWorkQueue$1.run(DistributedWorkQueue.java:107) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at org.apache.accumulo.fate.util.LoggingRunnable.run(LoggingRunnable.java:35) > at java.lang.Thread.run(Thread.java:745) > Locked ownable synchronizers: > - <0x00000000b00dbf48> (a java.util.concurrent.ThreadPoolExecutor$Worker) > {noformat} > Seems like this might still be related to HDFS-8069, but one odd thing is that we were sitting in the size() method. > For those who don't remember, size() is a big o N operation on ConcurrentLinkedQueue. Calling the size() method every time we receive a new span is a little nasty. -- This message was sent by Atlassian JIRA (v6.3.4#6332)