Performances improvements#447
Open
OniriCorpe wants to merge 4 commits into
Open
Conversation
Josue-T
requested changes
Mar 13, 2024
Josue-T
left a comment
There was a problem hiding this comment.
Thanks for the pull request.
A small question: did you see any perf improvement after enabling the libjemalloc lib ?
| # replaces the previous top-level 'use_presence' option. | ||
| # | ||
| #enabled: false | ||
| enabled: __PRESENCE__ |
There was a problem hiding this comment.
Suggested change
| enabled: __PRESENCE__ | |
| enabled: __PRESENCE_TRACKING__ |
|
|
||
| # add libjemalloc.so to the matrix-synapse env file | ||
| libjemalloc_path=$(whereis libjemalloc | cut -d ' ' -f 3) | ||
| echo "LD_PRELOAD=$libjemalloc_path" >> "/etc/default/matrix-$app" |
There was a problem hiding this comment.
Well as this app is packaged with pip I really prefer to keep all config into /etc/matrix-$app/.
Same a the last comment we should add this into a template file which will be in /etc/matrix-$app/synapse_env.
| # if necessary, add libjemalloc.so to the matrix-synapse env file | ||
| if ! grep -q "libjemalloc" "/etc/default/matrix-$app"; then | ||
| libjemalloc_path=$(whereis libjemalloc | cut -d ' ' -f 3) | ||
| echo "LD_PRELOAD=$libjemalloc_path" >> "/etc/default/matrix-$app" |
| If your server is slow, you can do the following, according to [the official doc](https://matrix-org.github.io/synapse/latest/usage/administration/admin_faq.html#help-synapse-is-slow-and-eats-all-my-ramcpu): | ||
|
|
||
| - increase the `SYNAPSE_CACHE_FACTOR` value in your `/etc/default/matrix-__APP__`, `2` is a good value | ||
| - note that the counterpart is more RAM usage |
There was a problem hiding this comment.
well this file is not managed by synapse. We should create a template file which will be in /etc/matrix-$app/synapse_env (and declare the usage in systemd unit). And manage synapse cache factor from config panel.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Solution
libjemallocto mymatrix-synapseenv fileSYNAPSE_CACHE_FACTORto2after that my server is much more usable
so i modified the package to implement the
libjemallocthingalso implemented presence tracking deactivation, since the docs says that it can be the culprit
PR Status