delight

delight

优化Spark应用性能的开源分析工具

Delight是一款开源的Spark应用性能分析工具,为Spark UI和History Server提供替代方案。它适用于各种Spark平台,通过直观的界面展示执行器CPU使用情况和内存峰值等关键指标。Delight集成了Spark History Server功能,简化了Spark UI的访问过程。该工具使用开源agent收集Spark事件,并在应用完成后在托管仪表板上呈现详细分析结果,助力开发者优化Spark应用性能。

DelightSpark UISpark History Server性能优化大数据分析Github开源项目

:warning: Delight have been shutdown on May 31st 2024 :warning:

All functionalities have been integrated into NetApp's Ocean for Apache Spark

Delight - The New & Improved Spark UI and Spark History Server

Delight is a free Spark UI & Spark History Server alternative with new metrics and visualizations that will delight you!

The Delight project is developed by Data Mechanics, which is now part of the Spot family. Delight works on top of any Spark platform, whether it's open-source or commercial, in the cloud or on-premise.

Overview

The Delight web dashboard lists your completed Spark applications with high-level information and metrics.

<p align="center"> <a href="documentation/images/delight_dashboard.png"><img src="documentation/images/delight_dashboard.png" width="80%" align="middle"></a> </p>

When you click on a specific application, you access an overview screen for this application. It contains a graph of your Executor Cores Usage, broken down by categories. This graph is aligned with a timeline of your Spark jobs and stages, so that it's easy for you to correlate CPU metrics with the code of your Spark application.

For example, Delight made it obvious that this application (left) suffered from a slow shuffle. After using instances with mounted local SSDs (right), the application performance improved by over 10x.

<a href="documentation/images/before.png"><img src="documentation/images/before.png" width="45%"></a> <a href="documentation/images/after.png"><img src="documentation/images/after.png" width="45%"></a>

Under this graph, you will get a report of the peak memory usage of your Spark executors (the overview screen shows the top 5 executors). This graph should help you tune your container memory sizes - so that memory usage stays in the 70-90% range. This graph breaks down memory usage between JVM, Python, and other processes (at the time of the peak total usage).

<p align="center"> <a href="documentation/images/memory.png"><img src="documentation/images/memory.png" width="65%"></a> </p>

Delight also runs a Spark History Server for you, so it's a great way to access the Spark UI, without having to setup and maintain a Spark History Server yourself.

History & Roadmap

  • June 2020: Project starts with a widely shared blog post detailing our vision.
  • November 2020: First release. A dashboard with one-click access to a Hosted Spark History Server (Spark UI).
  • March 2021: Beta release of the overview screen with Executor CPU metrics and Spark timeline.
  • April 2021: Delight is Generally Available! The overview screen now displays the executors peak memory usage, broken down by the type of memory usage (Java, Python, other processes).
  • June 2022: The list of executors and the memory over time of each executor is available. Overall UI is updated following the acquisiton of Data Mechanics by Spot
  • Coming Next: Driver memory usage, Automated tuning recommendations, Make Delight accessible while the app is running.

Architecture

Delight consists of an open-sourced agent, which runs inside your Spark application (using the SparkListener interface).

Delight Architecture

This agent streams Spark events to Delight backend. These contain metadata about your Spark application execution: how long each task took, how much data was read & written, how much memory was used, etc. These logs do not contain sensitive information like the data that your Spark application is processing. Here's a sample Spark event and a full Spark event log.

Once your application is finished, it becomes available on the Delight hosted dashboard. It gives you access to high-level metrics, to a new Delight screen showing CPU & Memory metrics, and to the Spark UI.

Installation

To use Delight:

  • Sign in through our website using your Google account. If you want to share a single Delight dashboard, you should use your company's Google account.
  • Head to settings on the left navigation bar, and create a personal access token. This token will uniquely identify your applications in Delight - treat it as a secret.
  • Follow the installation instructions below for your platform.

Here are the available instructions:

Compatibility

Delight is compatible with Spark 2.4.0 to Spark 3.3.0 with the following Maven coordinates:

co.datamechanics:delight_<replace-with-your-scala-version-2.11-or-2.12>:latest-SNAPSHOT

We also maintain a version compatible with Spark 2.3.x. Please use the following Maven coordinates to use it:

co.datamechanics:delight_2.11:2.3-latest-SNAPSHOT

Delight is compatible with Pyspark. But even if you use Python, you'll have to determine the Scala version used by your Spark distribution and fill out the placeholder above in the Maven coordinates!

Configurations

ConfigExplanationDefault value
spark.delight.accessToken.secretAn access token to authenticate yourself with Delight. If the access token is missing, the listener will not stream events(none)
spark.delight.appNameOverrideThe name of the app that will appear in Delight. This is only useful if your platform does not allow you to set spark.app.name.spark.app.name

Advanced configurations

We've listed more technical configurations in this section for completeness. You should not need to change the values of these configurations though, so drop us a line if you do, we'll be interested to know more!

