Giter Club home page Giter Club logo

spark-dfsio's Introduction

spark-dfsio

DFSIO starts several Spark tasks, and each Spark task either writes out a large file, or reads in a large file. The aggregate throughput is computed and reported.

Prerequisites

A cluster with Spark 2.1+. To test Alluxio performance, Alluxio needs to be installed with workers colocated with Spark executors.

Building the benchmark

The benchmark can be built with maven. Before building the benchmark, please check pom.xml and update Spark and Hadoop version strings to be consistent with your cluster installation. Run mvn install on the root folder of the repository to start the build. You can find the jar file at target/benchmarks-1.0.0-SNAPSHOT-jar-with-dependencies.jar.

Running DFSIO

The following command will run the benchmark.

$ spark-submit \
--class alluxio.benchmarks.TestDFSIO \
--conf "spark.scheduler.minRegisteredResourcesRatio=1" \
--conf "spark.scheduler.maxRegisteredResourcesWaitingTime=60s" \
--conf "spark.executor.extraJavaOptions=-Dalluxio.user.block.size.bytes.default=128MB -Dalluxio.user.file.readtype.default=NO_CACHE -Dalluxio.user.file.writetype.default=MUST_CACHE" \
benchmarks-1.0.0-SNAPSHOT-jar-with-dependencies.jar -p 8 -t 10 -s 6144 -o w -b alluxio
://<MASTER_HOSTNAME>:19998/testdfsio/

This will launch the alluxio.benchmarks.TestDFSIO job on the Spark cluster.

This test takes the following parameters:

  • -p <number of tasks>: This controls the number of tasks to use for the test

  • -s <size of write in MB>: This is the size of the file to write for each task, in MB

  • -t <number of files in each partition>: This will generate 't*p' files in total, each partition will generate 't' files

  • -o <sequence of operations>: This is a string of 'w' or 'r' which determine the test sequence. For example, -o wwwwwrrrrr means the test will do the write portion of the test 5 times, then do the read portion of the test 5 times. The output of the test will be 10 sets of results. Note the read operation requires data to be written by write operation with same file size and number of partitions/tasks before. You can run write operation either in the same job before read or in a separate job before the read job.

  • -b <base directory>: This is the base directory to write files or read files

Note: To get accurate throughput, run the benchmark with number of tasks no more than the total number of tasks that can be run on Spark cluster concurrently. Usually this number is determined through --num-executors and --executor-cores options in the spark-submit command line. E.g. if the benchmark is run with --num-executors 8 --executor-cores 4 then the maximum tasks can be run concurrently in the cluster is 32(assuming there are enough cpu cores in the cluster to start all executors).

spark-dfsio's People

Contributors

junluo avatar bf8086 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.