diff --git a/developer-tools.md b/developer-tools.md index dab3e8a3285..c975e80a0f3 100644 --- a/developer-tools.md +++ b/developer-tools.md @@ -389,19 +389,19 @@ Here are instructions on profiling Spark applications using YourKit Java Profile YourKit downloads page. This file is pretty big (~100 MB) and YourKit downloads site is somewhat slow, so you may consider mirroring this file or including it on a custom AMI. -- Untar this file somewhere (in `/root` in our case): `tar xvjf yjp-12.0.5-linux.tar.bz2` -- Copy the expanded YourKit files to each node using copy-dir: `~/spark-ec2/copy-dir /root/yjp-12.0.5` +- Unzip this file somewhere (in `/root` in our case): `unzip YourKit-JavaProfiler-2017.02-b66.zip` +- Copy the expanded YourKit files to each node using copy-dir: `~/spark-ec2/copy-dir /root/YourKit-JavaProfiler-2017.02` - Configure the Spark JVMs to use the YourKit profiling agent by editing `~/spark/conf/spark-env.sh` and adding the lines ``` -SPARK_DAEMON_JAVA_OPTS+=" -agentpath:/root/yjp-12.0.5/bin/linux-x86-64/libyjpagent.so=sampling" +SPARK_DAEMON_JAVA_OPTS+=" -agentpath:/root/YourKit-JavaProfiler-2017.02/bin/linux-x86-64/libyjpagent.so=sampling" export SPARK_DAEMON_JAVA_OPTS -SPARK_JAVA_OPTS+=" -agentpath:/root/yjp-12.0.5/bin/linux-x86-64/libyjpagent.so=sampling" -export SPARK_JAVA_OPTS +SPARK_EXECUTOR_OPTS+=" -agentpath:/root/YourKit-JavaProfiler-2017.02/bin/linux-x86-64/libyjpagent.so=sampling" +export SPARK_EXECUTOR_OPTS ``` - Copy the updated configuration to each node: `~/spark-ec2/copy-dir ~/spark/conf/spark-env.sh` - Restart your Spark cluster: `~/spark/bin/stop-all.sh` and `~/spark/bin/start-all.sh` -- By default, the YourKit profiler agents use ports 10001-10010. To connect the YourKit desktop +- By default, the YourKit profiler agents use ports `10001-10010`. To connect the YourKit desktop application to the remote profiler agents, you'll have to open these ports in the cluster's EC2 security groups. To do this, sign into the AWS Management Console. Go to the EC2 section and select `Security Groups` from the `Network & Security` section on the left side of the page. @@ -417,7 +417,7 @@ cluster with the same name, your security group settings will be re-used. - YourKit should now be connected to the remote profiling agent. It may take a few moments for profiling information to appear. Please see the full YourKit documentation for the full list of profiler agent -startup options. +startup options.

In Spark unit tests

diff --git a/site/developer-tools.html b/site/developer-tools.html index 9a9ec8a5d2a..d8e35854ccf 100644 --- a/site/developer-tools.html +++ b/site/developer-tools.html @@ -568,19 +568,19 @@

On Spark EC2 images

YourKit downloads page. This file is pretty big (~100 MB) and YourKit downloads site is somewhat slow, so you may consider mirroring this file or including it on a custom AMI. -
  • Untar this file somewhere (in /root in our case): tar xvjf yjp-12.0.5-linux.tar.bz2
  • -
  • Copy the expanded YourKit files to each node using copy-dir: ~/spark-ec2/copy-dir /root/yjp-12.0.5
  • +
  • Unzip this file somewhere (in /root in our case): unzip YourKit-JavaProfiler-2017.02-b66.zip
  • +
  • Copy the expanded YourKit files to each node using copy-dir: ~/spark-ec2/copy-dir /root/YourKit-JavaProfiler-2017.02
  • Configure the Spark JVMs to use the YourKit profiling agent by editing ~/spark/conf/spark-env.sh and adding the lines -
    SPARK_DAEMON_JAVA_OPTS+=" -agentpath:/root/yjp-12.0.5/bin/linux-x86-64/libyjpagent.so=sampling"
    +    
    SPARK_DAEMON_JAVA_OPTS+=" -agentpath:/root/YourKit-JavaProfiler-2017.02/bin/linux-x86-64/libyjpagent.so=sampling"
     export SPARK_DAEMON_JAVA_OPTS
    -SPARK_JAVA_OPTS+=" -agentpath:/root/yjp-12.0.5/bin/linux-x86-64/libyjpagent.so=sampling"
    -export SPARK_JAVA_OPTS
    +SPARK_EXECUTOR_OPTS+=" -agentpath:/root/YourKit-JavaProfiler-2017.02/bin/linux-x86-64/libyjpagent.so=sampling"
    +export SPARK_EXECUTOR_OPTS
     
  • Copy the updated configuration to each node: ~/spark-ec2/copy-dir ~/spark/conf/spark-env.sh
  • Restart your Spark cluster: ~/spark/bin/stop-all.sh and ~/spark/bin/start-all.sh
  • -
  • By default, the YourKit profiler agents use ports 10001-10010. To connect the YourKit desktop +
  • By default, the YourKit profiler agents use ports 10001-10010. To connect the YourKit desktop application to the remote profiler agents, you’ll have to open these ports in the cluster’s EC2 security groups. To do this, sign into the AWS Management Console. Go to the EC2 section and select Security Groups from the Network & Security section on the left side of the page. @@ -597,7 +597,7 @@

    On Spark EC2 images

    Please see the full YourKit documentation for the full list of profiler agent -startup options.

    +startup options.

    In Spark unit tests