hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wujinhu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HADOOP-15027) Improvements for Hadoop read from AliyunOSS
Date Tue, 14 Nov 2017 16:28:00 GMT

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

wujinhu edited comment on HADOOP-15027 at 11/14/17 4:27 PM:
------------------------------------------------------------

[~uncleGen] [~stevel@apache.org]
I have set up hadoop env in Tencent cloud server, and read data from Aliyun OSS via hadoop
command
file size: 104MB, 
When I tested aggressive random read, I divided this file into multipart(each part is 1MB)
and shuffle all the parts to read.

{code:java}
public static final String MULTIPART_DOWNLOAD_SIZE_KEY = "fs.oss.multipart.download.size";

public static final long MULTIPART_DOWNLOAD_SIZE_DEFAULT = 1 * 1024 * 1024;
{code}

Current version
ubuntu@VM-0-11-ubuntu:~/hadoop-3.0.0-beta1$ date; hadoop fs -cat oss://hadoop-on-oss/hadoop/wordcount/wordcount_bigdata_100M.txt
> /dev/null; date
Tue Nov 14 15:47:27 CST 2017
Tue Nov 14 15:48:47 CST 2017
80s

After optimized by multi-thread prefetch
-----------------------------------
fs.oss.multipart.download.ahead.part.max.number = 1
fs.oss.multipart.download.threads = 4
sequential IO:  77s
random IO: 74.51s

-----------------------------------
fs.oss.multipart.download.ahead.part.max.number = 8
fs.oss.multipart.download.threads = 4
sequential IO: 23s
random IO:  59.128

-----------------------------------
fs.oss.multipart.download.ahead.part.max.number = 16
fs.oss.multipart.download.threads = 4
sequential IO: 19s
random IO: 83.92

-----------------------------------
fs.oss.multipart.download.ahead.part.max.number = 16
fs.oss.multipart.download.threads = 8
sequential IO: 13s(continue to test this, already reach the upper limit of the network)
random IO: 50.561

Summaries:
* if read ahead part number = 1, sequential IO and random IO are the same since there is no
pre-fetch
* sequential IO will be better if read ahead part number and thread number increases
* worst case of random IO will be something like [sequential ... sequential, random, sequential
... sequential, random.....] so that some pre-fetch data will be wasted.


was (Author: wujinhu):
[~uncleGen] [~stevel@apache.org]
I have set up hadoop env in Tencent cloud server, and read data from Aliyun OSS via hadoop
command
file size: 104MB, 
When I tested aggressive random read, I divided this file into multipart(each part is 1MB)
and shuffle all the parts to read.

{code:java}
public static final String MULTIPART_DOWNLOAD_SIZE_KEY = "fs.oss.multipart.download.size";

public static final long MULTIPART_DOWNLOAD_SIZE_DEFAULT = 1 * 1024 * 1024;
{code}

Current version
ubuntu@VM-0-11-ubuntu:~/hadoop-3.0.0-beta1$ date; hadoop fs -cat oss://hadoop-on-oss/hadoop/wordcount/wordcount_bigdata_100M.txt
> /dev/null; date
Tue Nov 14 15:47:27 CST 2017
Tue Nov 14 15:48:47 CST 2017
80s

After optimized by multi-thread prefetch
-----------------------------------
fs.oss.multipart.download.ahead.part.max.number = 1
fs.oss.multipart.download.threads = 4
sequential IO:  77s
random IO: 74.51s

-----------------------------------
fs.oss.multipart.download.ahead.part.max.number = 8
fs.oss.multipart.download.threads = 4
sequential IO: 23s
random IO:  59.128

-----------------------------------
fs.oss.multipart.download.ahead.part.max.number = 16
fs.oss.multipart.download.threads = 4
sequential IO: 19s
random IO: 83.92

-----------------------------------
fs.oss.multipart.download.ahead.part.max.number = 16
fs.oss.multipart.download.threads = 8
sequential IO: 13s
random IO: 50.561

Summaries:
* if read ahead part number = 1, sequential IO and random IO are the same since there is no
pre-fetch
* sequential IO will be better if read ahead part number and thread number increases
* worst case of random IO will be something like [sequential ... sequential, random, sequential
... sequential, random.....] so that some pre-fetch data will be wasted.

> Improvements for Hadoop read from AliyunOSS
> -------------------------------------------
>
>                 Key: HADOOP-15027
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15027
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/oss
>    Affects Versions: 3.0.0
>            Reporter: wujinhu
>            Assignee: wujinhu
>         Attachments: HADOOP-15027.001.patch, HADOOP-15027.002.patch, HADOOP-15027.003.patch
>
>
> Currently, read performance is poor when Hadoop reads from AliyunOSS. It needs about
1min to read 1GB from OSS.
> Class AliyunOSSInputStream uses single thread to read data from AliyunOSS,  so we can
refactor this by using multi-thread pre read to improve this.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message