[
https://issues.apache.org/jira/browse/HBASE-9393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15110546#comment-15110546
]
Ashish Singhi commented on HBASE-9393:
--------------------------------------
[~anoop.hbase] and [[email protected]] thanks for comment.
I think we are purposefully doing pread here as we are passing value false to
the HFileBlock read. For meta and small scan I see pread is set to true. When
replacing the unbuffer with pread in our internal test we found that there was
a performance degrade of about 9% and with the attached patch there was a
slight(4%) improvement!! with below commands,
{noformat}
hbase org.apache.hadoop.hbase.PerformanceEvaluation --table=TestPerf
--presplit=134 --rows=1000000 randomWrite 14
hbase org.apache.hadoop.hbase.PerformanceEvaluation --table=TestPerf
--rows=1000000 randomRead 14
{noformat}
bq. Or we can just make sure this unbuffer() call happens at the end of the
scan on this HFile. (When StoreFileScanner done with its Cells for the scan and
getting closed)
Yes I am working on it, on first try I saw that CLOSE_WAIT are not getting
closed, I need to dig more in it to find out what is the difference it makes to
close the socket in close call or immediately after the read. I will come up
soon with the result.
[~tedyu], Thanks a lot for checking the test failure and for the help on the
same.
[~vinayrpet], Thanks, will add a check that if stream is instance of
DFSInputStream then only call unbuffer().
> Hbase does not closing a closed socket resulting in many CLOSE_WAIT
> --------------------------------------------------------------------
>
> Key: HBASE-9393
> URL: https://issues.apache.org/jira/browse/HBASE-9393
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.94.2, 0.98.0
> Environment: Centos 6.4 - 7 regionservers/datanodes, 8 TB per node,
> 7279 regions
> Reporter: Avi Zrachya
> Assignee: Ashish Singhi
> Attachments: HBASE-9393.patch
>
>
> HBase dose not close a dead connection with the datanode.
> This resulting in over 60K CLOSE_WAIT and at some point HBase can not connect
> to the datanode because too many mapped sockets from one host to another on
> the same port.
> The example below is with low CLOSE_WAIT count because we had to restart
> hbase to solve the porblem, later in time it will incease to 60-100K sockets
> on CLOSE_WAIT
> [root@hd2-region3 ~]# netstat -nap |grep CLOSE_WAIT |grep 21592 |wc -l
> 13156
> [root@hd2-region3 ~]# ps -ef |grep 21592
> root 17255 17219 0 12:26 pts/0 00:00:00 grep 21592
> hbase 21592 1 17 Aug29 ? 03:29:06
> /usr/java/jdk1.6.0_26/bin/java -XX:OnOutOfMemoryError=kill -9 %p -Xmx8000m
> -ea -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode
> -Dhbase.log.dir=/var/log/hbase
> -Dhbase.log.file=hbase-hbase-regionserver-hd2-region3.swnet.corp.log ...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)