perf: downsized test data, increased SSH socket buffer, and made chunk size configurable

- Reduced test data from 50MB to 25MB (test.py)
- Increased SSH socketpair buffer to 1MB via setsockopt (transport_ssh.c)
- Made chunk size configurable: new Config field, --chunk-size CLI flag,
  sent over wire, and used in scanner instead of DESIRED_CHUNK_SIZE
- Fixed DESIRED_CHUNK_SIZE macro parentheses (chunk.h)
This commit is contained in:
2026-07-16 12:20:02 +02:00
parent 270623b90e
commit ca29109664
11 changed files with 41 additions and 20 deletions
+2 -2
View File
@@ -82,7 +82,7 @@ static int scan_directory_multithreaded(void *pipeline_context) {
PipelineContextSender *context = (PipelineContextSender *)pipeline_context;
mtx_lock(&context->mutex_scanner);
DirectoryScanner *scanner =
directory_scanner_create(context->config->send_directory, context->config->use_metadata);
directory_scanner_create(context->config->send_directory, context->config->use_metadata, context->config->chunk_size);
mtx_unlock(&context->mutex_scanner);
Chunk *current_chunk;
@@ -138,7 +138,7 @@ int send_files(Config *config) {
client_connect(client, server_host, server_port);
}
config_send(client->file_descriptor, config);
DirectoryScanner *scanner = directory_scanner_create(config->send_directory, config->use_metadata);
DirectoryScanner *scanner = directory_scanner_create(config->send_directory, config->use_metadata, config->chunk_size);
Chunk *current_chunk;
while ((current_chunk = directory_scanner_next(scanner)) != NULL) {
if (!config->use_sendfile) {