From 8ca6a7e2ed0afa8d901c722ec9db4ba5f849c090 Mon Sep 17 00:00:00 2001 From: Bret Ambrose Date: Thu, 23 Jul 2020 12:02:55 -0700 Subject: [PATCH 1/2] New windowing + larger io messages by default --- aws-common-runtime/aws-c-common | 2 +- aws-common-runtime/aws-c-http | 2 +- aws-common-runtime/aws-c-io | 2 +- src/native/crt.c | 4 ++++ src/native/http_connection_manager.c | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/aws-common-runtime/aws-c-common b/aws-common-runtime/aws-c-common index f6f914598..6c784947f 160000 --- a/aws-common-runtime/aws-c-common +++ b/aws-common-runtime/aws-c-common @@ -1 +1 @@ -Subproject commit f6f9145982f60ce2c92f9f0f2796b1b150e6f991 +Subproject commit 6c784947fa16ef66a1328cf44c910375a41aacdc diff --git a/aws-common-runtime/aws-c-http b/aws-common-runtime/aws-c-http index b53100ee4..b5587a87a 160000 --- a/aws-common-runtime/aws-c-http +++ b/aws-common-runtime/aws-c-http @@ -1 +1 @@ -Subproject commit b53100ee427a3618c1692e7ca8aaa1f2cbeb4109 +Subproject commit b5587a87ac942eb6ff5653f4b4b1ca958cbe6b68 diff --git a/aws-common-runtime/aws-c-io b/aws-common-runtime/aws-c-io index cf9dbd744..2f080d442 160000 --- a/aws-common-runtime/aws-c-io +++ b/aws-common-runtime/aws-c-io @@ -1 +1 @@ -Subproject commit cf9dbd744f56eccc00bd3f9c4e7ba283949e1a28 +Subproject commit 2f080d4427c2b1aaa0e998c86887c37f48abb40b diff --git a/src/native/crt.c b/src/native/crt.c index 777af91b3..ad82a9e7d 100644 --- a/src/native/crt.c +++ b/src/native/crt.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -217,6 +218,8 @@ static void s_jni_atexit(void) { } } +#define KB_256 (256 * 1024) + /* Called as the entry point, immediately after the shared lib is loaded the first time by JNI */ JNIEXPORT void JNICALL Java_software_amazon_awssdk_crt_CRT_awsCrtInit( @@ -234,6 +237,7 @@ void JNICALL Java_software_amazon_awssdk_crt_CRT_awsCrtInit( } g_memory_tracing = jni_memtrace; + g_aws_channel_max_fragment_size = KB_256; /* check to see if we have support for backtraces only if we need to */ void *stack[1]; diff --git a/src/native/http_connection_manager.c b/src/native/http_connection_manager.c index 691b9db20..bb4e1d3bd 100644 --- a/src/native/http_connection_manager.c +++ b/src/native/http_connection_manager.c @@ -114,7 +114,7 @@ void aws_http_proxy_options_jni_clean_up( } if (options->tls_options != NULL) { - aws_tls_connection_options_clean_up(options->tls_options); + aws_tls_connection_options_clean_up((struct aws_tls_connection_options *)options->tls_options); } } From d9bbc640fe9aeb7243c234b5b6305f2719137a81 Mon Sep 17 00:00:00 2001 From: Bret Ambrose Date: Thu, 23 Jul 2020 12:38:16 -0700 Subject: [PATCH 2/2] Explanatory comment --- src/native/crt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/native/crt.c b/src/native/crt.c index ad82a9e7d..7baad43f4 100644 --- a/src/native/crt.c +++ b/src/native/crt.c @@ -237,6 +237,11 @@ void JNICALL Java_software_amazon_awssdk_crt_CRT_awsCrtInit( } g_memory_tracing = jni_memtrace; + + /* + * Increase the maximum channel message size in order to improve throughput on large payloads. + * Consider adding a system property override in the future. + */ g_aws_channel_max_fragment_size = KB_256; /* check to see if we have support for backtraces only if we need to */