Skip to content

Commit de5dffb

Browse files
committed
update ddl and results
1 parent b71ac51 commit de5dffb

File tree

7 files changed

+151
-49
lines changed

7 files changed

+151
-49
lines changed

hologres/README.md

Lines changed: 87 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,95 @@ Hologres is an all-in-one real-time data warehouse engine that is compatible wit
22

33
To evaluate the performance of Hologres, follow these guidelines to set up and execute the benchmark tests.
44

5-
1. **Instance Purchase**:
6-
Refer to the [Alibaba Cloud Hologres TPC-H Testing Documentation](https://www.alibabacloud.com/help/en/hologres/user-guide/test-plan?spm=a2c63.p38356.help-menu-113622.d_2_14_0_0.54e14f70oTAEXO) for details on purchasing Hologres and ECS instances. Both instances must be purchased within the same region and same zone.
5+
### 1. Create an Alibaba Cloud Account and Provide Your UID
6+
Please first create an Alibaba Cloud account. After registration, kindly provide us with your **UID** (Account ID), which you can find by:
7+
- Clicking on your profile icon in the top-right corner → **Account Center**
8+
We will issue you an **Alibaba Cloud coupon** to support your testing, so please share your UID with us.
79

8-
2. **Benchmark Execution**:
9-
Once the instances are set up, you need to prepare the following parameters:
10-
- `user`: user name for hologres, you can create users on Hologres web console
11-
- `password`: password for hologres, you can set this when create users
12-
- `host_name`: hostname of the Hologres instance, you can find this on Alibaba Cloud Console, you should select VPC network to achieve best performance
13-
- `port`: Port of the Hologres instance (usally '80')
10+
---
1411

15-
And then setup environments variables:
16-
```
17-
export PG_USER={user};export PG_PASSWORD={password};export PG_HOSTNAME={host_name};export PG_PORT={port}
18-
```
12+
### 2. Purchase an Alibaba Cloud Hologres and ECS Instance
13+
Refer to the [Alibaba Cloud Hologres TPC-H Testing Documentation](https://www.alibabacloud.com/help/en/hologres/user-guide/test-plan?spm=a2c63.p38356.help-menu-113622.d_2_14_0_0.54e14f70oTAEXO) for details on purchasing Hologres and ECS instances. Both instances must be purchased within the same region and same zone.
14+
15+
#### 2.1 When creating the Hologres instance, please use the following configuration:
16+
17+
- **Region**: `China (Beijing)`
18+
*(The new version is in gray-scale release in China (Beijing). Choosing this region ensures you can access the latest features)*
19+
- **Specifications**: ✅ **Compute Group Type**
20+
- **Zone**: `Zone L`
21+
- **Gateway Nodes**: `2 Pieces`
22+
- **Reserved Computing Resources of Virtual Warehouse**: `32 CU`
23+
*(This is the actual compute unit (CU) value used in the JSON result files.)*
24+
- **Allocate to Initial Virtual Warehouse**: `Yes`
25+
- **Enable Serverless Computing**: ✅ **True (Enabled)**
26+
- **Storage Redundancy Type**: `LRS `
27+
- **VPC & vSwitch**:
28+
- You need to **create a new VPC**.
29+
- Region: `China (Beijing)`
30+
- Name: Any name you prefer
31+
- IPv4 CIDR Block: Select "Manually enter" and use one of the recommended values
32+
- IPv6 CIDR Block: `Do Not Assign`
33+
- During VPC creation, you’ll also create a **vSwitch**:
34+
- Name: Any name
35+
- Zone: `Beijing Zone L`
36+
- IPv4 CIDR: Automatically filled based on VPC CIDR
37+
> 💡 A **VPC (Virtual Private Cloud)** is a private network in the cloud. The **vSwitch** is a subnet within the VPC. We need both Hologres and ECS instances in the same VPC for fast internal communication.
38+
- **Instance Name**: Choose any name
39+
- **Service-linked Role**: Click **Create**
40+
41+
Once everything is configured and you’ve received the coupon, click **Buy Now** to proceed.
42+
43+
#### 2.2 When creating the ECS instance, please use the following configuration:
44+
- **Billing Method**: `Pay-as-you-go` (you can release it after testing)
45+
- **Region**: `China (Beijing)`
46+
- **Network & Security Group**:
47+
- VPC: Select the one you just created
48+
- vSwitch: Automatically populated
49+
- **Instance Type**:
50+
- Series: `Compute Optimized c9i`
51+
- Instance: `ecs.c9i.4xlarge` (16 vCPUs, 32 GiB RAM)
52+
*(This is not performance-critical — it only runs the client script.)*
53+
- **Image**:
54+
- `Alibaba Cloud Linux``Alibaba Cloud Linux 3.2104 LTS 64-bit`
55+
- **System Disk**:
56+
- Size: `2048 GiB`
57+
- Performance: `PL3`
58+
*(Larger and faster disk improves import speed since we’re loading ~70GB of TSV data. IO on the ECS can be a bottleneck.)*
59+
- **Public IP Address**: ✅ Assign Public IPv4 Address
60+
- **Management Settings**:
61+
- Logon Credential: `Custom Password`
62+
- Username: `root`
63+
- Set a secure password
64+
65+
Click **Create Order** to launch the instance.
66+
67+
---
1968

20-
3. **Sample Execution**:
69+
### 3. Connect to the ECS and Run the Benchmark
70+
71+
After the ECS instance is ready:
72+
73+
1. SSH into the ECS instance.
74+
2. Install Git and clone the repo:
2175
```bash
22-
./main.sh 5 /root/bluesky
76+
yum -y install git
77+
git clone https://github.com/ClickHouse/JSONBench.git
78+
cd JSONBench/hologres
79+
```
80+
3. Run the benchmark script:
81+
```
82+
export PG_USER={AccessKeyID};export PG_PASSWORD={AccessKeySecret};export PG_HOSTNAME={Host};export PG_PORT={Port}
83+
./main.sh 5 {your_bluesky_data_dir}
2384
```
85+
86+
- **AccessKeyID & AccessKeySecret**:
87+
Go to the Alibaba Cloud Console → Profile Icon → **AccessKey** → Create one if needed.
88+
89+
You can also create a hologres user (Click your instance to enter instance detail page -> click "Account Management" -> "Create Custom User" -> Choose "Superuser") and use the username and password for PG_USER and PG_PASSWORD.
90+
- **Host & Port**:
91+
In the Hologres console, click your instance ID → Copy the **VPC Endpoint** (e.g., `hgxxx-cn-beijing-vpc.hologres.aliyuncs.com:xxxx`).
92+
- `Host` = domain without port (e.g., `hgxxx-cn-beijing-vpc.hologres.aliyuncs.com`)
93+
- `Port` = the number after `:`
94+
95+
---
96+

hologres/ddl.sql

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
1+
set hg_experimental_enable_nullable_clustering_key = true;
12
CREATE TABLE bluesky (
2-
data JSONB NOT NULL
3-
);
3+
data JSONB NOT NULL,
4+
sort_key TEXT GENERATED ALWAYS AS (
5+
-- col1: kind
6+
CASE
7+
WHEN data ->> 'kind' IS NULL THEN '[NULL]'
8+
ELSE '[VAL]' || (data ->> 'kind')
9+
END || '|__COL1__|' ||
10+
11+
-- col2: operation
12+
CASE
13+
WHEN data -> 'commit' ->> 'operation' IS NULL THEN '[NULL]'
14+
ELSE '[VAL]' || (data -> 'commit' ->> 'operation')
15+
END || '|__COL2__|' ||
16+
17+
-- col3: collection
18+
CASE
19+
WHEN data -> 'commit' ->> 'collection' IS NULL THEN '[NULL]'
20+
ELSE '[VAL]' || (data -> 'commit' ->> 'collection')
21+
END || '|__COL3__|' ||
22+
23+
-- col4: did
24+
CASE
25+
WHEN data ->> 'did' IS NULL THEN '[NULL]'
26+
ELSE '[VAL]' || (data ->> 'did')
27+
END
28+
) STORED
29+
) WITH (clustering_key='sort_key');
430

531
ALTER TABLE bluesky ALTER COLUMN data SET (enable_columnar_type = ON);
632
CALL set_table_property('bluesky', 'dictionary_encoding_columns', 'data:auto');
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"system": "Alibaba Cloud Hologres",
33
"version": "r4.0",
4-
"date": "2025-09-12",
4+
"date": "2025-10-09",
55
"machine": "Hologres Instance 32CU",
66
"retains_structure": "yes",
77
"tags": [
88
],
99
"dataset_size": 1000000000,
10-
"num_loaded_documents": 993999604,
11-
"total_size": 113935090070,
10+
"num_loaded_documents": 996999604,
11+
"total_size": 127917465027,
1212
"result": [
13-
[1.28344,0.387996,0.394197],
14-
[14.0496,12.3343,13.6941],
15-
[1.63458,0.75316,0.754978],
16-
[3.82664,2.58757,2.50737],
17-
[3.60571,2.67633,2.66443]
13+
[0.697501,0.374251,0.365646],
14+
[12.2569,13.2993,12.0589],
15+
[0.939368,0.928345,0.903049],
16+
[1.83206,1.7379,1.73663],
17+
[1.84332,1.83347,1.83504]
1818
]
1919
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"system": "Alibaba Cloud Hologres",
33
"version": "r4.0",
4-
"date": "2025-09-12",
4+
"date": "2025-10-09",
55
"machine": "Hologres Instance 32CU",
66
"retains_structure": "yes",
77
"tags": [
88
],
99
"dataset_size": 100000000,
10-
"num_loaded_documents": 97999984,
11-
"total_size": 11157250421,
10+
"num_loaded_documents": 99999984,
11+
"total_size": 12601313624,
1212
"result": [
13-
[0.164415,0.060582,0.061967],
14-
[2.1726,1.81505,1.83729],
15-
[0.202728,0.096507,0.097319],
16-
[0.397231,0.249259,0.246972],
17-
[0.407714,0.265204,0.265106]
13+
[0.101054,0.057932,0.055567],
14+
[2.03141,1.84107,1.81131],
15+
[0.120029,0.082595,0.08217],
16+
[0.207844,0.200552,0.20372],
17+
[0.224962,0.220324,0.223028]
1818
]
1919
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"system": "Alibaba Cloud Hologres",
33
"version": "r4.0",
4-
"date": "2025-09-12",
4+
"date": "2025-10-09",
55
"machine": "Hologres Instance 32CU",
66
"retains_structure": "yes",
77
"tags": [
88
],
99
"dataset_size": 10000000,
1010
"num_loaded_documents": 9999997,
11-
"total_size": 1185315603,
11+
"total_size": 1301202397,
1212
"result": [
13-
[0.041749,0.026402,0.025736],
14-
[0.349737,0.282813,0.301415],
15-
[0.053863,0.033616,0.033054],
16-
[0.0812,0.055007,0.056155],
17-
[0.089086,0.061353,0.059887]
13+
[0.036402,0.025785,0.025481],
14+
[0.305669,0.268813,0.293167],
15+
[0.038443,0.032315,0.032234],
16+
[0.049201,0.051427,0.051265],
17+
[0.054289,0.055561,0.055911]
1818
]
1919
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"system": "Alibaba Cloud Hologres",
33
"version": "r4.0",
4-
"date": "2025-09-12",
4+
"date": "2025-10-09",
55
"machine": "Hologres Instance 32CU",
66
"retains_structure": "yes",
77
"tags": [
88
],
99
"dataset_size": 1000000,
1010
"num_loaded_documents": 1000000,
11-
"total_size": 121403438,
11+
"total_size": 134518668,
1212
"result": [
13-
[0.05821,0.024254,0.025168],
14-
[0.096473,0.05756,0.051771],
15-
[0.074038,0.025263,0.031265],
16-
[0.094472,0.035952,0.035384],
17-
[0.08237,0.047902,0.03876]
13+
[0.023704,0.021303,0.021568],
14+
[0.053402,0.047572,0.046956],
15+
[0.025029,0.023787,0.022639],
16+
[0.026078,0.025655,0.02596],
17+
[0.027063,0.028376,0.039474]
1818
]
1919
}

hologres/run_queries.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ echo "[$(date '+%Y-%m-%d %H:%M:%S')] $(basename "$0") START"
1515

1616
cat queries.sql | while read -r query; do
1717

18-
echo "Clearing cache..."
19-
$HOLOGRES_PSQL -d "$DB_NAME" -c "select hg_admin_command('freecache');"
20-
echo "Cache cleared."
18+
# Hologres stores data in Pangu (distributed FS), which has no caching - therefore no need to clear OS or Pangu cache.
19+
20+
# echo "Clearing file system cache..."
21+
# sync
22+
# echo 3 | sudo tee /proc/sys/vm/drop_caches >/dev/null
23+
# echo "File system cache cleared."
2124

2225
# Print the query
2326
echo "(TRIES: $TRIES) Running query: $query"

0 commit comments

Comments
 (0)