diff --git a/cosmos/infra/azuredeploy.json b/cosmos/infra/azuredeploy.json index 95919464..bbb45f16 100644 --- a/cosmos/infra/azuredeploy.json +++ b/cosmos/infra/azuredeploy.json @@ -190,6 +190,13 @@ "description": "Specifies insert operation percentage from 0 to 1" } }, + "deleteproportion": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Specifies delete operation percentage from 0 to 1" + } + }, "writeOnlyOperation": { "type": "bool", "defaultValue": false, @@ -501,7 +508,7 @@ "settings": { }, "protectedSettings": { - "commandToExecute": "[concat('DB_BINDING_NAME=',parameters('ycsbDatabaseBindingName'),' ','ADMIN_USER_NAME=',parameters('adminUsername'),' ','BENCHMARKING_TOOLS_URL=',variables('benchmarkingToolsURL'),' ','BENCHMARKING_TOOLS_BRANCH_NAME=',parameters('benchmarkingToolsBranchName'),' ','YCSB_GIT_REPO_URL=',variables('ycsbGitHubRepoUrl'),' ','GUID=',parameters('guidValue'),' ','YCSB_GIT_BRANCH_NAME=',parameters('ycsbGitHubBranchName'),' ','TARGET_OPERATIONS_PER_SECOND=',parameters('targetOperationsPerSecond'),' ','THREAD_COUNT=',parameters('threads'),' ','YCSB_OPERATION_COUNT=',parameters('ycsbOperationCount'), ' ','WORKLOAD_TYPE=',parameters('workloadType'),' ','VM_NAME=',variables('vmName'),copyIndex(1), ' ','RESULT_STORAGE_CONNECTION_STRING=','\"',parameters('resultsStorageConnectionString'),'\"',' ','COSMOS_URI=','\"',parameters('cosmosURI'),'\"', ' ','COSMOS_KEY=',parameters('cosmosKey'), ' ','VM_COUNT=',parameters('vmCount'), ' ','USE_GATEWAY=',parameters('useGateway'), ' ','DIAGNOSTICS_LATENCY_THRESHOLD_IN_MS=',parameters('diagnosticsLatencyThresholdInMS'), ' ','YCSB_RECORD_COUNT=',parameters('ycsbRecordCount'), ' ','WRITE_ONLY_OPERATION=',parameters('writeOnlyOperation'), ' ','READ_PROPORTION=',parameters('readproportion'), ' ','SCAN_PROPORTION=',parameters('scanproportion'), ' ','UPDATE_PROPORTION=',parameters('updateproportion'), ' ','INSERT_PROPORTION=',parameters('insertproportion'), ' ','REQUEST_DISTRIBUTION=',parameters('requestdistribution'), ' ','INSERT_ORDER=',parameters('insertorder'), ' ','CUSTOM_SCRIPT_URL=',variables('customScriptUrl'), ' ','MACHINE_INDEX=',copyIndex(1), ' ','INCLUDE_EXCEPTION_STACK=',parameters('includeExceptionStackInLog'), ' ','FIELD_COUNT=',parameters('fieldcount'), ' ','SKIP_LOAD_PHASE=',parameters('skipLoadPhase'), ' ','WAIT_FOR_FAULT_TO_START_IN_SEC=',parameters('waitForFaultToStartInSec'), ' ','DURATION_OF_FAULT_IN_SEC=',parameters('durationOfFaultInSec'), ' ','DROP_PROBABILITY=',parameters('dropProbability'), ' ','FAULT_REGION=','\"',parameters('faultRegion'),'\"',' ','DELAY_IN_MS=',parameters('delayInMs'),' ','USER_AGENT=',parameters('userAgent'), ' ','PREFERRED_REGION_LIST=','\"',parameters('preferredRegionList'),'\"',' ','APP_INSIGHT_CONN_STR=','\"',parameters('appInsightConnectionString'),'\"',' ', 'bash ',variables('vmScriptExtensionScriptName'))]", + "commandToExecute": "[concat('DB_BINDING_NAME=',parameters('ycsbDatabaseBindingName'),' ','ADMIN_USER_NAME=',parameters('adminUsername'),' ','BENCHMARKING_TOOLS_URL=',variables('benchmarkingToolsURL'),' ','BENCHMARKING_TOOLS_BRANCH_NAME=',parameters('benchmarkingToolsBranchName'),' ','YCSB_GIT_REPO_URL=',variables('ycsbGitHubRepoUrl'),' ','GUID=',parameters('guidValue'),' ','YCSB_GIT_BRANCH_NAME=',parameters('ycsbGitHubBranchName'),' ','TARGET_OPERATIONS_PER_SECOND=',parameters('targetOperationsPerSecond'),' ','THREAD_COUNT=',parameters('threads'),' ','YCSB_OPERATION_COUNT=',parameters('ycsbOperationCount'), ' ','WORKLOAD_TYPE=',parameters('workloadType'),' ','VM_NAME=',variables('vmName'),copyIndex(1), ' ','RESULT_STORAGE_CONNECTION_STRING=','\"',parameters('resultsStorageConnectionString'),'\"',' ','COSMOS_URI=','\"',parameters('cosmosURI'),'\"', ' ','COSMOS_KEY=',parameters('cosmosKey'), ' ','VM_COUNT=',parameters('vmCount'), ' ','USE_GATEWAY=',parameters('useGateway'), ' ','DIAGNOSTICS_LATENCY_THRESHOLD_IN_MS=',parameters('diagnosticsLatencyThresholdInMS'), ' ','YCSB_RECORD_COUNT=',parameters('ycsbRecordCount'), ' ','WRITE_ONLY_OPERATION=',parameters('writeOnlyOperation'), ' ','READ_PROPORTION=',parameters('readproportion'), ' ','SCAN_PROPORTION=',parameters('scanproportion'), ' ','UPDATE_PROPORTION=',parameters('updateproportion'), ' ','INSERT_PROPORTION=',parameters('insertproportion'), ' ','DELETE_PROPORTION=',parameters('deleteproportion'),' ','REQUEST_DISTRIBUTION=',parameters('requestdistribution'), ' ','INSERT_ORDER=',parameters('insertorder'), ' ','CUSTOM_SCRIPT_URL=',variables('customScriptUrl'), ' ','MACHINE_INDEX=',copyIndex(1), ' ','INCLUDE_EXCEPTION_STACK=',parameters('includeExceptionStackInLog'), ' ','FIELD_COUNT=',parameters('fieldcount'), ' ','SKIP_LOAD_PHASE=',parameters('skipLoadPhase'), ' ','WAIT_FOR_FAULT_TO_START_IN_SEC=',parameters('waitForFaultToStartInSec'), ' ','DURATION_OF_FAULT_IN_SEC=',parameters('durationOfFaultInSec'), ' ','DROP_PROBABILITY=',parameters('dropProbability'), ' ','FAULT_REGION=','\"',parameters('faultRegion'),'\"',' ','DELAY_IN_MS=',parameters('delayInMs'),' ','USER_AGENT=',parameters('userAgent'), ' ','PREFERRED_REGION_LIST=','\"',parameters('preferredRegionList'),'\"',' ','APP_INSIGHT_CONN_STR=','\"',parameters('appInsightConnectionString'),'\"',' ', 'bash ',variables('vmScriptExtensionScriptName'))]", "fileUris": [ "[concat(variables('vmScriptExtensionScriptURL'))]" ] } }, diff --git a/cosmos/scripts/azurecosmos-run.sh b/cosmos/scripts/azurecosmos-run.sh index c4aba8f3..da23e25d 100644 --- a/cosmos/scripts/azurecosmos-run.sh +++ b/cosmos/scripts/azurecosmos-run.sh @@ -60,6 +60,10 @@ if [ ! -z "$insertproportion" ]; then sed -i "s/^[#]*\s*insertproportion=.*/insertproportion=$insertproportion/" workloads/$workload fi +if [ ! -z "$deleteproportion" ]; then + sed -i "s/^[#]*\s*deleteproportion=.*/deleteproportion=$deleteproportion/" workloads/$workload +fi + if [ ! -z "$requestdistribution" ]; then sed -i "s/^[#]*\s*requestdistribution=.*/requestdistribution=$requestdistribution/" workloads/$workload fi diff --git a/cosmos/scripts/custom-script.sh b/cosmos/scripts/custom-script.sh index efce602f..7ac3c4d3 100644 --- a/cosmos/scripts/custom-script.sh +++ b/cosmos/scripts/custom-script.sh @@ -3,6 +3,17 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. +# Function to parse repo name from git repo URL +parse_repo_name() { + local repo_url="$1" + # Remove the .git suffix if present + YCSB_REPO_NAME=$(basename "$repo_url" .git) + echo "$YCSB_REPO_NAME" +} + +# Parse repo name from git url +YCSB_REPO_NAME=$(parse_repo_name "$YCSB_GIT_REPO_URL") + echo "##########VM NAME###########: $DB_BINDING_NAME" echo "##########VM NAME###########: $VM_NAME" echo "##########YCSB_RECORD_COUNT###########: $YCSB_RECORD_COUNT" @@ -15,13 +26,14 @@ echo "##########BENCHMARKING_TOOLS_BRANCH_NAME###########: $BENCHMARKING_TOOLS_B echo "##########BENCHMARKING_TOOLS_URL###########: $BENCHMARKING_TOOLS_URL" echo "##########YCSB_GIT_BRANCH_NAME###########: $YCSB_GIT_BRANCH_NAME" echo "##########YCSB_GIT_REPO_URL###########: $YCSB_GIT_REPO_URL" +echo "##########YCSB_GIT_REPO_NAME###########: $YCSB_REPO_NAME" echo "##########WAIT_FOR_FAULT_TO_START_IN_SEC###########: $WAIT_FOR_FAULT_TO_START_IN_SEC" echo "##########DURATION_OF_FAULT_IN_SEC###########: $DURATION_OF_FAULT_IN_SEC" echo "##########DROP_PROBABILITY###########: $DROP_PROBABILITY" echo "##########FAULT_REGION###########: $FAULT_REGION" echo "##########DELAY_IN_MS###########: $DELAY_IN_MS" echo "##########USER_AGENT###########: $USER_AGENT" - +echo "##########PREFERRED_REGION_LIST###########: $PREFERRED_REGION_LIST" # The index of the record to start at during the Load insertstart=$((YCSB_RECORD_COUNT * (MACHINE_INDEX - 1))) @@ -51,7 +63,7 @@ cp -r ./azure-db-benchmarking/cosmos/scripts/* /tmp/ycsb echo "########## Cloning YCSB repository ##########" git clone -b "$YCSB_GIT_BRANCH_NAME" --single-branch "$YCSB_GIT_REPO_URL" -cd YCSB +cd $YCSB_REPO_NAME echo "########## Pulling Latest YCSB ##########" git pull echo "########## Building YCSB ##########" @@ -189,7 +201,7 @@ if [ "$WRITE_ONLY_OPERATION" = True ] || [ "$WRITE_ONLY_OPERATION" = true ]; the ## Execute run phase for YCSB tests with write only workload echo "########## Run operation with write only workload for YCSB tests ###########" - uri=$COSMOS_URI primaryKey=$COSMOS_KEY workload_type=$WORKLOAD_TYPE ycsb_operation="run" insertproportion=1 readproportion=0 updateproportion=0 scanproportion=0 recordcount=$recordcountForWriteOps operationcount=$YCSB_OPERATION_COUNT threads=$THREAD_COUNT target=$TARGET_OPERATIONS_PER_SECOND useGateway=$USE_GATEWAY diagnosticsLatencyThresholdInMS=$DIAGNOSTICS_LATENCY_THRESHOLD_IN_MS requestdistribution=$REQUEST_DISTRIBUTION insertorder=$INSERT_ORDER includeExceptionStackInLog=$INCLUDE_EXCEPTION_STACK fieldcount=$FIELD_COUNT appInsightConnectionString=$APP_INSIGHT_CONN_STR userAgent=$USER_AGENT preferredRegionList=$PREFERRED_REGION_LIST bash $DB_BINDING_NAME-run.sh + uri=$COSMOS_URI primaryKey=$COSMOS_KEY workload_type=$WORKLOAD_TYPE ycsb_operation="run" insertproportion=1 readproportion=0 updateproportion=0 scanproportion=0 deleteproportion=0 recordcount=$recordcountForWriteOps operationcount=$YCSB_OPERATION_COUNT threads=$THREAD_COUNT target=$TARGET_OPERATIONS_PER_SECOND useGateway=$USE_GATEWAY diagnosticsLatencyThresholdInMS=$DIAGNOSTICS_LATENCY_THRESHOLD_IN_MS requestdistribution=$REQUEST_DISTRIBUTION insertorder=$INSERT_ORDER includeExceptionStackInLog=$INCLUDE_EXCEPTION_STACK fieldcount=$FIELD_COUNT appInsightConnectionString=$APP_INSIGHT_CONN_STR userAgent=$USER_AGENT preferredRegionList=$PREFERRED_REGION_LIST bash $DB_BINDING_NAME-run.sh else if [ "$SKIP_LOAD_PHASE" = False ] || [ "$SKIP_LOAD_PHASE" = false ]; then ## Execute load operation for YCSB tests @@ -223,7 +235,7 @@ else ## Execute run phase for YCSB tests echo "########## Run operation for YCSB tests ###########" - uri=$COSMOS_URI primaryKey=$COSMOS_KEY workload_type=$WORKLOAD_TYPE ycsb_operation="run" recordcount=$totalrecordcount operationcount=$YCSB_OPERATION_COUNT threads=$THREAD_COUNT target=$TARGET_OPERATIONS_PER_SECOND insertproportion=$INSERT_PROPORTION readproportion=$READ_PROPORTION updateproportion=$UPDATE_PROPORTION scanproportion=$SCAN_PROPORTION useGateway=$USE_GATEWAY diagnosticsLatencyThresholdInMS=$DIAGNOSTICS_LATENCY_THRESHOLD_IN_MS requestdistribution=$REQUEST_DISTRIBUTION insertorder=$INSERT_ORDER includeExceptionStackInLog=$INCLUDE_EXCEPTION_STACK fieldcount=$FIELD_COUNT appInsightConnectionString=$APP_INSIGHT_CONN_STR userAgent=$USER_AGENT preferredRegionList=$PREFERRED_REGION_LIST bash $DB_BINDING_NAME-run.sh + uri=$COSMOS_URI primaryKey=$COSMOS_KEY workload_type=$WORKLOAD_TYPE ycsb_operation="run" recordcount=$totalrecordcount operationcount=$YCSB_OPERATION_COUNT threads=$THREAD_COUNT target=$TARGET_OPERATIONS_PER_SECOND insertproportion=$INSERT_PROPORTION readproportion=$READ_PROPORTION updateproportion=$UPDATE_PROPORTION scanproportion=$SCAN_PROPORTION deleteproportion=$DELETE_PROPORTION useGateway=$USE_GATEWAY diagnosticsLatencyThresholdInMS=$DIAGNOSTICS_LATENCY_THRESHOLD_IN_MS requestdistribution=$REQUEST_DISTRIBUTION insertorder=$INSERT_ORDER includeExceptionStackInLog=$INCLUDE_EXCEPTION_STACK fieldcount=$FIELD_COUNT appInsightConnectionString=$APP_INSIGHT_CONN_STR userAgent=$USER_AGENT preferredRegionList=$PREFERRED_REGION_LIST bash $DB_BINDING_NAME-run.sh fi #Copy YCSB log to storage account diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/10-thousand-rps-delete/README.md b/cosmos/sql/tools/java/ycsb/recipes/delete/10-thousand-rps-delete/README.md new file mode 100644 index 00000000..00bf76c5 --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/10-thousand-rps-delete/README.md @@ -0,0 +1,54 @@ +# 10 Thousand Deletes Per Second +This recipe encapsulates a update only workload with a maximum requests per second of 10 thousand. This "1-Click" recipe combines both the load and run phases of YCSB. + +## Recipe definition + +| Config | Value | +| --- | --- | +| Database | Cosmos SQL API | +| Benchmarking tool | YCSB | +| Workload | Update | +| Max RPS | 10 Thousand | +| Duration | 1 Hour | +| Number of documents in DB |100,000 | +| Document Size | ≈1 KB(YCSB default) | + +## Execute +1. Create a [Cosmos DB SQL API container](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal) + + | Setting | value | + | --- | --- | + | Database Name | ycsb | + | Container Name | usertable | + | Partition Key | /id | + | Container Throughput Type | Manual | + | Container throughput | 161,900 RU/s[^1] | + +[^1]: Container throughput is slightly higher than normal to accommodate for the YCSB request distribution skew. For more details about capacity planning refer to [Cosmos DB capacity planner](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/estimate-ru-with-capacity-planner) + +2. Create a [storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal) +3. Create a [resource group](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal) in the same region as the Cosmos DB account +4. Click the deploy to Azure button and fill in the following missing parameter values: + + | Parameter | Value | + | --- | --- | + | Resource group | name of the resource group from step 3 | + | Region | Make sure the region is the same as the Cosmos DB account region | + | Results Storage Connection String | connection string of the storage account from step 2 | + | Cosmos URI | URI of the Cosmos DB account from step 1 | + | Cosmos Key | Primary key of the Cosmos DB account from step 1 | + | Admin Password | Admin account password for the VM | + + [More details about the parameters](../../#basic-configuration) + +[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-db-benchmarking%2Fmain%2Fcosmos%2Fsql%2Ftools%2Fjava%2Fycsb%2Frecipes%2Fdelete%2F10-thousand-rps-delete%2Fazuredeploy.json) + +## Output +The job status and results will be available in the following locations in the storage account provided +| Type | Location | +| --- | --- | +| Status | ycsbbenchmarkingMetadata (Table) | +| Results | ycsbbenchmarking-{Date} (Container) | + + [More details about job status and results](../../#monitoring) + diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/10-thousand-rps-delete/azuredeploy.json b/cosmos/sql/tools/java/ycsb/recipes/delete/10-thousand-rps-delete/azuredeploy.json new file mode 100644 index 00000000..44d3de9f --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/10-thousand-rps-delete/azuredeploy.json @@ -0,0 +1,308 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "projectName": { + "type": "string", + "defaultValue": "Benchmarking", + "metadata": { + "description": "Specifies a name for generating resource names." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Specifies the location for all resources." + } + }, + "resultsStorageConnectionString": { + "type": "securestring", + "metadata": { + "description": "Specifies a connection string of the storage account where results will be avaialble" + } + }, + "cosmosURI": { + "type": "string", + "metadata": { + "description": "Specifies the URI of the Cosmos DB account" + } + }, + "cosmosKey": { + "type": "securestring", + "metadata": { + "description": "Specifies the key for the Cosmos DB account" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D8s_v4", + "metadata": { + "description": "Specifies a Virtual Machine size" + } + }, + "vmCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Specifies the number of Virtual Machines/clients" + } + }, + "adminUsername": { + "type": "string", + "defaultValue": "benchmarking", + "metadata": { + "description": "Specifies a username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Specifies a password for the Virtual Machine." + } + }, + "vnetName": { + "type": "string", + "defaultValue": "[concat(parameters('projectName'), '-vnet')]", + "metadata": { + "description": "Specifies a Virtual Network name" + } + }, + "vnetAddressPrefixes": { + "type": "string", + "defaultValue": "10.2.0.0/16", + "metadata": { + "description": "Specifies a Virtual Network Address Prefix" + } + }, + "vnetSubnetName": { + "type": "string", + "defaultValue": "default", + "metadata": { + "description": "Specifies a Virtual Network Subnet name" + } + }, + "vnetSubnetAddressPrefix": { + "type": "string", + "defaultValue": "10.2.0.0/24", + "metadata": { + "description": "Specifies a Virtual Network Subnet Address Prefix " + } + }, + "threads": { + "type": "int", + "defaultValue": 60, + "metadata": { + "description": "Specifies the threads per client" + } + }, + "ycsbRecordCount": { + "type": "int", + "defaultValue": 100000 + }, + "targetOperationsPerSecond": { + "type": "int", + "defaultValue": 10000, + "metadata": { + "description": "Specifies the maximum number of operations each client pefroms per second" + } + }, + "ycsbOperationCount": { + "type": "int", + "defaultValue": 36000000, + "metadata": { + "description": "Specifies the total number of operations each client perfoms" + } + }, + "skipLoadPhase": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies skipLoadPhase true or false, if set true load phase will not trigger before the transaction phase" + } + }, + "ycsbGitHubRepoName": { + "type": "string", + "defaultValue": "Azure/YCSB", + "metadata": { + "description": "Specifies the GitHub Url for YCSB source code repository" + } + }, + "ycsbGitHubBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for YCSB source code repository" + } + }, + "benchmarkingToolsRepoName": { + "type": "string", + "defaultValue": "Azure/azure-db-benchmarking", + "metadata": { + "description": "Specifies the GitHub Url for benchmakring framwork code repository" + } + }, + "benchmarkingToolsBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for benchmakring framwork code repositor" + } + }, + "diagnosticsLatencyThresholdInMS": { + "type": "int", + "defaultValue": -1, + "metadata": { + "description": "Specifies request latency threshold for logging clinet request diagnostics. There is no logging by default" + } + }, + "requestdistribution": { + "type": "string", + "defaultValue": "uniform", + "metadata": { + "description": "Specifies request distribution" + } + }, + "insertorder": { + "type": "string", + "defaultValue": "hashed", + "metadata": { + "description": "Specifies insert data in ordered or hashed manner" + } + }, + "includeExceptionStackInLog": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies includeExceptionStackInLog true or false, it will print the complete exception trace on error" + } + }, + "fieldcount": { + "type": "string", + "defaultValue": "10", + "metadata": { + "description": "Specifies field count in the item" + } + } + }, + "variables": { + "templateURL": "[concat('https://raw.githubusercontent.com/',parameters('benchmarkingToolsRepoName'),'/',parameters('benchmarkingToolsBranchName'),'/cosmos/infra/azuredeploy.json')]" + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "name": "[concat(deployment().name,'LinkedTemplate')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('templateURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "projectName": { + "value": "[parameters('projectName')]" + }, + "location": { + "value": "[parameters('location')]" + }, + "resultsStorageConnectionString": { + "value": "[parameters('resultsStorageConnectionString')]" + }, + "cosmosURI": { + "value": "[parameters('cosmosURI')]" + }, + "cosmosKey": { + "value": "[parameters('cosmosKey')]" + }, + "vmSize": { + "value": "[parameters('vmSize')]" + }, + "vmCount": { + "value": "[parameters('vmCount')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "vNetName": { + "value": "[parameters('vNetName')]" + }, + "vNetAddressPrefixes": { + "value": "[parameters('vNetAddressPrefixes')]" + }, + "vNetSubnetName": { + "value": "[parameters('vNetSubnetName')]" + }, + "vNetSubnetAddressPrefix": { + "value": "[parameters('vNetSubnetAddressPrefix')]" + }, + "threads": { + "value": "[parameters('threads')]" + }, + "ycsbRecordCount": { + "value": "[parameters('ycsbRecordCount')]" + }, + "targetOperationsPerSecond": { + "value": "[parameters('targetOperationsPerSecond')]" + }, + "ycsbOperationCount": { + "value": "[parameters('ycsbOperationCount')]" + }, + "skipLoadPhase": { + "value": "[parameters('skipLoadPhase')]" + }, + "ycsbGitHubRepoName": { + "value": "[parameters('ycsbGitHubRepoName')]" + }, + "ycsbGitHubBranchName": { + "value": "[parameters('ycsbGitHubBranchName')]" + }, + "benchmarkingToolsRepoName": { + "value": "[parameters('benchmarkingToolsRepoName')]" + }, + "benchmarkingToolsBranchName": { + "value": "[parameters('benchmarkingToolsBranchName')]" + }, + "diagnosticsLatencyThresholdInMS": { + "value": "[parameters('diagnosticsLatencyThresholdInMS')]" + }, + "readproportion": { + "value": "0" + }, + "updateproportion": { + "value": "0" + }, + "scanproportion": { + "value": "0" + }, + "insertproportion": { + "value": "0" + }, + "deleteproportion": { + "value": "1" + }, + "writeOnlyOperation": { + "value": false + }, + "requestdistribution": { + "value": "[parameters('requestdistribution')]" + }, + "insertorder": { + "value": "[parameters('insertorder')]" + }, + "includeExceptionStackInLog": { + "value": "[parameters('includeExceptionStackInLog')]" + }, + "fieldcount": { + "value": "[parameters('fieldcount')]" + } + } + } + } + ], + "outputs": { + } +} diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/100-thousand-rps-delete/README.md b/cosmos/sql/tools/java/ycsb/recipes/delete/100-thousand-rps-delete/README.md new file mode 100644 index 00000000..af6d4e39 --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/100-thousand-rps-delete/README.md @@ -0,0 +1,54 @@ +# 100 Thousand Deletes Per Second +This recipe encapsulates a update only workload with a maximum requests per second of 10 thousand. This "1-Click" recipe combines both the load and run phases of YCSB. + +## Recipe definition + +| Config | Value | +| --- | --- | +| Database | Cosmos SQL API | +| Benchmarking tool | YCSB | +| Workload | Update | +| Max RPS | 100 Thousand | +| Duration | 1 Hour | +| Number of documents in DB |1,000,000| +| Document Size | ≈1 KB(YCSB default) | + +## Execute +1. Create a [Cosmos DB SQL API container](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal) + + | Setting | value | + | --- | --- | + | Database Name | ycsb | + | Container Name | usertable | + | Partition Key | /id | + | Container Throughput Type | Manual | + | Container throughput | 1,618,800 RU/s[^1] | + +[^1]: Container throughput is slightly higher than normal to accommodate for the YCSB request distribution skew. For more details about capacity planning refer to [Cosmos DB capacity planner](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/estimate-ru-with-capacity-planner) + +2. Create a [storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal) +3. Create a [resource group](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal) in the same region as the Cosmos DB account +4. Click the deploy to Azure button and fill in the following missing parameter values: + + | Parameter | Value | + | --- | --- | + | Resource group | name of the resource group from step 3 | + | Region | Make sure the region is the same as the Cosmos DB account region | + | Results Storage Connection String | connection string of the storage account from step 2 | + | Cosmos URI | URI of the Cosmos DB account from step 1 | + | Cosmos Key | Primary key of the Cosmos DB account from step 1 | + | Admin Password | Admin account password for the VM | + + [More details about the parameters](../../#basic-configuration) + +[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-db-benchmarking%2Fmain%2Fcosmos%2Fsql%2Ftools%2Fjava%2Fycsb%2Frecipes%2Fdelete%2F100-thousand-rps-delete%2Fazuredeploy.json) + +## Output +The job status and results will be available in the following locations in the storage account provided +| Type | Location | +| --- | --- | +| Status | ycsbbenchmarkingMetadata (Table) | +| Results | ycsbbenchmarking-{Date} (Container) | + + [More details about job status and results](../../#monitoring) + diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/100-thousand-rps-delete/azuredeploy.json b/cosmos/sql/tools/java/ycsb/recipes/delete/100-thousand-rps-delete/azuredeploy.json new file mode 100644 index 00000000..03a40688 --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/100-thousand-rps-delete/azuredeploy.json @@ -0,0 +1,308 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "projectName": { + "type": "string", + "defaultValue": "Benchmarking", + "metadata": { + "description": "Specifies a name for generating resource names." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Specifies the location for all resources." + } + }, + "resultsStorageConnectionString": { + "type": "securestring", + "metadata": { + "description": "Specifies a connection string of the storage account where results will be avaialble" + } + }, + "cosmosURI": { + "type": "string", + "metadata": { + "description": "Specifies the URI of the Cosmos DB account" + } + }, + "cosmosKey": { + "type": "securestring", + "metadata": { + "description": "Specifies the key for the Cosmos DB account" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D48s_v4", + "metadata": { + "description": "Specifies a Virtual Machine size" + } + }, + "vmCount": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "Specifies the number of Virtual Machines/clients" + } + }, + "adminUsername": { + "type": "string", + "defaultValue": "benchmarking", + "metadata": { + "description": "Specifies a username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Specifies a password for the Virtual Machine." + } + }, + "vnetName": { + "type": "string", + "defaultValue": "[concat(parameters('projectName'), '-vnet')]", + "metadata": { + "description": "Specifies a Virtual Network name" + } + }, + "vnetAddressPrefixes": { + "type": "string", + "defaultValue": "10.2.0.0/16", + "metadata": { + "description": "Specifies a Virtual Network Address Prefix" + } + }, + "vnetSubnetName": { + "type": "string", + "defaultValue": "default", + "metadata": { + "description": "Specifies a Virtual Network Subnet name" + } + }, + "vnetSubnetAddressPrefix": { + "type": "string", + "defaultValue": "10.2.0.0/24", + "metadata": { + "description": "Specifies a Virtual Network Subnet Address Prefix " + } + }, + "threads": { + "type": "int", + "defaultValue": 300, + "metadata": { + "description": "Specifies the threads per client" + } + }, + "ycsbRecordCount": { + "type": "int", + "defaultValue": 500000 + }, + "targetOperationsPerSecond": { + "type": "int", + "defaultValue": 50000, + "metadata": { + "description": "Specifies the maximum number of operations each client pefroms per second" + } + }, + "ycsbOperationCount": { + "type": "int", + "defaultValue": 180000000, + "metadata": { + "description": "Specifies the total number of operations each client perfoms" + } + }, + "skipLoadPhase": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies skipLoadPhase true or false, if set true load phase will not trigger before the transaction phase" + } + }, + "ycsbGitHubRepoName": { + "type": "string", + "defaultValue": "Azure/YCSB", + "metadata": { + "description": "Specifies the GitHub Url for YCSB source code repository" + } + }, + "ycsbGitHubBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for YCSB source code repository" + } + }, + "benchmarkingToolsRepoName": { + "type": "string", + "defaultValue": "Azure/azure-db-benchmarking", + "metadata": { + "description": "Specifies the GitHub Url for benchmakring framwork code repository" + } + }, + "benchmarkingToolsBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for benchmakring framwork code repositor" + } + }, + "diagnosticsLatencyThresholdInMS": { + "type": "int", + "defaultValue": -1, + "metadata": { + "description": "Specifies request latency threshold for logging clinet request diagnostics. There is no logging by default" + } + }, + "requestdistribution": { + "type": "string", + "defaultValue": "uniform", + "metadata": { + "description": "Specifies request distribution" + } + }, + "insertorder": { + "type": "string", + "defaultValue": "hashed", + "metadata": { + "description": "Specifies insert data in ordered or hashed manner" + } + }, + "includeExceptionStackInLog": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies includeExceptionStackInLog true or false, it will print the complete exception trace on error" + } + }, + "fieldcount": { + "type": "string", + "defaultValue": "10", + "metadata": { + "description": "Specifies field count in the item" + } + } + }, + "variables": { + "templateURL": "[concat('https://raw.githubusercontent.com/',parameters('benchmarkingToolsRepoName'),'/',parameters('benchmarkingToolsBranchName'),'/cosmos/infra/azuredeploy.json')]" + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "name": "[concat(deployment().name,'LinkedTemplate')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('templateURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "projectName": { + "value": "[parameters('projectName')]" + }, + "location": { + "value": "[parameters('location')]" + }, + "resultsStorageConnectionString": { + "value": "[parameters('resultsStorageConnectionString')]" + }, + "cosmosURI": { + "value": "[parameters('cosmosURI')]" + }, + "cosmosKey": { + "value": "[parameters('cosmosKey')]" + }, + "vmSize": { + "value": "[parameters('vmSize')]" + }, + "vmCount": { + "value": "[parameters('vmCount')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "vNetName": { + "value": "[parameters('vNetName')]" + }, + "vNetAddressPrefixes": { + "value": "[parameters('vNetAddressPrefixes')]" + }, + "vNetSubnetName": { + "value": "[parameters('vNetSubnetName')]" + }, + "vNetSubnetAddressPrefix": { + "value": "[parameters('vNetSubnetAddressPrefix')]" + }, + "threads": { + "value": "[parameters('threads')]" + }, + "ycsbRecordCount": { + "value": "[parameters('ycsbRecordCount')]" + }, + "targetOperationsPerSecond": { + "value": "[parameters('targetOperationsPerSecond')]" + }, + "ycsbOperationCount": { + "value": "[parameters('ycsbOperationCount')]" + }, + "skipLoadPhase": { + "value": "[parameters('skipLoadPhase')]" + }, + "ycsbGitHubRepoName": { + "value": "[parameters('ycsbGitHubRepoName')]" + }, + "ycsbGitHubBranchName": { + "value": "[parameters('ycsbGitHubBranchName')]" + }, + "benchmarkingToolsRepoName": { + "value": "[parameters('benchmarkingToolsRepoName')]" + }, + "benchmarkingToolsBranchName": { + "value": "[parameters('benchmarkingToolsBranchName')]" + }, + "diagnosticsLatencyThresholdInMS": { + "value": "[parameters('diagnosticsLatencyThresholdInMS')]" + }, + "readproportion": { + "value": "0" + }, + "updateproportion": { + "value": "0" + }, + "scanproportion": { + "value": "0" + }, + "insertproportion": { + "value": "0" + }, + "deleteproportion": { + "value": "1" + }, + "writeOnlyOperation": { + "value": false + }, + "requestdistribution": { + "value": "[parameters('requestdistribution')]" + }, + "insertorder": { + "value": "[parameters('insertorder')]" + }, + "includeExceptionStackInLog": { + "value": "[parameters('includeExceptionStackInLog')]" + }, + "fieldcount": { + "value": "[parameters('fieldcount')]" + } + } + } + } + ], + "outputs": { + } +} diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/20-thousand-rps-delete/README.md b/cosmos/sql/tools/java/ycsb/recipes/delete/20-thousand-rps-delete/README.md new file mode 100644 index 00000000..65ac845d --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/20-thousand-rps-delete/README.md @@ -0,0 +1,54 @@ +# 20 Thousand Deletes Per Second +This recipe encapsulates a update only workload with a maximum requests per second of 20 thousand. This "1-Click" recipe combines both the load and run phases of YCSB. + +## Recipe definition + +| Config | Value | +| --- | --- | +| Database | Cosmos SQL API | +| Benchmarking tool | YCSB | +| Workload | Update | +| Max RPS | 20 Thousand | +| Duration | 1 Hour | +| Number of documents in DB |200,000 | +| Document Size | ≈1 KB(YCSB default) | + +## Execute +1. Create a [Cosmos DB SQL API container](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal) + + | Setting | value | + | --- | --- | + | Database Name | ycsb | + | Container Name | usertable | + | Partition Key | /id | + | Container Throughput Type | Manual | + | Container throughput | 323,800 RU/s[^1] | + +[^1]: Container throughput is slightly higher than normal to accommodate for the YCSB request distribution skew. For more details about capacity planning refer to [Cosmos DB capacity planner](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/estimate-ru-with-capacity-planner) + +2. Create a [storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal) +3. Create a [resource group](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal) in the same region as the Cosmos DB account +4. Click the deploy to Azure button and fill in the following missing parameter values: + + | Parameter | Value | + | --- | --- | + | Resource group | name of the resource group from step 3 | + | Region | Make sure the region is the same as the Cosmos DB account region | + | Results Storage Connection String | connection string of the storage account from step 2 | + | Cosmos URI | URI of the Cosmos DB account from step 1 | + | Cosmos Key | Primary key of the Cosmos DB account from step 1 | + | Admin Password | Admin account password for the VM | + + [More details about the parameters](../../#basic-configuration) + +[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-db-benchmarking%2Fmain%2Fcosmos%2Fsql%2Ftools%2Fjava%2Fycsb%2Frecipes%2Fdelete%2F20-thousand-rps-delete%2Fazuredeploy.json) + +## Output +The job status and results will be available in the following locations in the storage account provided +| Type | Location | +| --- | --- | +| Status | ycsbbenchmarkingMetadata (Table) | +| Results | ycsbbenchmarking-{Date} (Container) | + + [More details about job status and results](../../#monitoring) + diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/20-thousand-rps-delete/azuredeploy.json b/cosmos/sql/tools/java/ycsb/recipes/delete/20-thousand-rps-delete/azuredeploy.json new file mode 100644 index 00000000..36874923 --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/20-thousand-rps-delete/azuredeploy.json @@ -0,0 +1,308 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "projectName": { + "type": "string", + "defaultValue": "Benchmarking", + "metadata": { + "description": "Specifies a name for generating resource names." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Specifies the location for all resources." + } + }, + "resultsStorageConnectionString": { + "type": "securestring", + "metadata": { + "description": "Specifies a connection string of the storage account where results will be avaialble" + } + }, + "cosmosURI": { + "type": "string", + "metadata": { + "description": "Specifies the URI of the Cosmos DB account" + } + }, + "cosmosKey": { + "type": "securestring", + "metadata": { + "description": "Specifies the key for the Cosmos DB account" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D16s_v4", + "metadata": { + "description": "Specifies a Virtual Machine size" + } + }, + "vmCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Specifies the number of Virtual Machines/clients" + } + }, + "adminUsername": { + "type": "string", + "defaultValue": "benchmarking", + "metadata": { + "description": "Specifies a username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Specifies a password for the Virtual Machine." + } + }, + "vnetName": { + "type": "string", + "defaultValue": "[concat(parameters('projectName'), '-vnet')]", + "metadata": { + "description": "Specifies a Virtual Network name" + } + }, + "vnetAddressPrefixes": { + "type": "string", + "defaultValue": "10.2.0.0/16", + "metadata": { + "description": "Specifies a Virtual Network Address Prefix" + } + }, + "vnetSubnetName": { + "type": "string", + "defaultValue": "default", + "metadata": { + "description": "Specifies a Virtual Network Subnet name" + } + }, + "vnetSubnetAddressPrefix": { + "type": "string", + "defaultValue": "10.2.0.0/24", + "metadata": { + "description": "Specifies a Virtual Network Subnet Address Prefix " + } + }, + "threads": { + "type": "int", + "defaultValue": 120, + "metadata": { + "description": "Specifies the threads per client" + } + }, + "ycsbRecordCount": { + "type": "int", + "defaultValue": 200000 + }, + "targetOperationsPerSecond": { + "type": "int", + "defaultValue": 20000, + "metadata": { + "description": "Specifies the maximum number of operations each client pefroms per second" + } + }, + "ycsbOperationCount": { + "type": "int", + "defaultValue": 72000000, + "metadata": { + "description": "Specifies the total number of operations each client perfoms" + } + }, + "skipLoadPhase": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies skipLoadPhase true or false, if set true load phase will not trigger before the transaction phase" + } + }, + "ycsbGitHubRepoName": { + "type": "string", + "defaultValue": "Azure/YCSB", + "metadata": { + "description": "Specifies the GitHub Url for YCSB source code repository" + } + }, + "ycsbGitHubBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for YCSB source code repository" + } + }, + "benchmarkingToolsRepoName": { + "type": "string", + "defaultValue": "Azure/azure-db-benchmarking", + "metadata": { + "description": "Specifies the GitHub Url for benchmakring framwork code repository" + } + }, + "benchmarkingToolsBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for benchmakring framwork code repositor" + } + }, + "diagnosticsLatencyThresholdInMS": { + "type": "int", + "defaultValue": -1, + "metadata": { + "description": "Specifies request latency threshold for logging clinet request diagnostics. There is no logging by default" + } + }, + "requestdistribution": { + "type": "string", + "defaultValue": "uniform", + "metadata": { + "description": "Specifies request distribution" + } + }, + "insertorder": { + "type": "string", + "defaultValue": "hashed", + "metadata": { + "description": "Specifies insert data in ordered or hashed manner" + } + }, + "includeExceptionStackInLog": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies includeExceptionStackInLog true or false, it will print the complete exception trace on error" + } + }, + "fieldcount": { + "type": "string", + "defaultValue": "10", + "metadata": { + "description": "Specifies field count in the item" + } + } + }, + "variables": { + "templateURL": "[concat('https://raw.githubusercontent.com/',parameters('benchmarkingToolsRepoName'),'/',parameters('benchmarkingToolsBranchName'),'/cosmos/infra/azuredeploy.json')]" + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "name": "[concat(deployment().name,'LinkedTemplate')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('templateURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "projectName": { + "value": "[parameters('projectName')]" + }, + "location": { + "value": "[parameters('location')]" + }, + "resultsStorageConnectionString": { + "value": "[parameters('resultsStorageConnectionString')]" + }, + "cosmosURI": { + "value": "[parameters('cosmosURI')]" + }, + "cosmosKey": { + "value": "[parameters('cosmosKey')]" + }, + "vmSize": { + "value": "[parameters('vmSize')]" + }, + "vmCount": { + "value": "[parameters('vmCount')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "vNetName": { + "value": "[parameters('vNetName')]" + }, + "vNetAddressPrefixes": { + "value": "[parameters('vNetAddressPrefixes')]" + }, + "vNetSubnetName": { + "value": "[parameters('vNetSubnetName')]" + }, + "vNetSubnetAddressPrefix": { + "value": "[parameters('vNetSubnetAddressPrefix')]" + }, + "threads": { + "value": "[parameters('threads')]" + }, + "ycsbRecordCount": { + "value": "[parameters('ycsbRecordCount')]" + }, + "targetOperationsPerSecond": { + "value": "[parameters('targetOperationsPerSecond')]" + }, + "ycsbOperationCount": { + "value": "[parameters('ycsbOperationCount')]" + }, + "skipLoadPhase": { + "value": "[parameters('skipLoadPhase')]" + }, + "ycsbGitHubRepoName": { + "value": "[parameters('ycsbGitHubRepoName')]" + }, + "ycsbGitHubBranchName": { + "value": "[parameters('ycsbGitHubBranchName')]" + }, + "benchmarkingToolsRepoName": { + "value": "[parameters('benchmarkingToolsRepoName')]" + }, + "benchmarkingToolsBranchName": { + "value": "[parameters('benchmarkingToolsBranchName')]" + }, + "diagnosticsLatencyThresholdInMS": { + "value": "[parameters('diagnosticsLatencyThresholdInMS')]" + }, + "readproportion": { + "value": "0" + }, + "updateproportion": { + "value": "0" + }, + "scanproportion": { + "value": "0" + }, + "insertproportion": { + "value": "0" + }, + "deleteproportion": { + "value": "1" + }, + "writeOnlyOperation": { + "value": false + }, + "requestdistribution": { + "value": "[parameters('requestdistribution')]" + }, + "insertorder": { + "value": "[parameters('insertorder')]" + }, + "includeExceptionStackInLog": { + "value": "[parameters('includeExceptionStackInLog')]" + }, + "fieldcount": { + "value": "[parameters('fieldcount')]" + } + } + } + } + ], + "outputs": { + } +} diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/30-thousand-rps-delete/README.md b/cosmos/sql/tools/java/ycsb/recipes/delete/30-thousand-rps-delete/README.md new file mode 100644 index 00000000..d982fefd --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/30-thousand-rps-delete/README.md @@ -0,0 +1,54 @@ +# 30 Thousand Deletes Per Second +This recipe encapsulates a update only workload with a maximum requests per second of 10 thousand. This "1-Click" recipe combines both the load and run phases of YCSB. + +## Recipe definition + +| Config | Value | +| --- | --- | +| Database | Cosmos SQL API | +| Benchmarking tool | YCSB | +| Workload | Update | +| Max RPS | 30 Thousand | +| Duration | 1 Hour | +| Number of documents in DB |300,000| +| Document Size | ≈1 KB(YCSB default) | + +## Execute +1. Create a [Cosmos DB SQL API container](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal) + + | Setting | value | + | --- | --- | + | Database Name | ycsb | + | Container Name | usertable | + | Partition Key | /id | + | Container Throughput Type | Manual | + | Container throughput | 485,700 RU/s[^1] | + +[^1]: Container throughput is slightly higher than normal to accommodate for the YCSB request distribution skew. For more details about capacity planning refer to [Cosmos DB capacity planner](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/estimate-ru-with-capacity-planner) + +2. Create a [storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal) +3. Create a [resource group](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal) in the same region as the Cosmos DB account +4. Click the deploy to Azure button and fill in the following missing parameter values: + + | Parameter | Value | + | --- | --- | + | Resource group | name of the resource group from step 3 | + | Region | Make sure the region is the same as the Cosmos DB account region | + | Results Storage Connection String | connection string of the storage account from step 2 | + | Cosmos URI | URI of the Cosmos DB account from step 1 | + | Cosmos Key | Primary key of the Cosmos DB account from step 1 | + | Admin Password | Admin account password for the VM | + + [More details about the parameters](../../#basic-configuration) + +[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-db-benchmarking%2Fmain%2Fcosmos%2Fsql%2Ftools%2Fjava%2Fycsb%2Frecipes%2Fdelete%2F30-thousand-rps-delete%2Fazuredeploy.json) + +## Output +The job status and results will be available in the following locations in the storage account provided +| Type | Location | +| --- | --- | +| Status | ycsbbenchmarkingMetadata (Table) | +| Results | ycsbbenchmarking-{Date} (Container) | + + [More details about job status and results](../../#monitoring) + diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/30-thousand-rps-delete/azuredeploy.json b/cosmos/sql/tools/java/ycsb/recipes/delete/30-thousand-rps-delete/azuredeploy.json new file mode 100644 index 00000000..4a4c5408 --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/30-thousand-rps-delete/azuredeploy.json @@ -0,0 +1,308 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "projectName": { + "type": "string", + "defaultValue": "Benchmarking", + "metadata": { + "description": "Specifies a name for generating resource names." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Specifies the location for all resources." + } + }, + "resultsStorageConnectionString": { + "type": "securestring", + "metadata": { + "description": "Specifies a connection string of the storage account where results will be avaialble" + } + }, + "cosmosURI": { + "type": "string", + "metadata": { + "description": "Specifies the URI of the Cosmos DB account" + } + }, + "cosmosKey": { + "type": "securestring", + "metadata": { + "description": "Specifies the key for the Cosmos DB account" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D32s_v4", + "metadata": { + "description": "Specifies a Virtual Machine size" + } + }, + "vmCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Specifies the number of Virtual Machines/clients" + } + }, + "adminUsername": { + "type": "string", + "defaultValue": "benchmarking", + "metadata": { + "description": "Specifies a username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Specifies a password for the Virtual Machine." + } + }, + "vnetName": { + "type": "string", + "defaultValue": "[concat(parameters('projectName'), '-vnet')]", + "metadata": { + "description": "Specifies a Virtual Network name" + } + }, + "vnetAddressPrefixes": { + "type": "string", + "defaultValue": "10.2.0.0/16", + "metadata": { + "description": "Specifies a Virtual Network Address Prefix" + } + }, + "vnetSubnetName": { + "type": "string", + "defaultValue": "default", + "metadata": { + "description": "Specifies a Virtual Network Subnet name" + } + }, + "vnetSubnetAddressPrefix": { + "type": "string", + "defaultValue": "10.2.0.0/24", + "metadata": { + "description": "Specifies a Virtual Network Subnet Address Prefix " + } + }, + "threads": { + "type": "int", + "defaultValue": 180, + "metadata": { + "description": "Specifies the threads per client" + } + }, + "ycsbRecordCount": { + "type": "int", + "defaultValue": 300000 + }, + "targetOperationsPerSecond": { + "type": "int", + "defaultValue": 30000, + "metadata": { + "description": "Specifies the maximum number of operations each client pefroms per second" + } + }, + "ycsbOperationCount": { + "type": "int", + "defaultValue": 108000000, + "metadata": { + "description": "Specifies the total number of operations each client perfoms" + } + }, + "skipLoadPhase": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies skipLoadPhase true or false, if set true load phase will not trigger before the transaction phase" + } + }, + "ycsbGitHubRepoName": { + "type": "string", + "defaultValue": "Azure/YCSB", + "metadata": { + "description": "Specifies the GitHub Url for YCSB source code repository" + } + }, + "ycsbGitHubBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for YCSB source code repository" + } + }, + "benchmarkingToolsRepoName": { + "type": "string", + "defaultValue": "Azure/azure-db-benchmarking", + "metadata": { + "description": "Specifies the GitHub Url for benchmakring framwork code repository" + } + }, + "benchmarkingToolsBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for benchmakring framwork code repositor" + } + }, + "diagnosticsLatencyThresholdInMS": { + "type": "int", + "defaultValue": -1, + "metadata": { + "description": "Specifies request latency threshold for logging clinet request diagnostics. There is no logging by default" + } + }, + "requestdistribution": { + "type": "string", + "defaultValue": "uniform", + "metadata": { + "description": "Specifies request distribution" + } + }, + "insertorder": { + "type": "string", + "defaultValue": "hashed", + "metadata": { + "description": "Specifies insert data in ordered or hashed manner" + } + }, + "includeExceptionStackInLog": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies includeExceptionStackInLog true or false, it will print the complete exception trace on error" + } + }, + "fieldcount": { + "type": "string", + "defaultValue": "10", + "metadata": { + "description": "Specifies field count in the item" + } + } + }, + "variables": { + "templateURL": "[concat('https://raw.githubusercontent.com/',parameters('benchmarkingToolsRepoName'),'/',parameters('benchmarkingToolsBranchName'),'/cosmos/infra/azuredeploy.json')]" + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "name": "[concat(deployment().name,'LinkedTemplate')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('templateURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "projectName": { + "value": "[parameters('projectName')]" + }, + "location": { + "value": "[parameters('location')]" + }, + "resultsStorageConnectionString": { + "value": "[parameters('resultsStorageConnectionString')]" + }, + "cosmosURI": { + "value": "[parameters('cosmosURI')]" + }, + "cosmosKey": { + "value": "[parameters('cosmosKey')]" + }, + "vmSize": { + "value": "[parameters('vmSize')]" + }, + "vmCount": { + "value": "[parameters('vmCount')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "vNetName": { + "value": "[parameters('vNetName')]" + }, + "vNetAddressPrefixes": { + "value": "[parameters('vNetAddressPrefixes')]" + }, + "vNetSubnetName": { + "value": "[parameters('vNetSubnetName')]" + }, + "vNetSubnetAddressPrefix": { + "value": "[parameters('vNetSubnetAddressPrefix')]" + }, + "threads": { + "value": "[parameters('threads')]" + }, + "ycsbRecordCount": { + "value": "[parameters('ycsbRecordCount')]" + }, + "targetOperationsPerSecond": { + "value": "[parameters('targetOperationsPerSecond')]" + }, + "ycsbOperationCount": { + "value": "[parameters('ycsbOperationCount')]" + }, + "skipLoadPhase": { + "value": "[parameters('skipLoadPhase')]" + }, + "ycsbGitHubRepoName": { + "value": "[parameters('ycsbGitHubRepoName')]" + }, + "ycsbGitHubBranchName": { + "value": "[parameters('ycsbGitHubBranchName')]" + }, + "benchmarkingToolsRepoName": { + "value": "[parameters('benchmarkingToolsRepoName')]" + }, + "benchmarkingToolsBranchName": { + "value": "[parameters('benchmarkingToolsBranchName')]" + }, + "diagnosticsLatencyThresholdInMS": { + "value": "[parameters('diagnosticsLatencyThresholdInMS')]" + }, + "readproportion": { + "value": "0" + }, + "updateproportion": { + "value": "0" + }, + "scanproportion": { + "value": "0" + }, + "insertproportion": { + "value": "0" + }, + "writeOnlyOperation": { + "value": false + }, + "deleteproportion": { + "value": "1" + }, + "requestdistribution": { + "value": "[parameters('requestdistribution')]" + }, + "insertorder": { + "value": "[parameters('insertorder')]" + }, + "includeExceptionStackInLog": { + "value": "[parameters('includeExceptionStackInLog')]" + }, + "fieldcount": { + "value": "[parameters('fieldcount')]" + } + } + } + } + ], + "outputs": { + } +} diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/50-thousand-rps-delete/README.md b/cosmos/sql/tools/java/ycsb/recipes/delete/50-thousand-rps-delete/README.md new file mode 100644 index 00000000..1010ed53 --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/50-thousand-rps-delete/README.md @@ -0,0 +1,53 @@ +# 50 Thousand Deletes Per Second +This recipe encapsulates a update only workload with a maximum requests per second of 10 thousand. This "1-Click" recipe combines both the load and run phases of YCSB. + +## Recipe definition + +| Config | Value | +| --- | --- | +| Database | Cosmos SQL API | +| Benchmarking tool | YCSB | +| Workload | Update | +| Max RPS | 50 Thousand | +| Duration | 1 Hour | +| Number of documents in DB |500,000| +| Document Size | ≈1 KB(YCSB default) | + +## Execute +1. Create a [Cosmos DB SQL API container](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal) + + | Setting | value | + | --- | --- | + | Database Name | ycsb | + | Container Name | usertable | + | Partition Key | /id | + | Container Throughput Type | Manual | + | Container throughput | 809,400 RU/s[^1] | + +[^1]: Container throughput is slightly higher than normal to accommodate for the YCSB request distribution skew. For more details about capacity planning refer to [Cosmos DB capacity planner](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/estimate-ru-with-capacity-planner) + +3. Create a [storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal) and note down the connection string +4. Create a [resource group](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal) in the same region as the Cosmos +6. Click the deploy to Azure button and fill in the following missing parameter values: + + | Parameter | Value | + | --- | --- | + | Resource group | name of the resource group from step 3 | + | Results Storage Connection String | connection string of the storage account from step 2 | + | Cosmos URI | URI of the Cosmos DB account from step 1 | + | Cosmos Key | Primary key of the Cosmos DB account from step 1 | + | Admin Password | Admin account password for the VM | + + [More details about the parameters](../../#basic-configuration) + +[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-db-benchmarking%2Fmain%2Fcosmos%2Fsql%2Ftools%2Fjava%2Fycsb%2Frecipes%2Fdelete%2F50-thousand-rps-delete%2Fazuredeploy.json) + +## Output +The job status and results will be available in the following locations in the storage account provided +| Type | Location | +| --- | --- | +| Status | ycsbbenchmarkingMetadata (Table) | +| Results | ycsbbenchmarking-{Date} (Container) | + + [More details about job status and results](../../#monitoring) + diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/50-thousand-rps-delete/azuredeploy.json b/cosmos/sql/tools/java/ycsb/recipes/delete/50-thousand-rps-delete/azuredeploy.json new file mode 100644 index 00000000..ce508d7a --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/50-thousand-rps-delete/azuredeploy.json @@ -0,0 +1,308 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "projectName": { + "type": "string", + "defaultValue": "Benchmarking", + "metadata": { + "description": "Specifies a name for generating resource names." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Specifies the location for all resources." + } + }, + "resultsStorageConnectionString": { + "type": "securestring", + "metadata": { + "description": "Specifies a connection string of the storage account where results will be avaialble" + } + }, + "cosmosURI": { + "type": "string", + "metadata": { + "description": "Specifies the URI of the Cosmos DB account" + } + }, + "cosmosKey": { + "type": "securestring", + "metadata": { + "description": "Specifies the key for the Cosmos DB account" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D48s_v4", + "metadata": { + "description": "Specifies a Virtual Machine size" + } + }, + "vmCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Specifies the number of Virtual Machines/clients" + } + }, + "adminUsername": { + "type": "string", + "defaultValue": "benchmarking", + "metadata": { + "description": "Specifies a username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Specifies a password for the Virtual Machine." + } + }, + "vnetName": { + "type": "string", + "defaultValue": "[concat(parameters('projectName'), '-vnet')]", + "metadata": { + "description": "Specifies a Virtual Network name" + } + }, + "vnetAddressPrefixes": { + "type": "string", + "defaultValue": "10.2.0.0/16", + "metadata": { + "description": "Specifies a Virtual Network Address Prefix" + } + }, + "vnetSubnetName": { + "type": "string", + "defaultValue": "default", + "metadata": { + "description": "Specifies a Virtual Network Subnet name" + } + }, + "vnetSubnetAddressPrefix": { + "type": "string", + "defaultValue": "10.2.0.0/24", + "metadata": { + "description": "Specifies a Virtual Network Subnet Address Prefix " + } + }, + "threads": { + "type": "int", + "defaultValue": 300, + "metadata": { + "description": "Specifies the threads per client" + } + }, + "ycsbRecordCount": { + "type": "int", + "defaultValue": 500000 + }, + "targetOperationsPerSecond": { + "type": "int", + "defaultValue": 50000, + "metadata": { + "description": "Specifies the maximum number of operations each client pefroms per second" + } + }, + "ycsbOperationCount": { + "type": "int", + "defaultValue": 180000000, + "metadata": { + "description": "Specifies the total number of operations each client perfoms" + } + }, + "skipLoadPhase": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies skipLoadPhase true or false, if set true load phase will not trigger before the transaction phase" + } + }, + "ycsbGitHubRepoName": { + "type": "string", + "defaultValue": "Azure/YCSB", + "metadata": { + "description": "Specifies the GitHub Url for YCSB source code repository" + } + }, + "ycsbGitHubBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for YCSB source code repository" + } + }, + "benchmarkingToolsRepoName": { + "type": "string", + "defaultValue": "Azure/azure-db-benchmarking", + "metadata": { + "description": "Specifies the GitHub Url for benchmakring framwork code repository" + } + }, + "benchmarkingToolsBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for benchmakring framwork code repositor" + } + }, + "diagnosticsLatencyThresholdInMS": { + "type": "int", + "defaultValue": -1, + "metadata": { + "description": "Specifies request latency threshold for logging clinet request diagnostics. There is no logging by default" + } + }, + "requestdistribution": { + "type": "string", + "defaultValue": "uniform", + "metadata": { + "description": "Specifies request distribution" + } + }, + "insertorder": { + "type": "string", + "defaultValue": "hashed", + "metadata": { + "description": "Specifies insert data in ordered or hashed manner" + } + }, + "includeExceptionStackInLog": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies includeExceptionStackInLog true or false, it will print the complete exception trace on error" + } + }, + "fieldcount": { + "type": "string", + "defaultValue": "10", + "metadata": { + "description": "Specifies field count in the item" + } + } + }, + "variables": { + "templateURL": "[concat('https://raw.githubusercontent.com/',parameters('benchmarkingToolsRepoName'),'/',parameters('benchmarkingToolsBranchName'),'/cosmos/infra/azuredeploy.json')]" + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "name": "[concat(deployment().name,'LinkedTemplate')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('templateURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "projectName": { + "value": "[parameters('projectName')]" + }, + "location": { + "value": "[parameters('location')]" + }, + "resultsStorageConnectionString": { + "value": "[parameters('resultsStorageConnectionString')]" + }, + "cosmosURI": { + "value": "[parameters('cosmosURI')]" + }, + "cosmosKey": { + "value": "[parameters('cosmosKey')]" + }, + "vmSize": { + "value": "[parameters('vmSize')]" + }, + "vmCount": { + "value": "[parameters('vmCount')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "vNetName": { + "value": "[parameters('vNetName')]" + }, + "vNetAddressPrefixes": { + "value": "[parameters('vNetAddressPrefixes')]" + }, + "vNetSubnetName": { + "value": "[parameters('vNetSubnetName')]" + }, + "vNetSubnetAddressPrefix": { + "value": "[parameters('vNetSubnetAddressPrefix')]" + }, + "threads": { + "value": "[parameters('threads')]" + }, + "ycsbRecordCount": { + "value": "[parameters('ycsbRecordCount')]" + }, + "targetOperationsPerSecond": { + "value": "[parameters('targetOperationsPerSecond')]" + }, + "ycsbOperationCount": { + "value": "[parameters('ycsbOperationCount')]" + }, + "skipLoadPhase": { + "value": "[parameters('skipLoadPhase')]" + }, + "ycsbGitHubRepoName": { + "value": "[parameters('ycsbGitHubRepoName')]" + }, + "ycsbGitHubBranchName": { + "value": "[parameters('ycsbGitHubBranchName')]" + }, + "benchmarkingToolsRepoName": { + "value": "[parameters('benchmarkingToolsRepoName')]" + }, + "benchmarkingToolsBranchName": { + "value": "[parameters('benchmarkingToolsBranchName')]" + }, + "diagnosticsLatencyThresholdInMS": { + "value": "[parameters('diagnosticsLatencyThresholdInMS')]" + }, + "readproportion": { + "value": "0" + }, + "updateproportion": { + "value": "0" + }, + "scanproportion": { + "value": "0" + }, + "insertproportion": { + "value": "0" + }, + "deleteproportion": { + "value": "1" + }, + "writeOnlyOperation": { + "value": false + }, + "requestdistribution": { + "value": "[parameters('requestdistribution')]" + }, + "insertorder": { + "value": "[parameters('insertorder')]" + }, + "includeExceptionStackInLog": { + "value": "[parameters('includeExceptionStackInLog')]" + }, + "fieldcount": { + "value": "[parameters('fieldcount')]" + } + } + } + } + ], + "outputs": { + } +} diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/500-thousand-rps-delete/README.md b/cosmos/sql/tools/java/ycsb/recipes/delete/500-thousand-rps-delete/README.md new file mode 100644 index 00000000..c580ce58 --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/500-thousand-rps-delete/README.md @@ -0,0 +1,54 @@ +# 500 Thousand Deletes Per Second +This recipe encapsulates a update only workload with a maximum requests per second of 10 thousand. This "1-Click" recipe combines both the load and run phases of YCSB. + +## Recipe definition + +| Config | Value | +| --- | --- | +| Database | Cosmos SQL API | +| Benchmarking tool | YCSB | +| Workload | Update | +| Max RPS | 500 Thousand | +| Duration | 1 Hour | +| Number of documents in DB |5,000,000| +| Document Size | ≈1 KB(YCSB default) | + +## Execute +1. Create a [Cosmos DB SQL API container](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal) + + | Setting | value | + | --- | --- | + | Database Name | ycsb | + | Container Name | usertable | + | Partition Key | /id | + | Container Throughput Type | Manual | + | Container throughput | 8,094,000 RU/s[^1] | + +[^1]: Container throughput is slightly higher than normal to accommodate for the YCSB request distribution skew. For more details about capacity planning refer to [Cosmos DB capacity planner](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/estimate-ru-with-capacity-planner) + +2. Create a [storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal) +3. Create a [resource group](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal) in the same region as the Cosmos DB account +4. Click the deploy to Azure button and fill in the following missing parameter values: + + | Parameter | Value | + | --- | --- | + | Resource group | name of the resource group from step 3 | + | Region | Make sure the region is the same as the Cosmos DB account region | + | Results Storage Connection String | connection string of the storage account from step 2 | + | Cosmos URI | URI of the Cosmos DB account from step 1 | + | Cosmos Key | Primary key of the Cosmos DB account from step 1 | + | Admin Password | Admin account password for the VM | + + [More details about the parameters](../../#basic-configuration) + +[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-db-benchmarking%2Fmain%2Fcosmos%2Fsql%2Ftools%2Fjava%2Fycsb%2Frecipes%2Fdelete%2F500-thousand-rps-delete%2Fazuredeploy.json) + +## Output +The job status and results will be available in the following locations in the storage account provided +| Type | Location | +| --- | --- | +| Status | ycsbbenchmarkingMetadata (Table) | +| Results | ycsbbenchmarking-{Date} (Container) | + + [More details about job status and results](../../#monitoring) + diff --git a/cosmos/sql/tools/java/ycsb/recipes/delete/500-thousand-rps-delete/azuredeploy.json b/cosmos/sql/tools/java/ycsb/recipes/delete/500-thousand-rps-delete/azuredeploy.json new file mode 100644 index 00000000..36e59023 --- /dev/null +++ b/cosmos/sql/tools/java/ycsb/recipes/delete/500-thousand-rps-delete/azuredeploy.json @@ -0,0 +1,308 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "projectName": { + "type": "string", + "defaultValue": "Benchmarking", + "metadata": { + "description": "Specifies a name for generating resource names." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Specifies the location for all resources." + } + }, + "resultsStorageConnectionString": { + "type": "securestring", + "metadata": { + "description": "Specifies a connection string of the storage account where results will be avaialble" + } + }, + "cosmosURI": { + "type": "string", + "metadata": { + "description": "Specifies the URI of the Cosmos DB account" + } + }, + "cosmosKey": { + "type": "securestring", + "metadata": { + "description": "Specifies the key for the Cosmos DB account" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D48s_v4", + "metadata": { + "description": "Specifies a Virtual Machine size" + } + }, + "vmCount": { + "type": "int", + "defaultValue": 10, + "metadata": { + "description": "Specifies the number of Virtual Machines/clients" + } + }, + "adminUsername": { + "type": "string", + "defaultValue": "benchmarking", + "metadata": { + "description": "Specifies a username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Specifies a password for the Virtual Machine." + } + }, + "vnetName": { + "type": "string", + "defaultValue": "[concat(parameters('projectName'), '-vnet')]", + "metadata": { + "description": "Specifies a Virtual Network name" + } + }, + "vnetAddressPrefixes": { + "type": "string", + "defaultValue": "10.2.0.0/16", + "metadata": { + "description": "Specifies a Virtual Network Address Prefix" + } + }, + "vnetSubnetName": { + "type": "string", + "defaultValue": "default", + "metadata": { + "description": "Specifies a Virtual Network Subnet name" + } + }, + "vnetSubnetAddressPrefix": { + "type": "string", + "defaultValue": "10.2.0.0/24", + "metadata": { + "description": "Specifies a Virtual Network Subnet Address Prefix " + } + }, + "threads": { + "type": "int", + "defaultValue": 300, + "metadata": { + "description": "Specifies the threads per client" + } + }, + "ycsbRecordCount": { + "type": "int", + "defaultValue": 500000 + }, + "targetOperationsPerSecond": { + "type": "int", + "defaultValue": 50000, + "metadata": { + "description": "Specifies the maximum number of operations each client pefroms per second" + } + }, + "ycsbOperationCount": { + "type": "int", + "defaultValue": 180000000, + "metadata": { + "description": "Specifies the total number of operations each client perfoms" + } + }, + "skipLoadPhase": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies skipLoadPhase true or false, if set true load phase will not trigger before the transaction phase" + } + }, + "ycsbGitHubRepoName": { + "type": "string", + "defaultValue": "Azure/YCSB", + "metadata": { + "description": "Specifies the GitHub Url for YCSB source code repository" + } + }, + "ycsbGitHubBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for YCSB source code repository" + } + }, + "benchmarkingToolsRepoName": { + "type": "string", + "defaultValue": "Azure/azure-db-benchmarking", + "metadata": { + "description": "Specifies the GitHub Url for benchmakring framwork code repository" + } + }, + "benchmarkingToolsBranchName": { + "type": "string", + "defaultValue": "main", + "metadata": { + "description": "Specifies the GitHub branch for benchmakring framwork code repositor" + } + }, + "diagnosticsLatencyThresholdInMS": { + "type": "int", + "defaultValue": -1, + "metadata": { + "description": "Specifies request latency threshold for logging clinet request diagnostics. There is no logging by default" + } + }, + "requestdistribution": { + "type": "string", + "defaultValue": "uniform", + "metadata": { + "description": "Specifies request distribution" + } + }, + "insertorder": { + "type": "string", + "defaultValue": "hashed", + "metadata": { + "description": "Specifies insert data in ordered or hashed manner" + } + }, + "includeExceptionStackInLog": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies includeExceptionStackInLog true or false, it will print the complete exception trace on error" + } + }, + "fieldcount": { + "type": "string", + "defaultValue": "10", + "metadata": { + "description": "Specifies field count in the item" + } + } + }, + "variables": { + "templateURL": "[concat('https://raw.githubusercontent.com/',parameters('benchmarkingToolsRepoName'),'/',parameters('benchmarkingToolsBranchName'),'/cosmos/infra/azuredeploy.json')]" + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "name": "[concat(deployment().name,'LinkedTemplate')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('templateURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "projectName": { + "value": "[parameters('projectName')]" + }, + "location": { + "value": "[parameters('location')]" + }, + "resultsStorageConnectionString": { + "value": "[parameters('resultsStorageConnectionString')]" + }, + "cosmosURI": { + "value": "[parameters('cosmosURI')]" + }, + "cosmosKey": { + "value": "[parameters('cosmosKey')]" + }, + "vmSize": { + "value": "[parameters('vmSize')]" + }, + "vmCount": { + "value": "[parameters('vmCount')]" + }, + "adminUsername": { + "value": "[parameters('adminUsername')]" + }, + "adminPassword": { + "value": "[parameters('adminPassword')]" + }, + "vNetName": { + "value": "[parameters('vNetName')]" + }, + "vNetAddressPrefixes": { + "value": "[parameters('vNetAddressPrefixes')]" + }, + "vNetSubnetName": { + "value": "[parameters('vNetSubnetName')]" + }, + "vNetSubnetAddressPrefix": { + "value": "[parameters('vNetSubnetAddressPrefix')]" + }, + "threads": { + "value": "[parameters('threads')]" + }, + "ycsbRecordCount": { + "value": "[parameters('ycsbRecordCount')]" + }, + "targetOperationsPerSecond": { + "value": "[parameters('targetOperationsPerSecond')]" + }, + "ycsbOperationCount": { + "value": "[parameters('ycsbOperationCount')]" + }, + "skipLoadPhase": { + "value": "[parameters('skipLoadPhase')]" + }, + "ycsbGitHubRepoName": { + "value": "[parameters('ycsbGitHubRepoName')]" + }, + "ycsbGitHubBranchName": { + "value": "[parameters('ycsbGitHubBranchName')]" + }, + "benchmarkingToolsRepoName": { + "value": "[parameters('benchmarkingToolsRepoName')]" + }, + "benchmarkingToolsBranchName": { + "value": "[parameters('benchmarkingToolsBranchName')]" + }, + "diagnosticsLatencyThresholdInMS": { + "value": "[parameters('diagnosticsLatencyThresholdInMS')]" + }, + "readproportion": { + "value": "0" + }, + "updateproportion": { + "value": "0" + }, + "scanproportion": { + "value": "0" + }, + "insertproportion": { + "value": "0" + }, + "deleteproportion": { + "value": "1" + }, + "writeOnlyOperation": { + "value": false + }, + "requestdistribution": { + "value": "[parameters('requestdistribution')]" + }, + "insertorder": { + "value": "[parameters('insertorder')]" + }, + "includeExceptionStackInLog": { + "value": "[parameters('includeExceptionStackInLog')]" + }, + "fieldcount": { + "value": "[parameters('fieldcount')]" + } + } + } + } + ], + "outputs": { + } +}