ordinals / ord

👁‍🗨 Rare and exotic sats
https://ordinals.com
Creative Commons Zero v1.0 Universal
3.81k stars 1.35k forks source link

Use Improved Memory Allocators When Available #1894

Open bonedaddy opened 1 year ago

bonedaddy commented 1 year ago

Overview

By default rust uses the system's default memory allocator which tends to be malloc. malloc is sufficient for light workloads, however under heavy workloads, and lots of memory allocations like those done by ord it can be extremely useful to use a different allocator.

Solution

Add optional support for usage of jemalloc

Notes

This paper does a thorough analysis of different allocators, and recommends the usage of jemalloc over malloc for things like RDMS servers.

https://adms-conf.org/2019-camera-ready/durner_adms19.pdf

veryordinally commented 1 year ago

Sounds interesting - would be great if someone could try this out and add some comparative benchmarks/

nammaki commented 1 year ago

Benchmark provided in https://github.com/casey/ord/issues/1893