diff --git a/sdk/storage/azure-storage-blob-stress/templates/stress-test-job.yaml b/sdk/storage/azure-storage-blob-stress/templates/stress-test-job.yaml index 444d22a629928..2a22302d24ed9 100644 --- a/sdk/storage/azure-storage-blob-stress/templates/stress-test-job.yaml +++ b/sdk/storage/azure-storage-blob-stress/templates/stress-test-job.yaml @@ -43,10 +43,10 @@ spec: -XX:MaxRAMPercentage=50 \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:HeapDumpPath="${DEBUG_SHARE}" \ - -Dreactor.schedulers.defaultBoundedElasticSize={{ default 5 .Stress.parallelRuns }} \ + -Dreactor.schedulers.defaultBoundedElasticSize={{ 25 }} \ -jar /app/azure-storage-blob-stress-1.0.0-beta.1-jar-with-dependencies.jar \ {{ .Stress.testScenario }} \ - --parallel {{ default 5 .Stress.parallelRuns }} \ + --parallel {{ default 3 .Stress.parallelRuns }} \ --maxConcurrency {{ default 10 .Stress.maxConcurrency }} \ --duration {{ mul 60 .Stress.durationMin }} \ --size {{ .Stress.sizeBytes }} \ diff --git a/sdk/storage/azure-storage-file-datalake-stress/templates/stress-test-job.yaml b/sdk/storage/azure-storage-file-datalake-stress/templates/stress-test-job.yaml index 4bbe3f9d48c27..e86f526389474 100644 --- a/sdk/storage/azure-storage-file-datalake-stress/templates/stress-test-job.yaml +++ b/sdk/storage/azure-storage-file-datalake-stress/templates/stress-test-job.yaml @@ -43,10 +43,10 @@ spec: -XX:MaxRAMPercentage=50 \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:HeapDumpPath="${DEBUG_SHARE}" \ - -Dreactor.schedulers.defaultBoundedElasticSize={{ default 5 .Stress.parallelRuns }} \ + -Dreactor.schedulers.defaultBoundedElasticSize={{ 25 }} \ -jar /app/azure-storage-file-datalake-stress-1.0.0-beta.1-jar-with-dependencies.jar \ {{ .Stress.testScenario }} \ - --parallel {{ default 5 .Stress.parallelRuns }} \ + --parallel {{ default 3 .Stress.parallelRuns }} \ --maxConcurrency {{ default 10 .Stress.maxConcurrency }} \ --duration {{ mul 60 .Stress.durationMin }} \ --size {{ .Stress.sizeBytes }} \ diff --git a/sdk/storage/azure-storage-file-share-stress/src/main/java/com/azure/storage/file/share/stress/FileOutputStream.java b/sdk/storage/azure-storage-file-share-stress/src/main/java/com/azure/storage/file/share/stress/FileOutputStream.java index dfd1cac84caa6..7e8fbc626ee8a 100644 --- a/sdk/storage/azure-storage-file-share-stress/src/main/java/com/azure/storage/file/share/stress/FileOutputStream.java +++ b/sdk/storage/azure-storage-file-share-stress/src/main/java/com/azure/storage/file/share/stress/FileOutputStream.java @@ -35,7 +35,7 @@ protected void runInternal(Context span) throws IOException { try (CrcInputStream inputStream = new CrcInputStream(originalContent.getContentHead(), options.getSize()); OutputStream outputStream = syncClient.getFileOutputStream()) { - byte[] buffer = new byte[4096]; // Define a buffer + byte[] buffer = new byte[1024*1024*4]; // Define a buffer int bytesRead; // Read from the inputStream and write to the blobOutputStream diff --git a/sdk/storage/azure-storage-file-share-stress/templates/stress-test-job.yaml b/sdk/storage/azure-storage-file-share-stress/templates/stress-test-job.yaml index 97afe527569c1..b558feecdcb8a 100644 --- a/sdk/storage/azure-storage-file-share-stress/templates/stress-test-job.yaml +++ b/sdk/storage/azure-storage-file-share-stress/templates/stress-test-job.yaml @@ -43,10 +43,10 @@ spec: -XX:MaxRAMPercentage=50 \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:HeapDumpPath="${DEBUG_SHARE}" \ - -Dreactor.schedulers.defaultBoundedElasticSize={{ default 5 .Stress.parallelRuns }} \ + -Dreactor.schedulers.defaultBoundedElasticSize={{ 25 }} \ -jar /app/azure-storage-file-share-stress-1.0.0-beta.1-jar-with-dependencies.jar \ {{ .Stress.testScenario }} \ - --parallel {{ default 5 .Stress.parallelRuns }} \ + --parallel {{ default 3 .Stress.parallelRuns }} \ --maxConcurrency {{ default 10 .Stress.maxConcurrency }} \ --duration {{ mul 60 .Stress.durationMin }} \ --size {{ .Stress.sizeBytes }} \ diff --git a/sdk/storage/azure-storage-stress/src/main/java/com/azure/storage/stress/TelemetryHelper.java b/sdk/storage/azure-storage-stress/src/main/java/com/azure/storage/stress/TelemetryHelper.java index 76ecd4bbe9d37..a9a7c7fa1d939 100644 --- a/sdk/storage/azure-storage-stress/src/main/java/com/azure/storage/stress/TelemetryHelper.java +++ b/sdk/storage/azure-storage-stress/src/main/java/com/azure/storage/stress/TelemetryHelper.java @@ -6,6 +6,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.logging.LogLevel; import com.azure.monitor.opentelemetry.exporter.AzureMonitorExporter; +import io.netty.channel.unix.Errors; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; @@ -195,6 +196,18 @@ private void trackCancellation(Instant start, Span span) { private void trackFailure(Instant start, Throwable e, Span span) { Throwable unwrapped = Exceptions.unwrap(e); + // Check if the unwrapped exception is a RuntimeException + // Check if the message contains "NativeIoException" or TimeoutException and the unwrapped exception is not + // already a NativeIoException/TimeoutException + if (unwrapped instanceof RuntimeException) { + String message = unwrapped.getMessage(); + if (message.contains("NativeIoException")) { + unwrapped = new io.netty.channel.unix.Errors.NativeIoException("recvAddress", Errors.ERRNO_ECONNRESET_NEGATIVE); + } else if (message.contains("TimeoutException")) { + unwrapped = new TimeoutException(message); + } + } + span.recordException(unwrapped); span.setAttribute(ERROR_TYPE_ATTRIBUTE, unwrapped.getClass().getName()); span.setStatus(StatusCode.ERROR, unwrapped.getMessage());