GithubHelp home page GithubHelp logo

akongstad / csp-clouddb-benchmarking Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 134 KB

Benchmarking AWS, Google cloud, and azure database options | Computer Systems Performance 2024 | Project 2

Python 100.00%

csp-clouddb-benchmarking's Introduction

CloudDb Benchmarking

Benchmarking AWS, Google cloud, and azure database options | Computer Systems Performance 2024 | Project 2

Running HammerDB on VM's via CLI

Setting up vm with HammmerDB via docker.

Create and ssh into linux VM

Set up Docker's apt repository.

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:**
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Install docker

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
docker --version

Pull and tag hammerdb image

sudo docker pull tpcorg/hammerdb
sudo docker tag  tpcorg/hammerdb hammerdb

Run the image

sudo docker run -it --name hammerdb hammerdb bash

Setup HammerDB

cd scripts/python/mssqls/tprocc

We need to set connection settings in all py files!

diset('connection','mssqls_tcp','false')
diset('connection','mssqls_port','1433')
diset('connection','mssqls_azure','true')
diset('connection','mssqls_encrypt_connection','true')
diset('connection','mssqls_trust_server_cert','true')
diset('connection','mssqls_authentication','sql')
diset('connection','mssqls_server','<IP>')
diset('connection','mssqls_linux_server','<IP>')
diset('connection','mssqls_linux_authent','sql')
diset('connection','mssqls_linux_odbc','{ODBC Driver 18 for SQL Server}')
diset('connection','mssqls_uid','azureuser')
diset('connection','mssqls_pass','PASSWORD')

Set mssqls_tprocc_buildschema.py Set virtual users and warehouses:

vu = <AMOUNT OF VUs>
warehouse = int(vu) * 5
diset('tpcc','mssqls_count_ware',warehouse)
diset('tpcc','mssqls_num_vu',vu)

Set mssqls_tprocc_deleteschema.py

Set mssqls_tprocc_result.py

Set mssqls_tprocc_run.py Set virtual users.

diset('tpcc','mssqls_dbase','tpcc')
diset('tpcc','mssqls_driver','timed')
diset('tpcc','mssqls_total_iterations','10000000')
diset('tpcc','mssqls_rampup','2')
diset('tpcc','mssqls_duration','5')
diset('tpcc','mssqls_allwarehouse','true')
diset('tpcc','mssqls_timeprofile','true')
diset('tpcc','mssqls_checkpoint','false')
...
loadscript()
print("TEST STARTED")
vuset('vu','<AMOUNTVUs>')
vucreate()
tcstart()
tcstatus()
jobid = tclpy.eval('vurun')
vudestroy()
tcstop()
...

Execute HammerDB

Move script to source folder.

mv mssqls_tprocc_py.sh ../../../../
./mssqls_tprocc_py.sh

Between runs

Change vu in scripts

cd scripts/python/mssqls/tprocc
vim mssqls_tprocc_buildschema.py
vim mssqls_tprocc_run.py
vim mssqls_tprocc_deleteschema.py

Re run benchmark

cd /home/HammerDB-4.10/
./mssqls_tprocc_py.sh

Getting data from HammerDB docker container to local

docker cp <containerId>:/file/path/within/container /host/path/target

Use either the cloud provider GUI or scp to download the files from the VM.

Consoles

  1. Azure: https://portal.azure.com/#home
  2. Google Cloud: https://console.cloud.google.com/welcome/

Offers

  1. Azure: (100$ credits for students) https://azure.microsoft.com/en-us/free/students
  2. Google cloud: (new customers 300$ credits) https://cloud.google.com/free?hl=en

csp-clouddb-benchmarking's People

Contributors

akongstad avatar stender98 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.