Skip to content

Use MiMalloc as the default global allocator#364

Merged
ewienik merged 1 commit intoscylladb:masterfrom
swasik:VECTOR-539-mimalloc
Feb 13, 2026
Merged

Use MiMalloc as the default global allocator#364
ewienik merged 1 commit intoscylladb:masterfrom
swasik:VECTOR-539-mimalloc

Conversation

@swasik
Copy link
Collaborator

@swasik swasik commented Feb 12, 2026

Replace the default system allocator with mimalloc for improved allocation performance. Add mimalloc as a dependency to the vector-store crate and set it as the #[global_allocator] in the main binary entry point.

Memory usage benchmarks (5M vectors, 1536 dims):

  • glibc (baseline): 32_601_320
  • tikv_jemallocator: 32_193_596 (1.3% improvement)
  • mimalooc: 32_222_536 (1.2% improvement)

The higher the memory usage, the worse the result of glibc is.

MiMalloc is a bit worse but it has first tier support for aarch64.

Fixes: VECTOR-539.

Replace the default system allocator with mimalloc for improved
allocation performance. Add mimalloc as a dependency to the
vector-store crate and set it as the #[global_allocator] in the
main binary entry point.

Memory usage benchmarks (5M vectors, 1536 dims):

 * glibc (baseline): 32_601_320
 * tikv_jemallocator: 32_193_596 (1.3% improvement)
 * mimalooc: 32_222_536 (1.2% improvement)

The higher the memory usage, the worse the result of glibc is.

MiMalloc is a bit worse but it has first tier support for aarch64.

Fixes: VECTOR-539.
@swasik swasik force-pushed the VECTOR-539-mimalloc branch from 7e70109 to 7b43fdb Compare February 13, 2026 11:50
@ewienik ewienik added this pull request to the merge queue Feb 13, 2026
Merged via the queue into scylladb:master with commit 437f51b Feb 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants