Skip to content

Commit 2c1f884

Browse files
Added --storage.tsdb.retention.size to retain data for certain size.
Signed-off-by: Kushal Shukla <kushalshukla110@gmail.com>
1 parent 1c39d4f commit 2c1f884

4 files changed

Lines changed: 69 additions & 4 deletions

File tree

prombench/docs/eks.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,37 @@ Run Prombench tests in [Elastic Kubernetes Service (EKS)](https://aws.amazon.com
107107
```bash
108108
make node_create
109109
```
110+
3. **Setting Up Benchmarking Data**
111+
When setting up a benchmarking environment, it’s often useful to have pre-generated data available.This data can help speed up testing and make benchmarks more realistic by simulating actual workloads.
110112

111-
3. **Deploy the Kubernetes Objects**:
113+
In this setup, you have two choices:
114+
115+
Here’s how each option works:
116+
- **Option 1: Download data from object storage**
117+
118+
To download data from object storage, create a Kubernetes secret with exact named `bucket-secret` and file name ```object-config.yml``` with the necessary credentials as per your object storage. This secret enables access to the stored data.
119+
> Note: Make sure this secret applied before ```3b_prometheus-test_deployment.yaml```
120+
121+
- **Option 2: Skip downloading data**
122+
123+
If you don’t Want to Download data create an empty secret like this -
124+
125+
```yaml
126+
# Empty Secret to Skip Downloading Data
127+
apiVersion: v1
128+
kind: Secret
129+
metadata:
130+
name: bucket-secret
131+
namespace: prombench-{{ .PR_NUMBER }}
132+
type: Opaque
133+
stringData:
134+
object-config.yml:
135+
136+
Regardless of the option chosen, data stored in Prometheus will only be retained based on the configured retention settings (`--storage.tsdb.retention.size`).
137+
138+
> **⚠️ Warning:** The benchmark will change its basis when the retention size limit is reached and older downloaded blocks are deleted. Ensure that you have sufficient retention settings configured to avoid data loss that could affect benchmarking results.
139+
140+
4. **Deploy the Kubernetes Objects**:
112141

113142
```bash
114143
make resource_apply

prombench/docs/gke.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,38 @@ Run Prombench tests in [Google Kubernetes Engine (GKE)](https://cloud.google.com
9696
```bash
9797
make node_create
9898
```
99+
3. **Setting Up Benchmarking Data**
99100

100-
3. **Deploy the Kubernetes Objects**:
101+
When setting up a benchmarking environment, it’s often useful to have pre-generated data available.This data can help speed up testing and make benchmarks more realistic by simulating actual workloads.
102+
103+
In this setup, you have two choices:
104+
105+
Here’s how each option works:
106+
- **Option 1: Download data from object storage**
107+
108+
To download data from object storage, create a Kubernetes secret with exact named `bucket-secret` and file name ```object-config.yml``` with the necessary credentials as per your object storage. This secret enables access to the stored data.
109+
> Note: Make sure this secret applied before ```3b_prometheus-test_deployment.yaml```
110+
111+
- **Option 2: Skip downloading data**
112+
113+
If you don’t Want to Download data create an empty secret like this -
114+
115+
```yaml
116+
# Empty Secret to Skip Downloading Data
117+
apiVersion: v1
118+
kind: Secret
119+
metadata:
120+
name: bucket-secret
121+
namespace: prombench-{{ .PR_NUMBER }}
122+
type: Opaque
123+
stringData:
124+
object-config.yml:
125+
126+
Regardless of the option chosen, data stored in Prometheus will only be retained based on the configured retention settings (`--storage.tsdb.retention.size`).
127+
128+
> **⚠️ Warning:** The benchmark will change its basis when the retention size limit is reached and older downloaded blocks are deleted. Ensure that you have sufficient retention settings configured to avoid data loss that could affect benchmarking results.
129+
130+
4. **Deploy the Kubernetes Objects**:
101131
102132
```bash
103133
make resource_apply

prombench/docs/kind.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ metadata:
140140
type: Opaque
141141
stringData:
142142
object-config.yml:
143+
144+
Regardless of the option chosen, data stored in Prometheus will only be retained based on the configured retention settings (`--storage.tsdb.retention.size`).
145+
146+
> **⚠️ Warning:** The benchmark will change its basis when the retention size limit is reached and older downloaded blocks are deleted. Ensure that you have sufficient retention settings configured to avoid data loss that could affect benchmarking results.
143147

144148
3. Deploy the Kubernetes objects:
145149
> **_Note:_** If you encounter a `too many files open` error caused by promtail, increase the default value of `/proc/sys/fs/inotify/max_user_instances` from 128 to 512:

prombench/manifests/prombench/benchmark/3b_prometheus-test_deployment.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ spec:
8181
"--web.external-url=http://{{ .DOMAIN_NAME }}/{{ .PR_NUMBER }}/prometheus-pr",
8282
"--storage.tsdb.path=/prometheus",
8383
"--config.file=/etc/prometheus/prometheus.yml",
84-
"--log.level=debug"
84+
"--log.level=debug",
85+
"--storage.tsdb.retention.size=5GB"
8586
]
8687
volumeMounts:
8788
- name: config-volume
@@ -199,7 +200,8 @@ spec:
199200
"--web.external-url=http://{{ .DOMAIN_NAME }}/{{ .PR_NUMBER }}/prometheus-release",
200201
"--storage.tsdb.path=/prometheus",
201202
"--config.file=/etc/prometheus/prometheus.yml",
202-
"--log.level=debug"
203+
"--log.level=debug",
204+
"--storage.tsdb.retention.size=5GB"
203205
]
204206
volumeMounts:
205207
- name: config-volume

0 commit comments

Comments
 (0)