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

Liang Xie commented on HDFS-6735:
---------------------------------

This patch includes HDFS-6698 already.
With the source change, the added "testPreadBlockedbyRead" result in my box: 
{code}
grep cost 
hadoop-hdfs-project/hadoop-hdfs/target/surefire-reports/org.apache.hadoop.hdfs.TestPread-output.txt
 
read() cost:5008ms, pread() cost:5ms
{code}

Without the source change(off cause, you still need keep the "readDelay" 
injecting faults in src code), the added "testPreadBlockedbyRead" result in my 
box: 
{code}
read() cost:5009ms, pread() cost:4912ms
{code}

> A minor optimization to avoid pread() be blocked by read() inside the same 
> DFSInputStream
> -----------------------------------------------------------------------------------------
>
>                 Key: HDFS-6735
>                 URL: https://issues.apache.org/jira/browse/HDFS-6735
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs-client
>    Affects Versions: 3.0.0
>            Reporter: Liang Xie
>            Assignee: Liang Xie
>         Attachments: HDFS-6735.txt
>
>
> In current DFSInputStream impl, there're a couple of coarser-grained locks in 
> read/pread path, and it has became a HBase read latency pain point so far. In 
> HDFS-6698, i made a minor patch against the first encourtered lock, around 
> getFileLength, in deed, after reading code and testing, it shows still other 
> locks we could improve.
> In this jira, i'll make a patch against other locks, and a simple test case 
> to show the issue and the improved result.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to