<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Feeling

        三人行,必有我師焉

       ::  :: 新隨筆 :: 聯系 ::  :: 管理 ::
      185 隨筆 :: 0 文章 :: 392 評論 :: 0 Trackbacks

    spark中有partition的概念(和slice是同一個概念,在spark1.2中官網已經做出了說明),一般每個partition對應一個task。在我的測試過程中,如果沒有設置spark.default.parallelism參數,spark計算出來的partition非常巨大,與我的cores非常不搭。我在兩臺機器上(8cores *2 +6g * 2)上,spark計算出來的partition達到2.8萬個,也就是2.9萬個tasks,每個task完成時間都是幾毫秒或者零點幾毫秒,執行起來非常緩慢。在我嘗試設置了 spark.default.parallelism 后,任務數減少到10,執行一次計算過程從minute降到20second。

    參數可以通過spark_home/conf/spark-default.conf配置文件設置。

    eg.

    spark.master  spark://master:7077 

    spark.default.parallelism  10 

    spark.driver.memory  2g 

    spark.serializer  org.apache.spark.serializer.KryoSerializer 

    spark.sql.shuffle.partitions  50

     

    下面是官網的相關描述:

    from:http://spark.apache.org/docs/latest/configuration.html

    Property NameDefaultMeaning
    spark.default.parallelism For distributed shuffle operations like reduceByKey and join, the largest number of partitions in a parent RDD. For operations likeparallelize with no parent RDDs, it depends on the cluster manager:
    • Local mode: number of cores on the local machine
    • Mesos fine grained mode: 8
    • Others: total number of cores on all executor nodes or 2, whichever is larger
    Default number of partitions in RDDs returned by transformations like joinreduceByKey, and parallelize when not set by user.

    from:http://spark.apache.org/docs/latest/tuning.html

    Level of Parallelism

    Clusters will not be fully utilized unless you set the level of parallelism for each operation high enough. Spark automatically sets the number of “map” tasks to run on each file according to its size (though you can control it through optional parameters to SparkContext.textFile, etc), and for distributed “reduce” operations, such as groupByKey and reduceByKey, it uses the largest parent RDD’s number of partitions. You can pass the level of parallelism as a second argument (see the spark.PairRDDFunctions documentation), or set the config propertyspark.default.parallelism to change the default. In general, we recommend 2-3 tasks per CPU core in your cluster.


    原文地址:http://www.cnblogs.com/wrencai/p/4231966.html

    posted on 2016-09-08 13:07 三人行,必有我師焉 閱讀(2207) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    GitHub |  開源中國社區 |  maven倉庫 |  文件格式轉換 
    主站蜘蛛池模板: 日韩在线视频线视频免费网站| 精品亚洲A∨无码一区二区三区| 亚洲综合av一区二区三区不卡 | 99在线视频免费观看| 免费女人18毛片a级毛片视频| 大桥未久亚洲无av码在线| 在线观看免费污视频| 亚洲av无码成人影院一区| 永久免费毛片手机版在线看| 亚洲免费综合色在线视频| 免费高清在线影片一区| 特级毛片A级毛片100免费播放 | 国产男女猛烈无遮档免费视频网站| 亚洲精品伦理熟女国产一区二区| 好吊妞998视频免费观看在线| 亚洲av无码成人精品区一本二本 | 亚洲制服丝袜精品久久| 99久久这里只精品国产免费| 2017亚洲男人天堂一| 免费看国产一级片| 中文字幕免费在线看线人动作大片 | 亚洲国产精品自在在线观看| 久久狠狠躁免费观看| 亚洲精品国产第1页| 日本19禁啪啪无遮挡免费动图| 亚洲熟伦熟女专区hd高清| 国产午夜免费秋霞影院| 中文字幕免费播放| 亚洲H在线播放在线观看H| 免费a在线观看播放| 无码少妇精品一区二区免费动态 | a级成人免费毛片完整版| 亚洲嫩草影院在线观看| 免费一级特黄特色大片在线 | 一二三四免费观看在线电影| 美女被艹免费视频| 亚洲日本中文字幕| 亚洲高清偷拍一区二区三区| 7m凹凸精品分类大全免费| 亚洲av无码成人影院一区| 亚洲AV日韩AV永久无码久久|