# Spark optimization pack

The *Spark* optimization pack allows tuning applications running on the Apache Spark framework. Through this optimization pack, Akamas is able to explore the space of the Spark parameters in order to find the configurations that best optimize the allocated resources or the execution time.

To achieve these goals the optimization pack provides parameters that focus on the following areas:

* Driver and executors' resources allocation
* Parallelism
* Shuffling
* Spark SQL

Similarly, the bundled metrics provide visibility on the following statistics from the Spark History Server:

* Execution time
* Executors' resource usage
* Garbage collection time

## Component Types

| Component Type                                                                                                                      | Description             |
| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| [Spark Application 2.2.0](https://docs.akamas.io/akamas-docs/3.5.0/reference/optimization-packs/spark-pack/spark-application-2.2.0) | Spark Application 2.2.0 |
| [Spark Application 2.3.0](https://docs.akamas.io/akamas-docs/3.5.0/reference/optimization-packs/spark-pack/spark-application-2.3.0) | Spark Application 2.3.0 |
| [Spark Application 2.4.0](https://docs.akamas.io/akamas-docs/3.5.0/reference/optimization-packs/spark-pack/spark-application-2.4.0) | Spark Application 2.4.0 |

## Installing <a href="#installing" id="installing"></a>

Here’s the command to install the *Spark* optimization pack using the Akamas CLI:

```bash
akamas install optimization-pack Spark
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akamas.io/akamas-docs/3.5.0/reference/optimization-packs/spark-pack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