ConfigExplanationDefault value
spark.delight.collector.urlURL of the Delight collector APIhttps://api.delight.datamechanics.co/collector/
spark.delight.buffer.maxNumEventsThe number of Spark events to reach before triggering a call to Delight Collector API. Special events like job ends also trigger a call.1000
spark.delight.payload.maxNumEventsThe maximum number of Spark events to be sent in one call to Delight Collector API.10000
spark.delight.heartbeatIntervalSecs(Internal config) the interval at which the listener send an heartbeat requests to the API. It allow us to detect if the app was prematurely finished and start the processing ASAP10s
spark.delight.pollingIntervalSecs(Internal config) the interval at which the object responsible for calling the API checks whether there are new payloads to be sent0.5s
spark.delight.maxPollingIntervalSecs(Internal config) upon connection error, the polling interval increases exponentially until this value. It returns to its initial value once a call to the API passes through60s
spark.delight.maxWaitOnEndSecs(Internal config) the time the Spark application waits for remaining payloads to be sent after the event SparkListenerApplicationEnd. Not applicable in the case of Databricks10s
spark.delight.waitForPendingPayloadsSleepIntervalSecs(Internal config) the interval at which the object responsible for calling the API checks whether there are new remaining to be sent, after the event SparkListenerApplicationEnd is received. Not applicable in the case of Databricks1s
spark.delight.logDuration(Debugging config) whether to log the duration of the operations performed by the Spark listenerfalse

Frequently Asked Questions

If you don't find the answer you're loooking for, contact us through the chat window on the bottom right corner of your Delight dashboard.

Is Delight really free?

Yes, it's entirely free of charge.

Is Delight open-source?

Delight consists of two components:

  1. An open-source agent which runs within your Spark applications (as a SparkListener) and streams metrics in real-time to our backend. The code for this agent is on this github repository, so you can audit it and trust it.
  2. A closed-source backend system responsible of collecting, storing, and serving the metrics necessary to Delight, as well as authentication.

Which data does Delight collect? Is it secure?

Delight collects Spark event logs. This is non-sensitive metadata about your Spark application execution (for example, for each Spark task there is metadata on memory usage, CPU usage, network traffic). Delight does not record any sensitive information (like the data that your application operates on). ‍ This data is encrypted with your access token and sent over HTTPS to the Delight backend. Your access token guarantees that the metrics collected will only be visible to yourself (and to your colleagues, if you signed up with your company's Google account).

This data is automatically deleted 30 days its collection, and it is not shared with any third party.

What is the efficiency score visible in the Delight dashboard?

The efficiency ratio is calculated as the sum of the duration of all the Spark tasks, divided by the sum of the core uptime of your Spark executors.

An efficiency score of 75% means that on average, your Spark executor cores are running Spark tasks three quarter of the time. A low efficiency score means that you are wasting a lot of your compute resources. The Ocean for Apache Spark platform automatically tunes your Spark application configurations to make them more efficient!

Is Delight accessible while the app is running?

No, at this moment you can only access Delight once your app has completed. This means that Delight is not suited for long-running applications (like interactive clusters staying up 24x7, or streaming jobs).

Making Delight accessible in real time is on our roadmap.

I don't have a google account, how can I sign up?

At this time, the only sign in method is using a Google account. We'll be adding support for login+password authentication in the future.

How can I invite a colleague to share the same Delight dashboard?

If you sign up using the same Google organization as your colleague, you will automatically share the same dashboard. You don't need to invite your colleague, they can just sign up and get started.

What's your log retention? For how long can I access Delight?

The Delight UI is accessible for 30 days after the app completion. After this time, the logs are deleted.

There's also a limit of 10,000 apps per customer. If you reach this limit, we will start cleaning up the logs of your oldest apps.

NoSuchMethodError

I installed Delight and saw the following error in the driver logs. How do I solve it?

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.spark.internal.Logging.$init$(Lorg/apache/spark/internal/Logging;)V
	at co.datamechanics.delight.DelightListener.<init>(DelightListener.scala:11)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

This probably means that the Scala version of Delight does not match the Scala version of the Spark distribution.

If you specified co.datamechanics:delight_2.11:latest-SNAPSHOT, please change to co.datamechanics:delight_2.12:latest-SNAPSHOT. And vice versa!

I'd like to troubleshoot Delight, how can I see its logs?

The Delight jar attached to your Spark driver produces troubleshooting logs within the Spark Driver logs. Look for the class name DelightStreamingConnector. There should be INFO logs printed when your application starts.

If you don't see these logs, you may need to modify the log4j configuration file used by Spark to add this line:

log4j.logger.co.datamechanics.delight=INFO

编辑推荐精选

AEE

AEE

AI Excel全自动制表工具

AEE 在线 AI 全自动 Excel 编辑器,提供智能录入、自动公式、数据整理、图表生成等功能,高效处理 Excel 任务,提升办公效率。支持自动高亮数据、批量计算、不规则数据录入,适用于企业、教育、金融等多场景。

UI-TARS-desktop

UI-TARS-desktop

基于 UI-TARS 视觉语言模型的桌面应用,可通过自然语言控制计算机进行多模态操作。

UI-TARS-desktop 是一款功能强大的桌面应用,基于 UI-TARS(视觉语言模型)构建。它具备自然语言控制、截图与视觉识别、精确的鼠标键盘控制等功能,支持跨平台使用(Windows/MacOS),能提供实时反馈和状态显示,且数据完全本地处理,保障隐私安全。该应用集成了多种大语言模型和搜索方式,还可进行文件系统操作。适用于需要智能交互和自动化任务的场景,如信息检索、文件管理等。其提供了详细的文档,包括快速启动、部署、贡献指南和 SDK 使用说明等,方便开发者使用和扩展。

Wan2.1

Wan2.1

开源且先进的大规模视频生成模型项目

Wan2.1 是一个开源且先进的大规模视频生成模型项目,支持文本到图像、文本到视频、图像到视频等多种生成任务。它具备丰富的配置选项,可调整分辨率、扩散步数等参数,还能对提示词进行增强。使用了多种先进技术和工具,在视频和图像生成领域具有广泛应用前景,适合研究人员和开发者使用。

爱图表

爱图表

全流程 AI 驱动的数据可视化工具,助力用户轻松创作高颜值图表

爱图表(aitubiao.com)就是AI图表,是由镝数科技推出的一款创新型智能数据可视化平台,专注于为用户提供便捷的图表生成、数据分析和报告撰写服务。爱图表是中国首个在图表场景接入DeepSeek的产品。通过接入前沿的DeepSeek系列AI模型,爱图表结合强大的数据处理能力与智能化功能,致力于帮助职场人士高效处理和表达数据,提升工作效率和报告质量。

Qwen2.5-VL

Qwen2.5-VL

一款强大的视觉语言模型,支持图像和视频输入

Qwen2.5-VL 是一款强大的视觉语言模型,支持图像和视频输入,可用于多种场景,如商品特点总结、图像文字识别等。项目提供了 OpenAI API 服务、Web UI 示例等部署方式,还包含了视觉处理工具,有助于开发者快速集成和使用,提升工作效率。

HunyuanVideo

HunyuanVideo

HunyuanVideo 是一个可基于文本生成高质量图像和视频的项目。

HunyuanVideo 是一个专注于文本到图像及视频生成的项目。它具备强大的视频生成能力,支持多种分辨率和视频长度选择,能根据用户输入的文本生成逼真的图像和视频。使用先进的技术架构和算法,可灵活调整生成参数,满足不同场景的需求,是文本生成图像视频领域的优质工具。

WebUI for Browser Use

WebUI for Browser Use

一个基于 Gradio 构建的 WebUI,支持与浏览器智能体进行便捷交互。

WebUI for Browser Use 是一个强大的项目,它集成了多种大型语言模型,支持自定义浏览器使用,具备持久化浏览器会话等功能。用户可以通过简洁友好的界面轻松控制浏览器智能体完成各类任务,无论是数据提取、网页导航还是表单填写等操作都能高效实现,有利于提高工作效率和获取信息的便捷性。该项目适合开发者、研究人员以及需要自动化浏览器操作的人群使用,在 SEO 优化方面,其关键词涵盖浏览器使用、WebUI、大型语言模型集成等,有助于提高网页在搜索引擎中的曝光度。

xiaozhi-esp32

xiaozhi-esp32

基于 ESP32 的小智 AI 开发项目,支持多种网络连接与协议,实现语音交互等功能。

xiaozhi-esp32 是一个极具创新性的基于 ESP32 的开发项目,专注于人工智能语音交互领域。项目涵盖了丰富的功能,如网络连接、OTA 升级、设备激活等,同时支持多种语言。无论是开发爱好者还是专业开发者,都能借助该项目快速搭建起高效的 AI 语音交互系统,为智能设备开发提供强大助力。

olmocr

olmocr

一个用于 OCR 的项目,支持多种模型和服务器进行 PDF 到 Markdown 的转换,并提供测试和报告功能。

olmocr 是一个专注于光学字符识别(OCR)的 Python 项目,由 Allen Institute for Artificial Intelligence 开发。它支持多种模型和服务器,如 vllm、sglang、OpenAI 等,可将 PDF 文件的页面转换为 Markdown 格式。项目还提供了测试框架和 HTML 报告生成功能,方便用户对 OCR 结果进行评估和分析。适用于科研、文档处理等领域,有助于提高工作效率和准确性。

飞书多维表格

飞书多维表格

飞书多维表格 ×DeepSeek R1 满血版

飞书多维表格联合 DeepSeek R1 模型,提供 AI 自动化解决方案,支持批量写作、数据分析、跨模态处理等功能,适用于电商、短视频、影视创作等场景,提升企业生产力与创作效率。关键词:飞书多维表格、DeepSeek R1、AI 自动化、批量处理、企业协同工具。

下拉加载更多