[
https://issues.apache.org/jira/browse/HDFS-1605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13837462#comment-13837462
]
Liang Xie commented on HDFS-1605:
---------------------------------
we observed this hotspot in our production cluster these days. Most of the
waiting lock threads jsut like below:
19205.637:"IPC Server handler 27 on 12600" daemon prio=10
tid=0x00007f82fc1e5750 nid=0x4d9b waiting for monitor entry [0x00007f821fe78000]
19205.637- java.lang.Thread.State: BLOCKED (on object monitor)
19205.637- at
org.apache.hadoop.hdfs.DFSInputStream.getFileLength(DFSInputStream.java:242)
19205.637- - waiting to lock <0x000000044e20d238> (a
org.apache.hadoop.hdfs.DFSInputStream)
19205.637- at
org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:982)
19205.637- at
org.apache.hadoop.fs.FSDataInputStream.read(FSDataInputStream.java:73)
19205.637- at
org.apache.hadoop.hbase.io.hfile.HFileBlock$AbstractFSReader.readAtOffset(HFileBlock.java:1393)
and the lock holder is doing the right read things that time.
> Convert DFSInputStream synchronized sections to a ReadWrite lock
> ----------------------------------------------------------------
>
> Key: HDFS-1605
> URL: https://issues.apache.org/jira/browse/HDFS-1605
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs-client
> Reporter: dhruba borthakur
> Assignee: dhruba borthakur
> Attachments: DFSClientRWlock.1.txt, DFSClientRWlock.3.txt
>
>
> Hbase does concurrent preads from multiple threads to different blocks of the
> same hdfs file. Each of these pread calls invoke
> DFSInputStream.getFileLength() and DFSInputStream.getBlockAt(). These methods
> are "synchronized", thus causing all the concurrent threads to serialize. It
> would help performance to convert this to a Read/Write lock
--
This message was sent by Atlassian JIRA
(v6.1#6144)