[jira] [Commented] (HDFS-14541) ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of the frequent thrown NoSuchElementException in our HBase benchmark

2019-06-24 Thread Wei-Chiu Chuang (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16871737#comment-16871737
 ] 

Wei-Chiu Chuang commented on HDFS-14541:


[~elgoiri] please follow the instruction here to add yourself to the Github 
Apache member.
https://reference.apache.org/committer/github

Basically, you would need to go to gitbox to link your apache account with the 
github account https://gitbox.apache.org/setup/


> ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of 
> the frequent thrown NoSuchElementException  in our HBase benchmark
> 
>
> Key: HDFS-14541
> URL: https://issues.apache.org/jira/browse/HDFS-14541
> Project: Hadoop HDFS
>  Issue Type: Bug
>Reporter: Zheng Hu
>Assignee: Lisheng Sun
>Priority: Major
> Attachments: HDFS-14541.000.patch, HDFS-14541.001.patch, 
> HDFS-14541.002.patch, after-QPS.png, after-cpu-flame-graph.svg, 
> after-heap-flame-graph.svg, async-prof-pid-94152-alloc-2.svg, 
> async-prof-pid-94152-cpu-1.svg, before-QPS.png, before-cpu-flame-graph.svg, 
> before-heap-flame-graph.svg
>
>
> Our XiaoMi HBase team are evaluating the performence improvement of 
> HBASE-21879,  and we have few CPU flame graph  & heap flame graph by using 
> async-profiler,  and find that there're some performence issues in DFSClient  
> . 
> See the attached two flame graphs, we can conclude that the try catch block 
> in ShortCircuitCache#trimEvictionMaps  has some serious perf problem , we 
> should remove the try catch from DFSClient. 
> {code}
>   /**
>* Trim the eviction lists.
>*/
>   private void trimEvictionMaps() {
> long now = Time.monotonicNow();
> demoteOldEvictableMmaped(now);
> while (true) {
>   long evictableSize = evictable.size();
>   long evictableMmappedSize = evictableMmapped.size();
>   if (evictableSize + evictableMmappedSize <= maxTotalSize) {
> return;
>   }
>   ShortCircuitReplica replica;
>   try {
> if (evictableSize == 0) {
>   replica = (ShortCircuitReplica)evictableMmapped.get(evictableMmapped
>   .firstKey());
> } else {
>   replica = (ShortCircuitReplica)evictable.get(evictable.firstKey());
> }
>   } catch (NoSuchElementException e) {
> break;
>   }
>   if (LOG.isTraceEnabled()) {
> LOG.trace(this + ": trimEvictionMaps is purging " + replica +
> StringUtils.getStackTrace(Thread.currentThread()));
>   }
>   purge(replica);
> }
>   }
> {code}
> Our Xiaomi HDFS Team member [~leosun08] will prepare patch for this issue.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-14541) ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of the frequent thrown NoSuchElementException in our HBase benchmark

2019-06-24 Thread JIRA


[ 
https://issues.apache.org/jira/browse/HDFS-14541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16871734#comment-16871734
 ] 

Íñigo Goiri commented on HDFS-14541:


Is there any documentation to the GitHub PR process for committing?
I gave the LGTM there but not sure how this is done with Hadoop PRs.
FWIW, +1.

> ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of 
> the frequent thrown NoSuchElementException  in our HBase benchmark
> 
>
> Key: HDFS-14541
> URL: https://issues.apache.org/jira/browse/HDFS-14541
> Project: Hadoop HDFS
>  Issue Type: Bug
>Reporter: Zheng Hu
>Assignee: Lisheng Sun
>Priority: Major
> Attachments: HDFS-14541.000.patch, HDFS-14541.001.patch, 
> HDFS-14541.002.patch, after-QPS.png, after-cpu-flame-graph.svg, 
> after-heap-flame-graph.svg, async-prof-pid-94152-alloc-2.svg, 
> async-prof-pid-94152-cpu-1.svg, before-QPS.png, before-cpu-flame-graph.svg, 
> before-heap-flame-graph.svg
>
>
> Our XiaoMi HBase team are evaluating the performence improvement of 
> HBASE-21879,  and we have few CPU flame graph  & heap flame graph by using 
> async-profiler,  and find that there're some performence issues in DFSClient  
> . 
> See the attached two flame graphs, we can conclude that the try catch block 
> in ShortCircuitCache#trimEvictionMaps  has some serious perf problem , we 
> should remove the try catch from DFSClient. 
> {code}
>   /**
>* Trim the eviction lists.
>*/
>   private void trimEvictionMaps() {
> long now = Time.monotonicNow();
> demoteOldEvictableMmaped(now);
> while (true) {
>   long evictableSize = evictable.size();
>   long evictableMmappedSize = evictableMmapped.size();
>   if (evictableSize + evictableMmappedSize <= maxTotalSize) {
> return;
>   }
>   ShortCircuitReplica replica;
>   try {
> if (evictableSize == 0) {
>   replica = (ShortCircuitReplica)evictableMmapped.get(evictableMmapped
>   .firstKey());
> } else {
>   replica = (ShortCircuitReplica)evictable.get(evictable.firstKey());
> }
>   } catch (NoSuchElementException e) {
> break;
>   }
>   if (LOG.isTraceEnabled()) {
> LOG.trace(this + ": trimEvictionMaps is purging " + replica +
> StringUtils.getStackTrace(Thread.currentThread()));
>   }
>   purge(replica);
> }
>   }
> {code}
> Our Xiaomi HDFS Team member [~leosun08] will prepare patch for this issue.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-14541) ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of the frequent thrown NoSuchElementException in our HBase benchmark

2019-06-24 Thread Lisheng Sun (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16871108#comment-16871108
 ] 

Lisheng Sun commented on HDFS-14541:


[~elgoiri] [~jojochuang] Could you help review this patch? Thank you.

> ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of 
> the frequent thrown NoSuchElementException  in our HBase benchmark
> 
>
> Key: HDFS-14541
> URL: https://issues.apache.org/jira/browse/HDFS-14541
> Project: Hadoop HDFS
>  Issue Type: Bug
>Reporter: Zheng Hu
>Assignee: Lisheng Sun
>Priority: Major
> Attachments: HDFS-14541.000.patch, HDFS-14541.001.patch, 
> after-QPS.png, after-cpu-flame-graph.svg, after-heap-flame-graph.svg, 
> async-prof-pid-94152-alloc-2.svg, async-prof-pid-94152-cpu-1.svg, 
> before-QPS.png, before-cpu-flame-graph.svg, before-heap-flame-graph.svg
>
>
> Our XiaoMi HBase team are evaluating the performence improvement of 
> HBASE-21879,  and we have few CPU flame graph  & heap flame graph by using 
> async-profiler,  and find that there're some performence issues in DFSClient  
> . 
> See the attached two flame graphs, we can conclude that the try catch block 
> in ShortCircuitCache#trimEvictionMaps  has some serious perf problem , we 
> should remove the try catch from DFSClient. 
> {code}
>   /**
>* Trim the eviction lists.
>*/
>   private void trimEvictionMaps() {
> long now = Time.monotonicNow();
> demoteOldEvictableMmaped(now);
> while (true) {
>   long evictableSize = evictable.size();
>   long evictableMmappedSize = evictableMmapped.size();
>   if (evictableSize + evictableMmappedSize <= maxTotalSize) {
> return;
>   }
>   ShortCircuitReplica replica;
>   try {
> if (evictableSize == 0) {
>   replica = (ShortCircuitReplica)evictableMmapped.get(evictableMmapped
>   .firstKey());
> } else {
>   replica = (ShortCircuitReplica)evictable.get(evictable.firstKey());
> }
>   } catch (NoSuchElementException e) {
> break;
>   }
>   if (LOG.isTraceEnabled()) {
> LOG.trace(this + ": trimEvictionMaps is purging " + replica +
> StringUtils.getStackTrace(Thread.currentThread()));
>   }
>   purge(replica);
> }
>   }
> {code}
> Our Xiaomi HDFS Team member [~leosun08] will prepare patch for this issue.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-14541) ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of the frequent thrown NoSuchElementException in our HBase benchmark

2019-06-18 Thread Lisheng Sun (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16866552#comment-16866552
 ] 

Lisheng Sun commented on HDFS-14541:


Thanks for looking into this, [~elgoiri] .Your analysis makes sense to me. I 
update the patch.

 

> ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of 
> the frequent thrown NoSuchElementException  in our HBase benchmark
> 
>
> Key: HDFS-14541
> URL: https://issues.apache.org/jira/browse/HDFS-14541
> Project: Hadoop HDFS
>  Issue Type: Bug
>Reporter: Zheng Hu
>Assignee: Lisheng Sun
>Priority: Major
> Attachments: HDFS-14541.000.patch, after-QPS.png, 
> after-cpu-flame-graph.svg, after-heap-flame-graph.svg, 
> async-prof-pid-94152-alloc-2.svg, async-prof-pid-94152-cpu-1.svg, 
> before-QPS.png, before-cpu-flame-graph.svg, before-heap-flame-graph.svg
>
>
> Our XiaoMi HBase team are evaluating the performence improvement of 
> HBASE-21879,  and we have few CPU flame graph  & heap flame graph by using 
> async-profiler,  and find that there're some performence issues in DFSClient  
> . 
> See the attached two flame graphs, we can conclude that the try catch block 
> in ShortCircuitCache#trimEvictionMaps  has some serious perf problem , we 
> should remove the try catch from DFSClient. 
> {code}
>   /**
>* Trim the eviction lists.
>*/
>   private void trimEvictionMaps() {
> long now = Time.monotonicNow();
> demoteOldEvictableMmaped(now);
> while (true) {
>   long evictableSize = evictable.size();
>   long evictableMmappedSize = evictableMmapped.size();
>   if (evictableSize + evictableMmappedSize <= maxTotalSize) {
> return;
>   }
>   ShortCircuitReplica replica;
>   try {
> if (evictableSize == 0) {
>   replica = (ShortCircuitReplica)evictableMmapped.get(evictableMmapped
>   .firstKey());
> } else {
>   replica = (ShortCircuitReplica)evictable.get(evictable.firstKey());
> }
>   } catch (NoSuchElementException e) {
> break;
>   }
>   if (LOG.isTraceEnabled()) {
> LOG.trace(this + ": trimEvictionMaps is purging " + replica +
> StringUtils.getStackTrace(Thread.currentThread()));
>   }
>   purge(replica);
> }
>   }
> {code}
> Our Xiaomi HDFS Team member [~leosun08] will prepare patch for this issue.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-14541) ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of the frequent thrown NoSuchElementException in our HBase benchmark

2019-06-18 Thread Hadoop QA (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16866473#comment-16866473
 ] 

Hadoop QA commented on HDFS-14541:
--

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m  
0s{color} | {color:blue} Docker mode activated. {color} |
| {color:red}-1{color} | {color:red} patch {color} | {color:red}  0m  6s{color} 
| {color:red} HDFS-14541 does not apply to trunk. Rebase required? Wrong 
Branch? See https://wiki.apache.org/hadoop/HowToContribute for help. {color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Issue | HDFS-14541 |
| Console output | 
https://builds.apache.org/job/PreCommit-HDFS-Build/26991/console |
| Powered by | Apache Yetus 0.8.0   http://yetus.apache.org |


This message was automatically generated.



> ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of 
> the frequent thrown NoSuchElementException  in our HBase benchmark
> 
>
> Key: HDFS-14541
> URL: https://issues.apache.org/jira/browse/HDFS-14541
> Project: Hadoop HDFS
>  Issue Type: Bug
>Reporter: Zheng Hu
>Assignee: Lisheng Sun
>Priority: Major
> Attachments: HDFS-14541.000.patch, after-QPS.png, 
> after-cpu-flame-graph.svg, after-heap-flame-graph.svg, 
> async-prof-pid-94152-alloc-2.svg, async-prof-pid-94152-cpu-1.svg, 
> before-QPS.png, before-cpu-flame-graph.svg, before-heap-flame-graph.svg
>
>
> Our XiaoMi HBase team are evaluating the performence improvement of 
> HBASE-21879,  and we have few CPU flame graph  & heap flame graph by using 
> async-profiler,  and find that there're some performence issues in DFSClient  
> . 
> See the attached two flame graphs, we can conclude that the try catch block 
> in ShortCircuitCache#trimEvictionMaps  has some serious perf problem , we 
> should remove the try catch from DFSClient. 
> {code}
>   /**
>* Trim the eviction lists.
>*/
>   private void trimEvictionMaps() {
> long now = Time.monotonicNow();
> demoteOldEvictableMmaped(now);
> while (true) {
>   long evictableSize = evictable.size();
>   long evictableMmappedSize = evictableMmapped.size();
>   if (evictableSize + evictableMmappedSize <= maxTotalSize) {
> return;
>   }
>   ShortCircuitReplica replica;
>   try {
> if (evictableSize == 0) {
>   replica = (ShortCircuitReplica)evictableMmapped.get(evictableMmapped
>   .firstKey());
> } else {
>   replica = (ShortCircuitReplica)evictable.get(evictable.firstKey());
> }
>   } catch (NoSuchElementException e) {
> break;
>   }
>   if (LOG.isTraceEnabled()) {
> LOG.trace(this + ": trimEvictionMaps is purging " + replica +
> StringUtils.getStackTrace(Thread.currentThread()));
>   }
>   purge(replica);
> }
>   }
> {code}
> Our Xiaomi HDFS Team member [~leosun08] will prepare patch for this issue.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-14541) ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of the frequent thrown NoSuchElementException in our HBase benchmark

