Lesson 6 of 10Platform levers3 min read

Instance families on the Spark bill: Graviton, GPU and F2

The instance family sets the hourly rate, and some engines decide it for you. AWS states that Graviton2 instances give up to 30% lower cost for Spark on EMR. GPU-based acceleration on EMR needs GPU instance types and does not support ARM, and DualBird runs on Amazon EC2 F2 instances. Engines that run on standard CPU instances leave the choice open.

By The Meter DeskSpark Cost ComparePublished

Why does the instance family matter?

The instance line on a Spark bill is hours times rate. Engines and tools mostly shrink hours; the instance family decides the rate. Some engines also decide the family, which couples the two choices.

What does AWS say about Graviton?

AWS's EMR features page states: "Amazon EMR now provides up to 30% lower cost and up to 15% improved performance for Spark workloads on Graviton2-based instances." This is an older AWS statement about Graviton2, so treat it as a direction, not a quote for current instance generations, and check current prices for the instances you would use. Graviton instances are ARM-based.

What do GPU-based engines require?

AWS documents the NVIDIA plugin, now called cuDF for Apache Spark, on EMR 6.2.0 and later "using EC2 graphics processing unit (GPU) instance types". Core and task nodes must be GPU instance types, and ARM is not supported. On EMR that rules out combining this engine with Graviton nodes. The cost question becomes: does the speedup on GPU instances outweigh their higher hourly rate for your jobs? NVIDIA's qualification tool, covered in lesson 9, estimates that per application.

What does DualBird require?

DualBird runs on Amazon EC2 F2 instances; AWS lists f2.6xlarge, f2.12xlarge and f2.48xlarge. DualBird's stated setup is to change the EC2 instance type to F2 and add its Spark plugin. Its cost figures are stated per workload ("WORKLOAD FOR WORKLOAD"), which is the comparison that matters when the instance type changes: the hourly rate is different, so cost per run, not cost per hour, is the number to compare.

Which engines keep the instance choice open?

Apache DataFusion Comet runs on standard CPU instances. Apache Auron runs on CPUs. Apache Gluten runs on CPUs, with one caveat in its downloads page: binaries are compiled on CentOS 7 and Intel Xeon, and the project says performance and compatibility "are not guaranteed on other operating systems or hardware platforms". If you plan to run Gluten on ARM instances, test it there first.

How should you compare across families?

  1. Pick a representative job and fix the data and the output.
  2. Run it on your current family and record runtime and node count.
  3. Run it on the candidate family, with the engine it needs, and record the same.
  4. Multiply each by its own hourly rate, including the EMR charge, and compare cost per run.

A faster run on a more expensive instance can cost more or less than a slower run on a cheaper one. Only the cost per run settles it.

Sources