-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Set LD_PRELOAD to load jemalloc in Dockerfile-workers. #14182
Set LD_PRELOAD to load jemalloc in Dockerfile-workers. #14182
Conversation
At line 637, there is a |
I think the test failure is likely a flake (#14183). Complement-with-workers job succeeded otherwise. I'll rerun to confirm. |
Not the first time I've seen that flake. You should see the test failures on my personal repo 😁 |
Yeah, according to this I do need to switch to |
…o the new process. According to https://docs.python.org/3/library/os.html#os.execle this is the correct way.
CI passes. How can we confirm that we really are using jemalloc within complement? Does Synapse detect this and log something? |
There is a debug line here: synapse/synapse/metrics/jemalloc.py Lines 169 to 174 in cde8af9
|
I enabled DEBUG real quick and ran for like 30 seconds. I got:
Sound right? |
Can Prometheus pick up jemalloc stats? Perhaps with a blackbox exporter? |
Thanks, that's perfect.
Not sure. Looks like the stats are only used here as part of cache pruning. synapse/synapse/util/caches/lrucache.py Lines 138 to 150 in 41320a0
|
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.(run the linters)
Using jemalloc instead of malloc is supposed to be more efficient at long running instances of Synapse. It's used in start.py for simple single process homeservers started by the simple Dockerfile. Stick it into Dockerfile-workers too.
As discussed in
#synapse-dev
Signed-off-by: Jason Little realtyem@gmail.com