2019-06-18 Thread Zheng Hu (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16866472#comment-16866472
 ] 

Zheng Hu commented on HDFS-14541:
-

Our XiaoMi HBase Team have made a performance testing, the only difference is 
whether include this patch or not.  (BTW, we build a clusters with 5 nodes, 
each nodes have 800GB * 12 SSD, the HBase use 50G onheap + 50GB offheap. For 
addressing difference of this JIRA, we've disabled the blockCache so that all 
QPS directed to HDFS client. )

|| Case || Heap FlameGraph || CPU FlameGraph || HBase QPS & Latency ||
| Before Case | 
[before-heap-flame-graph.svg|https://issues.apache.org/jira/secure/attachment/12972068/before-heap-flame-graph.svg]
  | 
[before-cpu-flame-graph.svg|https://issues.apache.org/jira/secure/attachment/12972069/before-cpu-flame-graph.svg]
  | 
[before-QPS.png|https://issues.apache.org/jira/secure/attachment/12972067/before-QPS.png]
   |  
| After Case | 
[after-heap-flame-graph.svg|https://issues.apache.org/jira/secure/attachment/12972071/after-heap-flame-graph.svg]
 | 
[after-cpu-flame-graph.svg|https://issues.apache.org/jira/secure/attachment/12972072/after-cpu-flame-graph.svg]
  |  
[after-QPS.png|https://issues.apache.org/jira/secure/attachment/12972070/after-QPS.png]
  | 

We can clearly see that:  after the patch, the HBase throughput increased about 
17.8% ( math: (33K qps - 28K qps) / 28Kqps  ~ 17.8%) .  Also the 6% cpu & heap 
cost in flame graph disappeared, those are very good points. 
[~elgoiri],  I think [~leosun08]  is preparing the new patch to address your 
comment.  Thanks.

> ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of 
> the frequent thrown NoSuchElementException  in our HBase benchmark
> 
>
> Key: HDFS-14541
> URL: https://issues.apache.org/jira/browse/HDFS-14541
> Project: Hadoop HDFS
>  Issue Type: Bug
>Reporter: Zheng Hu
>Assignee: Lisheng Sun
>Priority: Major
> Attachments: HDFS-14541.000.patch, after-QPS.png, 
> after-cpu-flame-graph.svg, after-heap-flame-graph.svg, 
> async-prof-pid-94152-alloc-2.svg, async-prof-pid-94152-cpu-1.svg, 
> before-QPS.png, before-cpu-flame-graph.svg, before-heap-flame-graph.svg
>
>
> Our XiaoMi HBase team are evaluating the performence improvement of 
> HBASE-21879,  and we have few CPU flame graph  & heap flame graph by using 
> async-profiler,  and find that there're some performence issues in DFSClient  
> . 
> See the attached two flame graphs, we can conclude that the try catch block 
> in ShortCircuitCache#trimEvictionMaps  has some serious perf problem , we 
> should remove the try catch from DFSClient. 
> {code}
>   /**
>* Trim the eviction lists.
>*/
>   private void trimEvictionMaps() {
> long now = Time.monotonicNow();
> demoteOldEvictableMmaped(now);
> while (true) {
>   long evictableSize = evictable.size();
>   long evictableMmappedSize = evictableMmapped.size();
>   if (evictableSize + evictableMmappedSize <= maxTotalSize) {
> return;
>   }
>   ShortCircuitReplica replica;
>   try {
> if (evictableSize == 0) {
>   replica = (ShortCircuitReplica)evictableMmapped.get(evictableMmapped
>   .firstKey());
> } else {
>   replica = (ShortCircuitReplica)evictable.get(evictable.firstKey());
> }
>   } catch (NoSuchElementException e) {
> break;
>   }
>   if (LOG.isTraceEnabled()) {
> LOG.trace(this + ": trimEvictionMaps is purging " + replica +
> StringUtils.getStackTrace(Thread.currentThread()));
>   }
>   purge(replica);
> }
>   }
> {code}
> Our Xiaomi HDFS Team member [~leosun08] will prepare patch for this issue.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-14541) ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of the frequent thrown NoSuchElementException in our HBase benchmark

2019-06-17 Thread JIRA


[ 
https://issues.apache.org/jira/browse/HDFS-14541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16865764#comment-16865764
 ] 

Íñigo Goiri commented on HDFS-14541:


Thanks [~leosun08] for the patch.
Handling these scenarios through exception is always a bad idea; thanks for 
finding this.
As we are cleaning this up, I would get rid of the {{while(true)}} and make it 
{{while(!evictable.isEmpty())}}.
For the other while loop, similarly: {{while (evictable.size() + 
evictableMmapped.isEmpty() > maxTotalSize)}}.

I have to say that this class in general could use some cleanup.
I'm sure we can do better than have a map that saves both longs and 
{{ShortCircuitReplica}}.

For the code in lines 541-551 I would extend the comment.
Probably we could extend the javadoc explaining the ideas.

I'm not that familiar with this code so... how is the test coverage in this 
area?
Are we covering the corner cases here?


> ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of 
> the frequent thrown NoSuchElementException  in our HBase benchmark
> 
>
> Key: HDFS-14541
> URL: https://issues.apache.org/jira/browse/HDFS-14541
> Project: Hadoop HDFS
>  Issue Type: Bug
>Reporter: Zheng Hu
>Assignee: Lisheng Sun
>Priority: Major
> Attachments: HDFS-14541.000.patch, async-prof-pid-94152-alloc-2.svg, 
> async-prof-pid-94152-cpu-1.svg
>
>
> Our XiaoMi HBase team are evaluating the performence improvement of 
> HBASE-21879,  and we have few CPU flame graph  & heap flame graph by using 
> async-profiler,  and find that there're some performence issues in DFSClient  
> . 
> See the attached two flame graphs, we can conclude that the try catch block 
> in ShortCircuitCache#trimEvictionMaps  has some serious perf problem , we 
> should remove the try catch from DFSClient. 
> {code}
>   /**
>* Trim the eviction lists.
>*/
>   private void trimEvictionMaps() {
> long now = Time.monotonicNow();
> demoteOldEvictableMmaped(now);
> while (true) {
>   long evictableSize = evictable.size();
>   long evictableMmappedSize = evictableMmapped.size();
>   if (evictableSize + evictableMmappedSize <= maxTotalSize) {
> return;
>   }
>   ShortCircuitReplica replica;
>   try {
> if (evictableSize == 0) {
>   replica = (ShortCircuitReplica)evictableMmapped.get(evictableMmapped
>   .firstKey());
> } else {
>   replica = (ShortCircuitReplica)evictable.get(evictable.firstKey());
> }
>   } catch (NoSuchElementException e) {
> break;
>   }
>   if (LOG.isTraceEnabled()) {
> LOG.trace(this + ": trimEvictionMaps is purging " + replica +
> StringUtils.getStackTrace(Thread.currentThread()));
>   }
>   purge(replica);
> }
>   }
> {code}
> Our Xiaomi HDFS Team member [~leosun08] will prepare patch for this issue.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-14541) ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of the frequent thrown NoSuchElementException in our HBase benchmark

2019-06-17 Thread Hadoop QA (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16865410#comment-16865410
 ] 

Hadoop QA commented on HDFS-14541:
--

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
13s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:red}-1{color} | {color:red} test4tests {color} | {color:red}  0m  
0s{color} | {color:red} The patch doesn't appear to include any new or modified 
tests. Please justify why no new tests are needed for this patch. Also please 
list what manual steps were performed to verify this patch. {color} |
|| || || || {color:brown} trunk Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 16m 
46s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
38s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
23s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 
45s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
11m 55s{color} | {color:green} branch has no errors when building and testing 
our client artifacts. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  1m 
37s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
24s{color} | {color:green} trunk passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
38s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
34s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
34s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
15s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 
40s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} whitespace {color} | {color:red}  0m  
0s{color} | {color:red} The patch has 1 line(s) that end in whitespace. Use git 
apply --whitespace=fix <>. Refer https://git-scm.com/docs/git-apply 
{color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
11m 29s{color} | {color:green} patch has no errors when building and testing 
our client artifacts. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  1m 
42s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
22s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  1m 
49s{color} | {color:green} hadoop-hdfs-client in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
26s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 51m  6s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:bdbca0e |
| JIRA Issue | HDFS-14541 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12971932/HDFS-14541.000.patch |
| Optional Tests |  dupname  asflicense  compile  javac  javadoc  mvninstall  
mvnsite  unit  shadedclient  findbugs  checkstyle  |
| uname | Linux cd90279f167d 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 
10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/patchprocess/precommit/personality/provided.sh |
| git revision | trunk / ba681bb |
| maven | version: Apache Maven 3.3.9 |
| Default Java | 1.8.0_212 |
| findbugs | v3.1.0-RC1 |
| whitespace | 
https://builds.apache.org/job/PreCommit-HDFS-Build/26969/artifact/out/whitespace-eol.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HDFS-Build/26969/testReport/ |
| Max. process+thread count | 414 (vs. ulimit of 1) |
| modules | C: hadoop-hdfs-project/hadoop-hdfs-client U: 
hadoop-hdfs-project/hadoop-hdfs-client |
| Console output | 

[jira] [Commented] (HDFS-14541) ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of the frequent thrown NoSuchElementException in our HBase benchmark

2019-06-12 Thread Lisheng Sun (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16861789#comment-16861789
 ] 

Lisheng Sun commented on HDFS-14541:


Hi [~jojochuang], Mind you help to grant the JIRA permission to me. I am 
working on this issue and have a patch tested.Will attach it to this JIRA. 
Thanks.

> ShortCircuitReplica#unref cost about 6% cpu and 6% heap allocation because of 
> the frequent thrown NoSuchElementException  in our HBase benchmark
> 
>
> Key: HDFS-14541
> URL: https://issues.apache.org/jira/browse/HDFS-14541
> Project: Hadoop HDFS
>  Issue Type: Bug
>Reporter: Zheng Hu
>Priority: Major
> Attachments: async-prof-pid-94152-alloc-2.svg, 
> async-prof-pid-94152-cpu-1.svg
>
>
> Our XiaoMi HBase team are evaluating the performence improvement of 
> HBASE-21879,  and we have few CPU flame graph  & heap flame graph by using 
> async-profiler,  and find that there're some performence issues in DFSClient  
> . 
> See the attached two flame graphs, we can conclude that the try catch block 
> in ShortCircuitCache#trimEvictionMaps  has some serious perf problem , we 
> should remove the try catch from DFSClient. 
> {code}
>   /**
>* Trim the eviction lists.
>*/
>   private void trimEvictionMaps() {
> long now = Time.monotonicNow();
> demoteOldEvictableMmaped(now);
> while (true) {
>   long evictableSize = evictable.size();
>   long evictableMmappedSize = evictableMmapped.size();
>   if (evictableSize + evictableMmappedSize <= maxTotalSize) {
> return;
>   }
>   ShortCircuitReplica replica;
>   try {
> if (evictableSize == 0) {
>   replica = (ShortCircuitReplica)evictableMmapped.get(evictableMmapped
>   .firstKey());
> } else {
>   replica = (ShortCircuitReplica)evictable.get(evictable.firstKey());
> }
>   } catch (NoSuchElementException e) {
> break;
>   }
>   if (LOG.isTraceEnabled()) {
> LOG.trace(this + ": trimEvictionMaps is purging " + replica +
> StringUtils.getStackTrace(Thread.currentThread()));
>   }
>   purge(replica);
> }
>   }
> {code}
> Our Xiaomi HDFS Team member [~leosun08] will prepare patch for this issue.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org