Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust ringbuffer sizes #5866

Merged
merged 8 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/host_config_schema/cchost_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,17 +661,17 @@
"properties": {
"circuit_size": {
"type": "string",
"default": "4MB",
"default": "16MB",
"description": "Size (size string) of the internal host-enclave ringbuffers (must be a power of 2)"
},
"max_msg_size": {
"type": "string",
"default": "16MB",
"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": "64KB",
"default": "256KB",
"description": "Maximum size (size string) of individual ringbuffer message fragments. Messages larger than this will be split into multiple fragments"
}
},
Expand Down
6 changes: 3 additions & 3 deletions samples/config/join_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "16MB",
"max_msg_size": "64MB",
"max_fragment_size": "256KB"
}
}
6 changes: 3 additions & 3 deletions samples/config/recover_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "16MB",
"max_msg_size": "64MB",
"max_fragment_size": "256KB"
}
}
6 changes: 3 additions & 3 deletions samples/config/start_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "16MB",
"max_msg_size": "64MB",
"max_fragment_size": "256KB"
}
}
6 changes: 3 additions & 3 deletions src/host/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {"16MB"};
ds::SizeString max_msg_size = {"64MB"};
ds::SizeString max_fragment_size = {"256KB"};

bool operator==(const Memory&) const = default;
};
Expand Down
4 changes: 2 additions & 2 deletions tests/config.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@
"node_client_interface": {{ node_client_interface|tojson }},
"worker_threads": {{ worker_threads }},
"memory": {
"circuit_size": "4MB",
"circuit_size": "16MB",
"max_msg_size": "{{ max_msg_size_bytes }}",
"max_fragment_size": "64KB"
"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 %}
Expand Down
11 changes: 6 additions & 5 deletions tests/e2e_batched.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 120

LOG.info("Large write set caused an exception, as expected")
LOG.info(f"Exception was: {e}")
Expand All @@ -120,10 +120,11 @@ 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:
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion tests/infra/e2e_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="64MB",
)
parser.add_argument(
"--gov-api-version",
Expand Down