From c65b5a8416873f4c4106c4ac2b01a4878c31d259 Mon Sep 17 00:00:00 2001 From: Jacob Lauzon Date: Tue, 12 Nov 2024 12:25:10 -0800 Subject: [PATCH 1/2] Updated perf test readme, remove from base sln --- .../perf-tests.yml | 6 +++- .../perf/README.md | 28 +++++++++++++++---- sdk/storage/Azure.Storage.sln | 7 ----- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/perf-tests.yml b/sdk/storage/Azure.Storage.DataMovement.Blobs/perf-tests.yml index 2dce771b126a3..907c26d1713b7 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/perf-tests.yml +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/perf-tests.yml @@ -1,9 +1,13 @@ Service: storage-datamovement-blob Project: sdk/storage/Azure.Storage.DataMovement.Blobs/perf/Azure.Storage.DataMovement.Blobs.Perf/Azure.Storage.DataMovement.Blobs.Perf.csproj +# For Track1, comment above line, uncomment next line +# Project: sdk/storage/Azure.Storage.DataMovement.Blobs/perf/Microsoft.Azure.Storage.DataMovement.Perf/Microsoft.Azure.Storage.DataMovement.Perf.csproj PackageVersions: - Azure.Storage.DataMovement.Blobs: source +# For Track1, comment above line, uncomment next line +# - Microsoft.Azure.Storage.DataMovement: 2.0.5 Tests: - Test: download @@ -11,7 +15,7 @@ Tests: Arguments: &sizes - --size 1024 --count 5000 --duration 60 --concurrency 64 - --size 10485760 --count 500 --duration 90 --concurrency 64 - - --size 1073741824 --count 5 --duration 120 --concurrency 64 + - --size 10737418240 --count 5 --duration 120 --concurrency 64 - Test: upload Class: UploadDirectory diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/perf/README.md b/sdk/storage/Azure.Storage.DataMovement.Blobs/perf/README.md index 8cdd410e53827..e8f5111803a6c 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/perf/README.md +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/perf/README.md @@ -3,21 +3,39 @@ The assets in this area comprise a set of performance tests for the [Azure Storage Blobs Data Movement library for .NET](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/storage/Azure.Storage.DataMovement.Blobs) and its associated ecosystem. The artifacts in this library are intended to be used primarily with the Azure SDK engineering system's testing infrastructure, but may also be run as stand-alone applications from the command line. ## Running tests locally -First, build the project either via Visual Studio or the command line. Be sure to build the `Release` build. +There are two perf test projects: +- Track2 (default): sdk\storage\Azure.Storage.DataMovement.Blobs\perf\Azure.Storage.DataMovement.Blobs.Perf\Azure.Storage.DataMovement.Blobs.Perf.csproj +- Track1: sdk\storage\Azure.Storage.DataMovement.Blobs\perf\Microsoft.Azure.Storage.DataMovement.Perf\Microsoft.Azure.Storage.DataMovement.Perf.csproj + +First, build the project either via Visual Studio or the command line. For best results, build the `Release` build but the `Debug` will also work and allow for debugging. ``` -dotnet build -c Release -f sdk\storage\Azure.Storage.DataMovement.Blobs\perf\Azure.Storage.DataMovement.Blobs.Perf\Azure.Storage.DataMovement.Blobs.Perf.csproj +dotnet build -c Release -f ``` -Setup the account you want to use for testing. Note these tests use OAuth using a DefaultAzureCredential, meaning you will need -tot he Storage account as well as a way to authenticate (Visual Studio, Azure CLI, etc.) +Setup the account you want to use for testing. Note Track2 tests use OAuth using a DefaultAzureCredential, meaning you will need permission to the Storage account as well as a way to authenticate (Visual Studio, Azure CLI, etc.) ``` set AZURE_STORAGE_ACCOUNT_NAME= +# Only needed for Track1 tests +set AZURE_STORAGE_ACCOUNT_KEY= ``` Then run the desired test via the command line. ``` -dotnet run -c Release -f --no-build --project sdk\storage\Azure.Storage.DataMovement.Blobs\perf\Azure.Storage.DataMovement.Blobs.Perf\Azure.Storage.DataMovement.Blobs.Perf.csproj -- +dotnet run -c Release -f --no-build --project sdk\storage\Azure.Storage.DataMovement.Blobs\perf\Azure.Storage.DataMovement.Blobs.Perf\Azure.Storage.DataMovement.Blobs.Perf.csproj -- (UploadDirectory|DownloadDirectory|CopyDirectory) ``` + +Current test options (non-exahustive list): +- `-c`, `--count`: The number of files in each transfer (default: 10) +- `-s`, `--size`: The size of each file (default: 1024) +- `-d`, `--duration`: The duration of the test (default: 10) +- `--councurrency`: The concurrency limit for Data Movement +- `--initial-transfer-size`: The initial transfer size of the transfer (Track2 only) +- `--chunk-size`: The chunk size to use during the transfer +- `--disable-checkpointer`: Disable the checkpointer (Track2 only) +- `--help`: See full list of options for that particular test + +### Running in Visual Studio +You can also run these tests directly through Visual Studio which can be helpful for debugging or profiling. You just need to setup the run profile for either project to include the command line arguments `(UploadDirectory|DownloadDirectory|CopyDirectory) ` and the enviorment variables. ## Contributing diff --git a/sdk/storage/Azure.Storage.sln b/sdk/storage/Azure.Storage.sln index b6b05f5f1b7de..0371dbcdf2418 100644 --- a/sdk/storage/Azure.Storage.sln +++ b/sdk/storage/Azure.Storage.sln @@ -159,8 +159,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Storage.DataMovement. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Storage", "Azure.ResourceManager.Storage\src\Azure.ResourceManager.Storage.csproj", "{6EA8939A-537F-475E-B16C-F9E80825C6AD}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Storage.DataMovement.Blobs.Perf", "Azure.Storage.DataMovement.Blobs\perf\Azure.Storage.DataMovement.Blobs.Perf\Azure.Storage.DataMovement.Blobs.Perf.csproj", "{45EF1203-EAFF-4BB7-97F1-58DA0C310D97}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -347,10 +345,6 @@ Global {6EA8939A-537F-475E-B16C-F9E80825C6AD}.Debug|Any CPU.Build.0 = Debug|Any CPU {6EA8939A-537F-475E-B16C-F9E80825C6AD}.Release|Any CPU.ActiveCfg = Release|Any CPU {6EA8939A-537F-475E-B16C-F9E80825C6AD}.Release|Any CPU.Build.0 = Release|Any CPU - {45EF1203-EAFF-4BB7-97F1-58DA0C310D97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45EF1203-EAFF-4BB7-97F1-58DA0C310D97}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45EF1203-EAFF-4BB7-97F1-58DA0C310D97}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45EF1203-EAFF-4BB7-97F1-58DA0C310D97}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -367,7 +361,6 @@ Global {CC33E052-9737-42A3-BEB5-060CA659F408} = {FBC7A205-B57A-44E7-A7CA-2E82F79A4D9C} {2FB0A438-7DCB-4748-8E95-BA495865AD1D} = {FBC7A205-B57A-44E7-A7CA-2E82F79A4D9C} {0323A01E-E360-4D22-B1F4-15FD2DB39437} = {FBC7A205-B57A-44E7-A7CA-2E82F79A4D9C} - {45EF1203-EAFF-4BB7-97F1-58DA0C310D97} = {FBC7A205-B57A-44E7-A7CA-2E82F79A4D9C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9F236F49-3FED-4E35-AF93-48BA7EB0D42A} From 1d683c2264b6b64b848284950578734305142b44 Mon Sep 17 00:00:00 2001 From: Jacob Lauzon Date: Tue, 12 Nov 2024 12:30:02 -0800 Subject: [PATCH 2/2] Fix size --- sdk/storage/Azure.Storage.DataMovement.Blobs/perf-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/perf-tests.yml b/sdk/storage/Azure.Storage.DataMovement.Blobs/perf-tests.yml index 907c26d1713b7..d77d2310bcf3e 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/perf-tests.yml +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/perf-tests.yml @@ -15,7 +15,7 @@ Tests: Arguments: &sizes - --size 1024 --count 5000 --duration 60 --concurrency 64 - --size 10485760 --count 500 --duration 90 --concurrency 64 - - --size 10737418240 --count 5 --duration 120 --concurrency 64 + - --size 1073741824 --count 5 --duration 120 --concurrency 64 - Test: upload Class: UploadDirectory