From 913507f94171a260d8deaaeec9c4c806093ea670 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 12 Dec 2023 15:16:45 +0000 Subject: [PATCH 1/6] Adjust ringbuffer sizes --- doc/host_config_schema/cchost_config.json | 6 +++--- samples/config/join_config.json | 6 +++--- samples/config/recover_config.json | 6 +++--- samples/config/start_config.json | 6 +++--- src/host/configuration.h | 6 +++--- tests/config.jinja | 4 ++-- tests/infra/e2e_args.py | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/host_config_schema/cchost_config.json b/doc/host_config_schema/cchost_config.json index 48f9c29bb7e4..e3afc957f3c1 100644 --- a/doc/host_config_schema/cchost_config.json +++ b/doc/host_config_schema/cchost_config.json @@ -657,17 +657,17 @@ "properties": { "circuit_size": { "type": "string", - "default": "4MB", + "default": "32MB", "description": "Size (size string) of the internal host-enclave ringbuffers (must be a power of 2)" }, "max_msg_size": { "type": "string", - "default": "16MB", + "default": "128MB", "description": "Maximum size (size string) for a message sent over the ringbuffer. Messages may be split into multiple fragments, but this limits the total size of the sum of those fragments" }, "max_fragment_size": { "type": "string", - "default": "64KB", + "default": "512KB", "description": "Maximum size (size string) of individual ringbuffer message fragments. Messages larger than this will be split into multiple fragments" } }, diff --git a/samples/config/join_config.json b/samples/config/join_config.json index cd51cdadac8d..a6d04ba2b8ba 100644 --- a/samples/config/join_config.json +++ b/samples/config/join_config.json @@ -64,8 +64,8 @@ "client_connection_timeout": "2000ms", "worker_threads": 0, "memory": { - "circuit_size": "4MB", - "max_msg_size": "16MB", - "max_fragment_size": "64KB" + "circuit_size": "32MB", + "max_msg_size": "128MB", + "max_fragment_size": "512KB" } } diff --git a/samples/config/recover_config.json b/samples/config/recover_config.json index 8a5d73fd820c..34b2121c09af 100644 --- a/samples/config/recover_config.json +++ b/samples/config/recover_config.json @@ -64,8 +64,8 @@ "client_connection_timeout": "2000ms", "worker_threads": 0, "memory": { - "circuit_size": "4MB", - "max_msg_size": "16MB", - "max_fragment_size": "64KB" + "circuit_size": "32MB", + "max_msg_size": "128MB", + "max_fragment_size": "512KB" } } diff --git a/samples/config/start_config.json b/samples/config/start_config.json index 5e0eed1ba5de..d4e52411c5b7 100644 --- a/samples/config/start_config.json +++ b/samples/config/start_config.json @@ -88,8 +88,8 @@ "client_connection_timeout": "2000ms", "worker_threads": 0, "memory": { - "circuit_size": "4MB", - "max_msg_size": "16MB", - "max_fragment_size": "64KB" + "circuit_size": "32MB", + "max_msg_size": "128MB", + "max_fragment_size": "512KB" } } diff --git a/src/host/configuration.h b/src/host/configuration.h index b61f20bfb9d1..f7a083716b3a 100644 --- a/src/host/configuration.h +++ b/src/host/configuration.h @@ -122,9 +122,9 @@ namespace host struct Memory { - ds::SizeString circuit_size = {"4MB"}; - ds::SizeString max_msg_size = {"16MB"}; - ds::SizeString max_fragment_size = {"64KB"}; + ds::SizeString circuit_size = {"32MB"}; + ds::SizeString max_msg_size = {"128MB"}; + ds::SizeString max_fragment_size = {"512KB"}; bool operator==(const Memory&) const = default; }; diff --git a/tests/config.jinja b/tests/config.jinja index 872b96467c25..7c340bb3e03c 100644 --- a/tests/config.jinja +++ b/tests/config.jinja @@ -93,9 +93,9 @@ "node_client_interface": {{ node_client_interface|tojson }}, "worker_threads": {{ worker_threads }}, "memory": { - "circuit_size": "4MB", + "circuit_size": "32MB", "max_msg_size": "{{ max_msg_size_bytes }}", - "max_fragment_size": "64KB" + "max_fragment_size": "512KB" }, "ignore_first_sigterm": {{ ignore_first_sigterm|tojson }}{% if node_to_node_message_limit %}, "node_to_node_message_limit": {{ node_to_node_message_limit|tojson }}{% endif %} diff --git a/tests/infra/e2e_args.py b/tests/infra/e2e_args.py index 3f4c165308be..ad9e2ed5b63a 100644 --- a/tests/infra/e2e_args.py +++ b/tests/infra/e2e_args.py @@ -406,7 +406,7 @@ def cli_args( "--max-msg-size-bytes", help="Maximum message size (bytes) allowed on the ring buffer", type=str, - default="16MB", + default="128MB", ) parser.add_argument( "--gov-api-version", From c2f03604df7268fa60841c64bce7911b77279de6 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 12 Dec 2023 16:40:28 +0000 Subject: [PATCH 2/6] 4x --- doc/host_config_schema/cchost_config.json | 6 +++--- samples/config/join_config.json | 6 +++--- samples/config/recover_config.json | 6 +++--- samples/config/start_config.json | 6 +++--- src/host/configuration.h | 6 +++--- tests/config.jinja | 4 ++-- tests/e2e_operations.py | 2 +- tests/infra/e2e_args.py | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/doc/host_config_schema/cchost_config.json b/doc/host_config_schema/cchost_config.json index e3afc957f3c1..96b4fec13c62 100644 --- a/doc/host_config_schema/cchost_config.json +++ b/doc/host_config_schema/cchost_config.json @@ -657,17 +657,17 @@ "properties": { "circuit_size": { "type": "string", - "default": "32MB", + "default": "16MB", "description": "Size (size string) of the internal host-enclave ringbuffers (must be a power of 2)" }, "max_msg_size": { "type": "string", - "default": "128MB", + "default": "64MB", "description": "Maximum size (size string) for a message sent over the ringbuffer. Messages may be split into multiple fragments, but this limits the total size of the sum of those fragments" }, "max_fragment_size": { "type": "string", - "default": "512KB", + "default": "256KB", "description": "Maximum size (size string) of individual ringbuffer message fragments. Messages larger than this will be split into multiple fragments" } }, diff --git a/samples/config/join_config.json b/samples/config/join_config.json index a6d04ba2b8ba..03bff08d5b3e 100644 --- a/samples/config/join_config.json +++ b/samples/config/join_config.json @@ -64,8 +64,8 @@ "client_connection_timeout": "2000ms", "worker_threads": 0, "memory": { - "circuit_size": "32MB", - "max_msg_size": "128MB", - "max_fragment_size": "512KB" + "circuit_size": "16MB", + "max_msg_size": "64MB", + "max_fragment_size": "256KB" } } diff --git a/samples/config/recover_config.json b/samples/config/recover_config.json index 34b2121c09af..3c3ecb284af9 100644 --- a/samples/config/recover_config.json +++ b/samples/config/recover_config.json @@ -64,8 +64,8 @@ "client_connection_timeout": "2000ms", "worker_threads": 0, "memory": { - "circuit_size": "32MB", - "max_msg_size": "128MB", - "max_fragment_size": "512KB" + "circuit_size": "16MB", + "max_msg_size": "64MB", + "max_fragment_size": "256KB" } } diff --git a/samples/config/start_config.json b/samples/config/start_config.json index d4e52411c5b7..eaae939eccec 100644 --- a/samples/config/start_config.json +++ b/samples/config/start_config.json @@ -88,8 +88,8 @@ "client_connection_timeout": "2000ms", "worker_threads": 0, "memory": { - "circuit_size": "32MB", - "max_msg_size": "128MB", - "max_fragment_size": "512KB" + "circuit_size": "16MB", + "max_msg_size": "64MB", + "max_fragment_size": "256KB" } } diff --git a/src/host/configuration.h b/src/host/configuration.h index f7a083716b3a..824feb0e0e52 100644 --- a/src/host/configuration.h +++ b/src/host/configuration.h @@ -122,9 +122,9 @@ namespace host struct Memory { - ds::SizeString circuit_size = {"32MB"}; - ds::SizeString max_msg_size = {"128MB"}; - ds::SizeString max_fragment_size = {"512KB"}; + ds::SizeString circuit_size = {"16MB"}; + ds::SizeString max_msg_size = {"64MB"}; + ds::SizeString max_fragment_size = {"256KB"}; bool operator==(const Memory&) const = default; }; diff --git a/tests/config.jinja b/tests/config.jinja index 7c340bb3e03c..650a2a0b171b 100644 --- a/tests/config.jinja +++ b/tests/config.jinja @@ -93,9 +93,9 @@ "node_client_interface": {{ node_client_interface|tojson }}, "worker_threads": {{ worker_threads }}, "memory": { - "circuit_size": "32MB", + "circuit_size": "16MB", "max_msg_size": "{{ max_msg_size_bytes }}", - "max_fragment_size": "512KB" + "max_fragment_size": "256KB" }, "ignore_first_sigterm": {{ ignore_first_sigterm|tojson }}{% if node_to_node_message_limit %}, "node_to_node_message_limit": {{ node_to_node_message_limit|tojson }}{% endif %} diff --git a/tests/e2e_operations.py b/tests/e2e_operations.py index 649a8eb7c554..b4e821190fb2 100644 --- a/tests/e2e_operations.py +++ b/tests/e2e_operations.py @@ -264,7 +264,7 @@ def run_file_operations(args): json.dump(service_data, ntf) ntf.flush() - args.max_msg_size_bytes = f"{100 * 1024}" # 100KB + args.max_msg_size_bytes = f"{1024 ** 2}" with tempfile.TemporaryDirectory() as tmp_dir: txs = app.LoggingTxs("user0") diff --git a/tests/infra/e2e_args.py b/tests/infra/e2e_args.py index ad9e2ed5b63a..ff3d63d6657b 100644 --- a/tests/infra/e2e_args.py +++ b/tests/infra/e2e_args.py @@ -406,7 +406,7 @@ def cli_args( "--max-msg-size-bytes", help="Maximum message size (bytes) allowed on the ring buffer", type=str, - default="128MB", + default="64MB", ) parser.add_argument( "--gov-api-version", From df3c5678d93e13120775302323a647180f80b3b0 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 12 Dec 2023 17:21:03 +0000 Subject: [PATCH 3/6] timeout --- tests/e2e_batched.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e_batched.py b/tests/e2e_batched.py index a8d98afdef8f..6d5ac5df3154 100644 --- a/tests/e2e_batched.py +++ b/tests/e2e_batched.py @@ -111,7 +111,7 @@ def run_to_destruction(args): wsm += 50000 # Grow very quickly, expect to fail on the second iteration except Exception as e: - timeout = 10 + timeout = 60 LOG.info("Large write set caused an exception, as expected") LOG.info(f"Exception was: {e}") From f16243b96610d539b425a3deb57e1f440d8a30e5 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Wed, 13 Dec 2023 09:53:14 +0000 Subject: [PATCH 4/6] . --- .daily_canary | 2 +- tests/e2e_batched.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.daily_canary b/.daily_canary index 63140b9b5cf5..cd681255a463 100644 --- a/.daily_canary +++ b/.daily_canary @@ -1,4 +1,4 @@ -^- ___ ___ (- -) (= =) | Y & +--? ( V ) / . \ | +---=---' -/--x-m- /--n-n---xXx--/--yY------>>>----<<<>>]]{{}}---||-/\- +/--x-m- /--n-n---xXx--/--yY------>>>----<<<>>]]{{}}---||-/\--- diff --git a/tests/e2e_batched.py b/tests/e2e_batched.py index 6d5ac5df3154..8047b69f2843 100644 --- a/tests/e2e_batched.py +++ b/tests/e2e_batched.py @@ -111,7 +111,7 @@ def run_to_destruction(args): wsm += 50000 # Grow very quickly, expect to fail on the second iteration except Exception as e: - timeout = 60 + timeout = 120 LOG.info("Large write set caused an exception, as expected") LOG.info(f"Exception was: {e}") From da98130f9e6a5747d8b9b1616ef4ea0029d99f7e Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Wed, 13 Dec 2023 15:27:50 +0000 Subject: [PATCH 5/6] Fix test --- tests/e2e_batched.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/e2e_batched.py b/tests/e2e_batched.py index 8047b69f2843..4891420269f1 100644 --- a/tests/e2e_batched.py +++ b/tests/e2e_batched.py @@ -120,10 +120,9 @@ def run_to_destruction(args): end_time = time.time() + timeout while time.time() < end_time: time.sleep(0.1) - exit_code = network.nodes[0].remote.remote.proc.poll() - if exit_code is not None: - LOG.info(f"Node terminated with exit code {exit_code}") - assert exit_code != 0 + exit_codes = [node.remote.remote.proc.poll() for node in network.nodes] + if any(exit_codes): + LOG.info(f"One or more nodes terminated with exit codes {exit_codes}") break if time.time() > end_time: From ae03981e22293fed179921a262237b47ef2a8656 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Wed, 13 Dec 2023 15:29:14 +0000 Subject: [PATCH 6/6] gmt --- tests/e2e_batched.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/e2e_batched.py b/tests/e2e_batched.py index 4891420269f1..c62195ea2634 100644 --- a/tests/e2e_batched.py +++ b/tests/e2e_batched.py @@ -122,7 +122,9 @@ def run_to_destruction(args): time.sleep(0.1) exit_codes = [node.remote.remote.proc.poll() for node in network.nodes] if any(exit_codes): - LOG.info(f"One or more nodes terminated with exit codes {exit_codes}") + LOG.info( + f"One or more nodes terminated with exit codes {exit_codes}" + ) break if time.time() > end_time: