-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #201 from julienrf/align-ansible-setup
Align the scaling strategy of the Ansible-based setup with the other setups
- Loading branch information
Showing
12 changed files
with
51 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
source spark-env | ||
$SPARK_HOME/sbin/start-slave.sh spark://$SPARK_MASTER_HOST:7077 $SLAVESIZE | ||
$SPARK_HOME/sbin/start-worker.sh spark://$SPARK_MASTER_HOST:7077 $SLAVESIZE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
source spark-env | ||
$SPARK_HOME/sbin/stop-slave.sh | ||
$SPARK_HOME/sbin/stop-worker.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,13 @@ | ||
################################################################################################################## | ||
# Master node requires a lot of memory. We allocate 64G for the driver to avoid OOM when | ||
# there are a lot of tasks. | ||
# | ||
# For this example, we're not using any workers on master. | ||
# so CORES = 0 and SPARK_WORKER_INSTANCES = 0. | ||
# | ||
# MEMORY is used in the spark-submit job and allocates the memory per executor. | ||
# You can have one or more executors per worker. | ||
# | ||
# By using multiple workers on an instance, we can control the velocity of the migration. | ||
# | ||
# Eg. | ||
# Target system is 3 x i4i.4xlarge (16 vCPU, 128G) | ||
# We can provision 3 x i4i.2xlarge (8vCPU, 64G) | ||
# | ||
# SPARK_WORKER_INSTANCES = 1 | ||
# CORES = 4 | ||
# MEMORY = 8G (4 cores per worker * 2G) | ||
# | ||
# Start 1 worker per node, or one at a time. | ||
# - Monitor the pressure on the source system | ||
# - Monitor the velocity of the migration in the spark jobs monito | ||
# | ||
# You can increase the velocity by updating spark-env on worker nodes, increase the | ||
# SPARK_WORKER_INSTANCES = 2, run ./start-worker.sh. | ||
# So long as there are tasks available, the new workers would pick up tasks and increase | ||
# the velocity of the migration. | ||
# | ||
# You should be mindful of over-provisioning the number of workers on an instance. | ||
# Eg. if the node has 8 CPUs, then number of workers on an instance * cores <= 8... | ||
# SLAVESIZE is used by the start-slave.sh script. By default, a Spark worker uses all the | ||
# resources of the machine it is started on. If you want to decrease the migration velocity, | ||
# you can set the maximum number of cores and memory that can be used by the worker. | ||
################################################################################################################## | ||
|
||
export SPARK_MASTER_HOST={{ hostvars.spark_master.ansible_facts.default_ipv4.address }} | ||
export CORES=4 # number of cores per worker | ||
export SPARK_WORKER_INSTANCES=4 # this is how many workers will be | ||
# started/stopped on the node. | ||
export SLAVESIZE="-c $CORES" | ||
export SPARK_MASTER_HOST={{ hostvars.spark_master.ansible_default_ipv4.address }} | ||
|
||
export SLAVESIZE="" | ||
# Optionally, limit the resources available to the Spark worker by uncommenting the following lines | ||
#export MAX_CORES=2 # max number of cores to use on the machine | ||
#export MAX_MEMORY=4G # max amount of memory to use on the machine | ||
#export SLAVESIZE="--cores $MAX_CORES --memory $MAX_MEMORY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters