Skip to content

Commit

Permalink
redpanda/application: init workspace for async_stream_zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
ballard26 committed Jul 22, 2022
1 parent c186c68 commit ad24b22
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/v/redpanda/application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include "cluster/topics_frontend.h"
#include "cluster/tx_gateway.h"
#include "cluster/tx_gateway_frontend.h"
#include "compression/async_stream_zstd.h"
#include "compression/stream_zstd.h"
#include "config/configuration.h"
#include "config/endpoint_tls_config.h"
#include "config/node_config.h"
Expand Down Expand Up @@ -275,6 +277,15 @@ void application::initialize(
config::shard_local_cfg().zstd_decompress_workspace_bytes());
}).get0();

/*
* allocate per-core workspaces for async_stream_zstd. it can be several
* megabytes in size, so do it before memory becomes fragmented.
*/
ss::smp::invoke_on_all([] {
compression::async_stream_zstd::init_workspace(
config::shard_local_cfg().zstd_decompress_workspace_bytes());
}).get0();

if (config::shard_local_cfg().enable_pid_file()) {
syschecks::pidfile_create(config::node().pidfile_path());
}
Expand Down

0 comments on commit ad24b22

Please sign in to comment.