[ 
https://issues.apache.org/jira/browse/SPARK-12196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

yucai updated SPARK-12196:
--------------------------
    Description: 
*Motivation*
Our customers want to use SSD to speed up machine learning and SQL workload, 
but all SSDs are quite expensive and SSD's capacity is still smaller than HDD.

*Proposal*
Our solution is to build tiered storage: use SSDs as cache and HDDs as backup. 
When Spark core allocates blocks (either for shuffle or RDD cache), it stores 
blocks in SSDs first, and when the SSD’s free space is less than some 
threshold, starting to use HDDs.

*Performance Evaluation*
1. At the best case, our solution performs the same as all SSDs.
2. At the worst case, like all data are spilled to HDDs, no performance 
regression.
3. Compared with all HDDs, tiered store improves +x2 for machine learning 
workload and +x1.7 for SparkSQL workload.

*Usage*
1. Enable tiered storage in spark-default.conf.
{code}
spark.diskStore.allocator      tiered
{code}
2. Configure storage hierarchy, for Yarn user, see below example:
{code}
  <property>
    <name>yarn.nodemanager.local-dirs</name>
    <value>/mnt/DP_disk1/yucai/yarn/local,/mnt/DP_disk2/yucai/yarn/local,
           /mnt/DP_disk3/yucai/yarn/local,/mnt/DP_disk4/yucai/yarn/local,
           /mnt/DP_disk5/yucai/yarn/local,/mnt/DP_disk6/yucai/yarn/local,
    </value>
  </property>
  <property>
    <name>yarn.nodemanager.spark-dirs-tiers</name>
    <value>001111</value>
  </property>
{code}
It means DP_disk1-2 are in tier1 and DP_disk2-6 make up tier2.
 
*More tiers*
In our implementation, we support to build any number tiers cross various 
storage medias (NVMe, SSD, HDD etc.). For example:
{code}
  <property>
    <name>yarn.nodemanager.local-dirs</name>
    <value>/mnt/DP_disk1/yucai/yarn/local,/mnt/DP_disk2/yucai/yarn/local,
           /mnt/DP_disk3/yucai/yarn/local,/mnt/DP_disk4/yucai/yarn/local,
           /mnt/DP_disk5/yucai/yarn/local,/mnt/DP_disk6/yucai/yarn/local,
    </value>
  </property>
  <property>
    <name>yarn.nodemanager.spark-dirs-tiers</name>
    <value>001122</value>
  </property>
{code}
It means DP_disk1-2 are in tier1, DP_disk3-4 are in tier2 and DP_disk5-6 make 
up tier3.

  was:
*Motivation*
Our customers want to use SSD to speed up machine learning and SQL workload, 
but all SSDs are quite expensive and SSD's capacity is still smaller than HDD.

*Proposal*
Our solution is to build tiered storage: use SSDs as cache and HDDs as backup. 
When Spark core allocates blocks (either for shuffle or RDD cache), it stores 
blocks in SSDs first, and when the SSD’s free space is less than some 
threshold, starting to use HDDs.

*Performance Evaluation*
1. At the best case, our solution performs the same as all SSDs.
2. At the worst case, like all data are spilled to HDDs, no performance 
regression.
3. Compared with all HDDs, tiered store improves `+x1.86` (it could be higher, 
CPU reaches bottleneck in our test environment).

*Test Environment*
1. 4 IVB box(40 cores, 192GB memory, 10GB Nic, 11HDDs/11SSDs/PCIE SSD) 
2. Test Case: NWeight(graph analysis), which is to compute associations between 
two vertices that are n-hop away(e.g., friend-to-friend or video-to-video 
relationship for recommendation). 
    Data Size: 22GB, Vertices: 41 milion, Edges: 1.4 billion.

*Usage*
1. Enable tiered storage in spark-default.conf.
{code}
spark.diskStore.allocator      tiered
{code}
2. Configure storage hierarchy, for Yarn user, see below example:
{code}
  <property>
    <name>yarn.nodemanager.local-dirs</name>
    <value>/mnt/DP_disk1/yucai/yarn/local,/mnt/DP_disk2/yucai/yarn/local,
           /mnt/DP_disk3/yucai/yarn/local,/mnt/DP_disk4/yucai/yarn/local,
           /mnt/DP_disk5/yucai/yarn/local,/mnt/DP_disk6/yucai/yarn/local,
    </value>
  </property>
  <property>
    <name>yarn.nodemanager.spark-dirs-tiers</name>
    <value>001111</value>
  </property>
{code}
It means DP_disk1-2 are in tier1 and DP_disk2-6 make up tier2.
 
*More tiers*
In our implementation, we support to build any number tiers cross various 
storage medias (NVMe, SSD, HDD etc.). For example:
{code}
  <property>
    <name>yarn.nodemanager.local-dirs</name>
    <value>/mnt/DP_disk1/yucai/yarn/local,/mnt/DP_disk2/yucai/yarn/local,
           /mnt/DP_disk3/yucai/yarn/local,/mnt/DP_disk4/yucai/yarn/local,
           /mnt/DP_disk5/yucai/yarn/local,/mnt/DP_disk6/yucai/yarn/local,
    </value>
  </property>
  <property>
    <name>yarn.nodemanager.spark-dirs-tiers</name>
    <value>001122</value>
  </property>
{code}
It means DP_disk1-2 are in tier1, DP_disk3-4 are in tier2 and DP_disk5-6 make 
up tier3.


> Store/retrieve blocks in different speed storage devices by hierarchy way
> -------------------------------------------------------------------------
>
>                 Key: SPARK-12196
>                 URL: https://issues.apache.org/jira/browse/SPARK-12196
>             Project: Spark
>          Issue Type: New Feature
>          Components: Spark Core
>            Reporter: yucai
>
> *Motivation*
> Our customers want to use SSD to speed up machine learning and SQL workload, 
> but all SSDs are quite expensive and SSD's capacity is still smaller than HDD.
> *Proposal*
> Our solution is to build tiered storage: use SSDs as cache and HDDs as 
> backup. 
> When Spark core allocates blocks (either for shuffle or RDD cache), it stores 
> blocks in SSDs first, and when the SSD’s free space is less than some 
> threshold, starting to use HDDs.
> *Performance Evaluation*
> 1. At the best case, our solution performs the same as all SSDs.
> 2. At the worst case, like all data are spilled to HDDs, no performance 
> regression.
> 3. Compared with all HDDs, tiered store improves +x2 for machine learning 
> workload and +x1.7 for SparkSQL workload.
> *Usage*
> 1. Enable tiered storage in spark-default.conf.
> {code}
> spark.diskStore.allocator      tiered
> {code}
> 2. Configure storage hierarchy, for Yarn user, see below example:
> {code}
>   <property>
>     <name>yarn.nodemanager.local-dirs</name>
>     <value>/mnt/DP_disk1/yucai/yarn/local,/mnt/DP_disk2/yucai/yarn/local,
>            /mnt/DP_disk3/yucai/yarn/local,/mnt/DP_disk4/yucai/yarn/local,
>            /mnt/DP_disk5/yucai/yarn/local,/mnt/DP_disk6/yucai/yarn/local,
>     </value>
>   </property>
>   <property>
>     <name>yarn.nodemanager.spark-dirs-tiers</name>
>     <value>001111</value>
>   </property>
> {code}
> It means DP_disk1-2 are in tier1 and DP_disk2-6 make up tier2.
>  
> *More tiers*
> In our implementation, we support to build any number tiers cross various 
> storage medias (NVMe, SSD, HDD etc.). For example:
> {code}
>   <property>
>     <name>yarn.nodemanager.local-dirs</name>
>     <value>/mnt/DP_disk1/yucai/yarn/local,/mnt/DP_disk2/yucai/yarn/local,
>            /mnt/DP_disk3/yucai/yarn/local,/mnt/DP_disk4/yucai/yarn/local,
>            /mnt/DP_disk5/yucai/yarn/local,/mnt/DP_disk6/yucai/yarn/local,
>     </value>
>   </property>
>   <property>
>     <name>yarn.nodemanager.spark-dirs-tiers</name>
>     <value>001122</value>
>   </property>
> {code}
> It means DP_disk1-2 are in tier1, DP_disk3-4 are in tier2 and DP_disk5-6 make 
> up tier3.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to