{"id":39349427,"url":"https://github.com/pixelsdb/elastic-bench","last_synced_at":"2026-01-18T02:27:38.245Z","repository":{"id":277108163,"uuid":"916145535","full_name":"pixelsdb/elastic-bench","owner":"pixelsdb","description":"The cloud analytic benchmark than generates workloads for elasticity evaluations.","archived":false,"fork":false,"pushed_at":"2025-05-11T13:34:28.000Z","size":5536,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-11T14:36:53.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixelsdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-13T14:42:45.000Z","updated_at":"2025-05-11T13:34:32.000Z","dependencies_parsed_at":"2025-02-12T07:33:56.284Z","dependency_job_id":"ceecd27a-1134-4ca6-af08-b4a8faf22be9","html_url":"https://github.com/pixelsdb/elastic-bench","commit_stats":null,"previous_names":["pixelsdb/elastic-bench"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pixelsdb/elastic-bench","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelsdb%2Felastic-bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelsdb%2Felastic-bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelsdb%2Felastic-bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelsdb%2Felastic-bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixelsdb","download_url":"https://codeload.github.com/pixelsdb/elastic-bench/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelsdb%2Felastic-bench/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28526569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-18T02:27:38.166Z","updated_at":"2026-01-18T02:27:38.228Z","avatar_url":"https://github.com/pixelsdb.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elastic-Bench: 云数据仓库测试基准\n\n一个基于CAB（Cloud Analytics Benchmark）方法改进的云数据仓库性能测试与预测工具。\n\n## 概述\n\n传统的基准测试如TPC-H和TPC-DS无法捕捉云数据仓库工作负载的独特特征。实际云环境中的工作负载表现出时间变化模式、突发性和间歇性使用等特点，这些在传统基准测试中并未得到反映。\n\n本项目在CAB基准测试（VLDB 2023）的基础上进行了扩展和改进：\n\n1. 支持更灵活的工作负载模式生成\n2. 增加基于扫描字节的资源建模能力\n3. 提供用于预测任务的历史负载数据\n4. 改进查询生成过程，更好地匹配目标模式\n5. 允许组合工作负载模式，更好地反映实际使用情况\n\n## 工作负载模式\n\nElastic-Bench支持五种基本工作负载模式，这些模式是通过分析Snowset和Redset数据集得出的：\n\n1. **正弦噪声模式（Sinusoidal Noise Pattern）** - 创建一个基础负载，并在其上添加多个正弦波峰和随机噪声\n2. **随机峰值模式（Random Spikes Pattern）** - 创建随机的较短峰值，具有高可变性\n3. **突发模式（Burst Pattern）** - 在随机位置创建一个持续的高负载区域\n4. **负载断路器模式（Load Breaker Pattern）** - 创建一个基础负载，在一个区域突然增加负载，同时在另一个区域抑制负载\n5. **小时级峰值模式（Hourly Spikes Pattern）** - 创建均匀分布的周期性峰值（模拟24小时周期）\n\n这些模式可以单独使用，也可以组合使用以创建更复杂、更真实的工作负载。\n\n## 主要改进\n\n与原始CAB基准相比：\n\n1. **明确模式的单一查询流**：不使用多个随机模式，而是允许开发者指定确切的测试模式或组合。\n2. **减少基础负载**：将模式1、4和5中的基础负载减少到原来的1/20，以允许更明显的负载变化。\n3. **更好的负载拟合**：改进查询选择算法，更好地匹配目标负载模式。\n4. **混合模式支持**：允许在单一查询流中组合多种简单模式，创造更真实的工作负载。\n5. **字节模式**：添加基于scanned_bytes而非仅基于CPU时间的模式拟合支持。\n6. **历史负载数据**：提供历史负载数据（测试期间持续时间的10倍），以支持负载预测开发。\n7. **灵活参数**：通过命令行选项公开重要参数。\n\n## 使用方法\n\n### 构建\n\n```bash\n# 克隆仓库\ngit clone https://github.com/pixelsdb/elastic-bench.git\ncd benchmark\n\n# 构建代码\ng++ -o benchmark *.cpp -std=c++11\n```\n\n### 运行\n\n```bash\n./benchmark -p \u003cpattern_ids\u003e -s \u003cscale\u003e -c \u003chours/scanedbytes\u003e -t \u003cduration\u003e [-mode bytes]\n```\n#### 参数\n\n- `-p`：模式ID（1-5，可以指定多个，用空格分隔）\n- `-s`：数据大小的缩放因子\n- `-c`：CPU小时数或扫描字节预算（取决于模式）\n- `-t`：持续时间（小时）\n- `-mode bytes`：可选参数，使用字节模式而非CPU时间模式\n\n#### 示例\n\n```bash\n# 生成具有模式1、数据集大小为10GB、总cputime为24小时和8小时持续时间的查询流\n./benchmark -p 1 -s 10 -c 24 -t 8\n\n# 生成具有组合模式2和5、数据集大小为100GB、总scanned_bytes为50GB和4小时持续时间的查询流\n./benchmark -p 2 5 -s 100 -c 50 -t 4 -mode bytes\n```\n\n### 输出文件\n\n基准测试生成以下文件：\n\n- `query_stream_p{pattern}_s{scale}_{mode}{budget}_t{duration}.json`：主查询流文件\n- `query_stream_p{pattern}_s{scale}_{mode}{budget}_t{duration}_slot_info_{N}.json`：每个时间槽的历史负载分布文件（用于预测任务），其中cputime单位为10e-6s，scanned_bytes单位为字节\n\n\n## 参考\n\n- Cloud Analytics Benchmark (CAB), VLDB 2023\n- [Snowset](https://github.com/resource-disaggregation/snowset) - Snowflake工作负载数据集\n- [Redset](https://github.com/amazon-science/redset) - Amazon Redshift工作负载数据集\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelsdb%2Felastic-bench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelsdb%2Felastic-bench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelsdb%2Felastic-bench/lists"}