Skip to content

Commit

Permalink
Added --storage.tsdb.retention.size to retain data for certain size.
Browse files Browse the repository at this point in the history
Signed-off-by: Kushal Shukla <[email protected]>
  • Loading branch information
kushalShukla-web committed Nov 19, 2024
1 parent 1c39d4f commit 18b922f
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 4 deletions.
30 changes: 29 additions & 1 deletion prombench/docs/eks.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,36 @@ Run Prombench tests in [Elastic Kubernetes Service (EKS)](https://aws.amazon.com
```bash
make node_create
```
3. 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.

3. **Deploy the Kubernetes Objects**:
In this setup, you have two choices:

Here’s how each option works:
- **Option 1: Download data from object storage**

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.
> Note: Make sure this secret applied before ```3b_prometheus-test_deployment.yaml```

- **Option 2: Skip downloading data**

If you don’t Want to Download data create an empty secret like this -

```yaml
# Empty Secret to Skip Downloading Data
apiVersion: v1
kind: Secret
metadata:
name: bucket-secret
namespace: prombench-{{ .PR_NUMBER }}
type: Opaque
stringData:
object-config.yml:
Regardless of the option chosen, data stored in Prometheus will only be retained based on the configured retention settings (`--storage.tsdb.retention.size`).

> **⚠️ 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.

4. **Deploy the Kubernetes Objects**:

```bash
make resource_apply
Expand Down
30 changes: 29 additions & 1 deletion prombench/docs/gke.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,36 @@ Run Prombench tests in [Google Kubernetes Engine (GKE)](https://cloud.google.com
```bash
make node_create
```
3. 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.

3. **Deploy the Kubernetes Objects**:
In this setup, you have two choices:

Here’s how each option works:
- **Option 1: Download data from object storage**

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.
> Note: Make sure this secret applied before ```3b_prometheus-test_deployment.yaml```

- **Option 2: Skip downloading data**

If you don’t Want to Download data create an empty secret like this -

```yaml
# Empty Secret to Skip Downloading Data
apiVersion: v1
kind: Secret
metadata:
name: bucket-secret
namespace: prombench-{{ .PR_NUMBER }}
type: Opaque
stringData:
object-config.yml:
Regardless of the option chosen, data stored in Prometheus will only be retained based on the configured retention settings (`--storage.tsdb.retention.size`).
> **⚠️ 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.
4. **Deploy the Kubernetes Objects**:
```bash
make resource_apply
Expand Down
4 changes: 4 additions & 0 deletions prombench/docs/kind.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ metadata:
type: Opaque
stringData:
object-config.yml:
Regardless of the option chosen, data stored in Prometheus will only be retained based on the configured retention settings (`--storage.tsdb.retention.size`).
> **⚠️ 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.
3. Deploy the Kubernetes objects:
> **_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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ spec:
"--web.external-url=http://{{ .DOMAIN_NAME }}/{{ .PR_NUMBER }}/prometheus-pr",
"--storage.tsdb.path=/prometheus",
"--config.file=/etc/prometheus/prometheus.yml",
"--log.level=debug"
"--log.level=debug",
"--storage.tsdb.retention.size=5GB"
]
volumeMounts:
- name: config-volume
Expand Down Expand Up @@ -199,7 +200,8 @@ spec:
"--web.external-url=http://{{ .DOMAIN_NAME }}/{{ .PR_NUMBER }}/prometheus-release",
"--storage.tsdb.path=/prometheus",
"--config.file=/etc/prometheus/prometheus.yml",
"--log.level=debug"
"--log.level=debug",
"--storage.tsdb.retention.size=5GB"
]
volumeMounts:
- name: config-volume
Expand Down

0 comments on commit 18b922f

Please sign in to comment.