0

우리는 8 코어와 50GB 메모리 (단일 작업자)가있는 단일 노드에서 실행되는 2.1.0 독립 실행 형 클러스터를 실행합니다.스파크 독립 실행 형 클러스터 튜닝

우리는 다음과 같은 메모리 설정을 사용하여 클러스터 모드에서 스파크 응용 프로그램을 실행 - 최근

--driver-memory = 7GB (default - 1core is used) 
--worker-memory = 43GB (all remaining cores - 7 cores) 

을, 우리는 집행 살해 자주 드라이버/마스터에 의해 다시 시작하기 관찰했다. 나는 드라이버에 로그 아래에있는 -

17/12/14 03:29:39 WARN HeartbeatReceiver: Removing executor 2 with no recent heartbeats: 3658237 ms exceeds timeout 3600000 ms 
17/12/14 03:29:39 ERROR TaskSchedulerImpl: Lost executor 2 on 10.150.143.81: Executor heartbeat timed out after 3658237 ms 
17/12/14 03:29:39 WARN TaskSetManager: Lost task 23.0 in stage 316.0 (TID 9449, 10.150.143.81, executor 2): ExecutorLostFailure (executor 2 exited caused by one of the running tasks) Reason: Executor heartbeat timed out after 3658237 ms 
17/12/14 03:29:39 WARN TaskSetManager: Lost task 9.0 in stage 318.0 (TID 9459, 10.150.143.81, executor 2): ExecutorLostFailure (executor 2 exited caused by one of the running tasks) Reason: Executor heartbeat timed out after 3658237 ms 
17/12/14 03:29:39 WARN TaskSetManager: Lost task 8.0 in stage 318.0 (TID 9458, 10.150.143.81, executor 2): ExecutorLostFailure (executor 2 exited caused by one of the running tasks) Reason: Executor heartbeat timed out after 3658237 ms 
17/12/14 03:29:39 WARN TaskSetManager: Lost task 5.0 in stage 318.0 (TID 9455, 10.150.143.81, executor 2): ExecutorLostFailure (executor 2 exited caused by one of the running tasks) Reason: Executor heartbeat timed out after 3658237 ms 
17/12/14 03:29:39 WARN TaskSetManager: Lost task 7.0 in stage 318.0 (TID 9457, 10.150.143.81, executor 2): ExecutorLostFailure (executor 2 exited caused by one of the running tasks) Reason: Executor heartbeat timed out after 3658237 ms 

응용 프로그램 때문에 메모리를 많이하지, 조인 및 디렉토리에 데이터 세트를 작성하는 몇 가지가있다. 동일한 코드가 spark-shell에서 아무런 오류없이 실행됩니다.

클러스터 튜닝 또는 실행 프로그램이 종료되는 것을 줄이는 모든 구성 설정을 찾으십시오.

답변

0

실행 프로그램에 메모리 문제가있을 수 있습니다. 그래서 spark-env.sh 파일에 executor 메모리로 코어를 구성해야합니다. 경로 ~/spark/conf/spark-env.sh에서 확인할 수 있습니다. - 총 메모리는 50GB입니다.

export SPARK_WORKER_CORES=8 
export SPARK_WORKER_INSTANCES=5 
export SPARK_WORKER_MEMORY=8G 
export SPARK_EXECUTOR_INSTANCES=2 

그리고 데이터가 너무 커서 처리 할 수없는 경우, u는 spark-default.conf에 드라이버 메모리를 설정할 수 있습니다. ~/spark/conf/spark-default.conf` 파일에서 executor에게 약간의 오버 헤드 메모리를 부여하십시오 : -

spark.executor.memoryOverhead 1G 
spark.driver.memory 1G 
+0

클러스터 설정을 얻지 못했습니다. 단일 노드 클러스터로서 SPARK_WORKER_INSTANCES는 자신의 메모리가없는 노드가 아니면 노드가 될 수 있습니다. 귀하의 구성 요청 - SPARK_WORKER_CORES * SPARK_WORKER_INSTANCES = 8 * 5 = 40 개의 코어를 사용할 수 없다고 생각합니다. 비슷하게 여기에 도움이되지 않는 몇 가지가 있습니다. 답장을 보내 주셔서 감사합니다 :) – veerat

+0

유언 집행 인 메모리 문제가 있습니다. 따라서 집행자에게 오버 헤드 메모리를 제공하십시오. –