Skip to content

Commit

Permalink
Add mimalloc allocator and adjust message save threshold
Browse files Browse the repository at this point in the history
This commit integrates the mimalloc allocator as the default feature for
both the bench and server packages, aiming to improve memory allocation
performance. The `messages_required_to_save` configuration in
`server.toml` is reduced from 5000 to 1000 to enhance performance. by
Additionally, the server version is bumped from 0.4.151 to 0.4.152 to
reflect these changes.
  • Loading branch information
hubcio committed Feb 5, 2025
1 parent 0e14df4 commit 8bdc017
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version = "0.2.0"
edition = "2021"
license = "Apache-2.0"

[features]
default = ["server/mimalloc"]

[dependencies]
async-trait = "0.1.85"
atomic-time = "0.1.5"
Expand All @@ -18,6 +21,7 @@ human-repr = "1.1.0"
iggy = { path = "../sdk" }
iggy-bench-report = { path = "report" }
integration = { path = "../integration" }
server = { path = "../server" }
nonzero_lit = "0.1.2"
serde = { version = "1.0.217", features = ["derive"] }
tokio = { version = "1.43.0", features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion configs/server.toml
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ validate_checksum = false
# The threshold of buffered messages before triggering a save to disk (integer).
# Specifies how many messages accumulate before persisting to storage.
# Adjusting this can balance between write performance and data durability.
messages_required_to_save = 5000
messages_required_to_save = 1000

# Segment configuration
[system.segment]
Expand Down
4 changes: 2 additions & 2 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "server"
version = "0.4.151"
version = "0.4.152"
edition = "2021"
build = "src/build.rs"
license = "Apache-2.0"

[features]
default = []
default = ["mimalloc"]
mimalloc = ["dep:mimalloc"]
tokio-console = ["dep:console-subscriber", "tokio/tracing"]

Expand Down

0 comments on commit 8bdc017

Please sign in to comment.