-
Notifications
You must be signed in to change notification settings - Fork 2
Install update #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Install update #56
Changes from 9 commits
420b904
5a58e1d
513ed83
de9795f
a9d55ba
4b29984
982b980
1838b42
28b5d55
be9d2cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| "bc", | ||
| "git", | ||
| "unzip", | ||
| "wget", | ||
| "zip" | ||
| ], | ||
| "pip": [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "dependencies": { | ||
| "rhel": [ | ||
| "mssql-server", | ||
| "unixODBC-devel", | ||
| "gdb", | ||
| "cyrus-sasl", | ||
| "libatomic", | ||
| "lsof" | ||
| ], | ||
| "pip": [ | ||
| "typing-extensions" | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #!/bin/tclsh | ||
| # | ||
|
|
||
| puts "SETTING CONFIGURATION" | ||
|
|
||
| global complete | ||
| proc wait_to_complete {} { | ||
| global complete | ||
| set complete [vucomplete] | ||
| if {!$complete} {after 5000 wait_to_complete} else { exit } | ||
| } | ||
|
|
||
|
|
||
| dbset db mysql | ||
| diset connection mysql_host 127.0.0.1 | ||
| diset connection mysql_port 3306 | ||
| diset tpcc mysql_count_ware 500 | ||
| diset tpcc mysql_partition true | ||
| diset tpcc mysql_num_vu 50 | ||
| diset tpcc mysql_pass mysql | ||
| diset tpcc mysql_storage_engine innodb | ||
| print dict | ||
| buildschema | ||
| wait_to_complete | ||
| vwait forever |
|
dvalinrh marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| [mysqld] | ||
| #large-pages | ||
| skip-log-bin | ||
| datadir=/perf1/mysql/data | ||
| port=3306 | ||
| skip-networking=0 | ||
| skip-bind-address | ||
| skip-grant-tables | ||
|
|
||
| # general | ||
| max_connections=4000 | ||
| table_open_cache=8000 | ||
| #table_open_cache_instances=16 | ||
| back_log=1500 | ||
| #default_password_lifetime=0 | ||
| ssl=0 | ||
| performance_schema=OFF | ||
| max_prepared_stmt_count=128000 | ||
| skip_log_bin=1 | ||
| character_set_server=latin1 | ||
| collation_server=latin1_swedish_ci | ||
| transaction_isolation=REPEATABLE-READ | ||
|
|
||
| # files | ||
| innodb_file_per_table | ||
| innodb_log_file_size=1024M | ||
| innodb_log_files_in_group=32 | ||
| innodb_open_files=4000 | ||
|
|
||
| # buffers | ||
| innodb_buffer_pool_size=16384M | ||
| innodb_buffer_pool_instances=16 | ||
| innodb_log_buffer_size=64M | ||
|
|
||
| # tune | ||
| innodb_doublewrite=0 | ||
| innodb_thread_concurrency=0 | ||
| innodb_flush_log_at_trx_commit=0 | ||
| innodb_max_dirty_pages_pct=90 | ||
| #innodb_max_dirty_pages_pct_lwm=10 | ||
|
|
||
| join_buffer_size=32K | ||
| sort_buffer_size=32K | ||
| innodb_use_native_aio=1 | ||
| #innodb_stats_persistent=1 | ||
| innodb_spin_wait_delay=6 | ||
|
|
||
| #innodb_max_purge_lag_delay=300000 | ||
| #innodb_max_purge_lag=0 | ||
| innodb_flush_method=O_DIRECT | ||
| #innodb_checksum_algorithm=none | ||
| #innodb_io_capacity=4000 | ||
| #innodb_io_capacity_max=20000 | ||
| #innodb_lru_scan_depth=9000 | ||
| innodb_change_buffering=none | ||
| #innodb_read_only=0 | ||
| #innodb_page_cleaners=4 | ||
| #innodb_undo_log_truncate=off | ||
|
|
||
| # perf special | ||
| innodb_adaptive_flushing=1 | ||
| #innodb_flush_neighbors=0 | ||
| innodb_read_io_threads=16 | ||
| innodb_write_io_threads=16 | ||
| innodb_purge_threads=4 | ||
| innodb_adaptive_hash_index=0 | ||
|
|
||
| # monitoring | ||
| #innodb_monitor_enable='%' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| #!/bin/sh | ||
| export PATH=$PATH:.: | ||
|
|
||
| LD_LIBRARY_PATH=/lib64/mariadb:$LD_LIBRARY_PATH | ||
| export LD_LIBRARY_PATH | ||
|
|
||
| ## Set variables for the run | ||
| storagetype="Storage not specified" | ||
| Usercount="10 20 40 80 100" | ||
| whc="500" | ||
| DBRESTARTUP="n" | ||
| Testname="HDB_tpcc_mariadb" | ||
|
|
||
| usage() | ||
| { | ||
| echo "Usage: | ||
| run_mssql_tpcc.sh [-h] [-u users] [-t runlength] [-w warehouse count] [-s storage type] | ||
|
|
||
| Usage: | ||
| -h help | ||
| -u # of users (Default - "10 20 40 80 100") | ||
| -t runlength in minutes (Default - 15 minuteS) | ||
| -w warehouse count (Default - 500 ) | ||
| -s storage type ( Default - "Storage not speficied" ) | ||
|
|
||
| Examples: | ||
| run_mariadb_tpcc.sh -u "10 20 30" | ||
| Do runs with 10, 20 and 30 users | ||
| run_mariadb_tpcc.sh -s "nvme" | ||
| Do a 10 user, 500 warehouse, 15 minute run with storage type as "nvme" | ||
| run_mariadb_tpcc.sh -w 1000 -u "10 20 40 80 100" -s "iscsi" | ||
| Do a 1000 warehouse run with 10 20 40 80 and 100 users and storage type specified as iscsi | ||
| " | ||
| } | ||
|
|
||
| while [ $# -gt 0 ] | ||
| do | ||
| case $1 in | ||
| -h) usage; | ||
| exit; | ||
| ;; | ||
| -w) whc=$2 | ||
| shift 2 | ||
| ;; | ||
| -u) Usercount=$2 | ||
| shift 2 | ||
| ;; | ||
| -s) storagetype=$2 | ||
| shift 2 | ||
| ;; | ||
| -t) RUNLENGTH=$2 | ||
| shift 2 | ||
| ;; | ||
| *) usage; | ||
| exit; | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| mkdir -p results | ||
|
|
||
| if [ -z "${benchmark_results_dir}" ] | ||
| then | ||
| benchmark_results_dir=`pwd`"/results" | ||
| fi | ||
|
|
||
| if [ -z "${benchmark_run_dir}" ] | ||
| then | ||
| benchmark_run_dir=`pwd`"/results" | ||
| fi | ||
|
|
||
| #echo ${storagetype} | ||
| #echo ${Usercount} | ||
| #echo ${benchmark_results_dir} | ||
| #echo ${whc} | ||
|
|
||
|
|
||
| ## Collecting system information | ||
| benchmark_name="Hammerdb-tpcc" | ||
| benchmark_ver="HammerDB-3.2" | ||
| hostnm=`hostname -f` | ||
| hostip=`hostname -i` | ||
| numcpu=`nproc` | ||
| totmem=`cat /proc/meminfo |grep "MemTotal:" | awk '{print $2}'` | ||
| krel=`uname -r` ## Kernel | ||
|
|
||
|
|
||
| # Set Host IP and Warehouse Count in the tcl file | ||
| sed -i "s/^diset tpcc mysql_count_ware.*/diset tpcc mysql_count_ware ${whc}/" runtest_mariadb.tcl | ||
|
|
||
| echo "StartTime,EndTime,Hostname,Kernel,Database,DBVer,Cpus,Memory,StorageType,Users,Tpm" > user-benchmark-result.csv | ||
| mariaver=`mysql -V |awk '{print $5}' | sed -e 's/,//'` | ||
|
|
||
|
|
||
| for uc in ${Usercount} | ||
| do | ||
| echo "Restarting Database before each run" | ||
| systemctl restart mariadb.service | ||
|
dvalinrh marked this conversation as resolved.
|
||
| starttime=`date +%Y.%m.%d.%T` | ||
| echo "Run with ${uc} users" | ||
| sed -i "s/^vuset.*/vuset vu ${uc}/" runtest_mariadb.tcl | ||
| ./hammerdbcli auto runtest_mariadb.tcl > test_mariadb_${Testname}_${uc}.out 2>&1 | ||
| endtime=`date +%Y.%m.%d.%T` | ||
| grep RESULT test_mariadb_${Testname}_${uc}.out | ||
| tpm=`grep TPM test_mariadb_${Testname}_${uc}.out | awk '{print $7}'` | ||
| echo "\"${starttime}\",\"${endtime}\",\"${hostnm}\",\"${krel}\",\"Mariadb\",\"${mariaver}\",\"${numcpu}\",\"${totmem}\",\"${storagetype}\",\"${uc}\",\"${tpm}\"" >> user-benchmark-result.csv | ||
| cp user-benchmark-result.csv $benchmark_results_dir | ||
| cp /etc/my.cnf $benchmark_results_dir | ||
| cp test_mariadb_${Testname}_${uc}.out $benchmark_results_dir | ||
| done | ||
| systemctl stop mariadb.service | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/bin/tclsh | ||
| # | ||
|
|
||
| puts "SETTING CONFIGURATION" | ||
|
|
||
| global complete | ||
| proc wait_to_complete {} { | ||
| global complete | ||
| set complete [vucomplete] | ||
| if {!$complete} {after 5000 wait_to_complete} else { exit } | ||
| } | ||
|
|
||
| dbset db mysql | ||
| dbset bm TPC-C | ||
| diset connection mysql_host 127.0.0.1 | ||
| diset connection mysql_port 3306 | ||
| diset tpcc mysql_pass mysql | ||
| diset tpcc mysql_count_ware 500 | ||
| diset tpcc mysql_driver timed | ||
| diset tpcc mysql_rampup 2 | ||
| diset tpcc mysql_duration 15 | ||
| loadscript | ||
| vuset vu 10 | ||
| vucreate | ||
| vurun | ||
|
|
||
| wait_to_complete | ||
| vwait forever |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/tclsh | ||
| # | ||
|
|
||
| puts "SETTING CONFIGURATION" | ||
|
|
||
| global complete | ||
| proc wait_to_complete {} { | ||
| global complete | ||
| set complete [vucomplete] | ||
| if {!$complete} {after 5000 wait_to_complete} else { exit } | ||
| } | ||
|
|
||
|
|
||
| dbset db mssqls | ||
| dbset bm TPC-C | ||
| diset connection mssqls_linux_server 127.0.0.1 | ||
| diset connection mssqls_pass abcdefgh | ||
| diset tpcc mssqls_count_ware 500 | ||
| diset tpcc mssqls_num_vu 40 | ||
|
|
||
| buildschema | ||
| wait_to_complete | ||
| vwait forever |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,25 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Create database files | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /opt/mssql-tools/bin/sqlcmd -U sa -P abcdefgh <<! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoded SA password spans multiple scripts. The password 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| drop database tpcc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| go | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+3
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DROP DATABASE fails if database doesn't exist. The unconditional 🔧 Suggested fix-drop database tpcc
+IF EXISTS (SELECT name FROM sys.databases WHERE name = 'tpcc')
+BEGIN
+ DROP DATABASE tpcc
+END
go📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CREATE DATABASE tpcc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ON PRIMARY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ( NAME = MSSQL_data_1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FILENAME = '/perf1/mssql_data/data/MSSQL_tpcc_Data_1.mdf', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SIZE = 32768MB, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FILEGROWTH = 20) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| LOG ON | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ( NAME = MSSQL_tpcc_Log, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FILENAME = '/perf1/mssql_data/data/tpcc_Log.ldf', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SIZE = 20480MB, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FILEGROWTH = 500MB, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MAXSIZE = 270000MB) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| go | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ALTER DATABASE tpcc ADD FILE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ( NAME = MSSQL_data_2, FILENAME = '/perf1/mssql_data/data/MSSQL_tpcc_Data_2.mdf', SIZE = 32768) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GO | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add shebang and error handling. The script lacks both a shebang line and error handling. If the 🔧 Suggested fix+#!/bin/bash
+set -e
+
# Create database filesThe 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.