0% found this document useful (0 votes)
2 views2 pages

Hadiah - Guide For Keyvalue Database

The document outlines an experiment guide for benchmarking key-value database operations using Redis. The objective is to test performance through CRUD operations on a large dataset, with detailed steps for installation, setup, and execution. The analysis involves comparing performance across varying data sizes to evaluate the efficiency of key-value databases.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Hadiah - Guide For Keyvalue Database

The document outlines an experiment guide for benchmarking key-value database operations using Redis. The objective is to test performance through CRUD operations on a large dataset, with detailed steps for installation, setup, and execution. The analysis involves comparing performance across varying data sizes to evaluate the efficiency of key-value databases.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

EXPERIMENT GUIDE FOR KEY VALUE DATABASE

Leader: Hadiah(康隽秀)

Experiment Topic: Benchmarking Key-Value Operations


Objective: Test the performance of a KV database (e.g., Redis, Cassandra, or DynamoDB) by
benchmarking basic operations like adding, updating, retrieving, and deleting data.
Procedure:

Summary:
● Set up a key-value store using Redis.
● Load the database with a large dataset (e.g., 1 million key-value pairs).
● Perform CRUD operations and measure their time.
● Vary the size of the dataset to see how performance scales.

Detailed steps of the procedure for the experiment:

1. install redis server.


Tutorial link:
[Link]
2. create a project and install needed packages in venv (i recommend PyCharm - it is quite easy
to use)
3. - new python project
- create venv -> realization depends on your system
- (venv) pip install redis
- (venv) pip install matplotlib #if you want to make graphs too.

3. Copy paste the code below (to test DB - [Link], to see the graphs - [Link]) and run it:

import redis

r = [Link](
host='localhost',
port=6379
)

[Link](1, 'meow') #create


[Link](1, 'woof') #create
[Link](2, 'test2') #create

value = [Link](1)
print(value) #read
[Link](2) #delete
value2 = [Link](2) #not storing anymore
print(value2)

4. wait a bit and enjoy the result!

Analysis: Compare performance across different data sizes and discuss how efficient KV
databases are for simple operations.

You might also like