-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performances improvements #447
base: testing
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request.
A small question: did you see any perf improvement after enabling the libjemalloc lib ?
@@ -97,7 +97,7 @@ presence: | |||
# Uncomment to disable presence tracking on this homeserver. This option | |||
# replaces the previous top-level 'use_presence' option. | |||
# | |||
#enabled: false | |||
enabled: __PRESENCE__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enabled: __PRESENCE__ | |
enabled: __PRESENCE_TRACKING__ |
@@ -196,6 +198,10 @@ ynh_add_systemd_config --service=$app --template=synapse.service | |||
cp ../conf/default_coturn /etc/default/coturn-$app | |||
ynh_add_systemd_config --service=$app-coturn --template=synapse-coturn.service | |||
|
|||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Problem
Solution
libjemalloc
to mymatrix-synapse
env fileSYNAPSE_CACHE_FACTOR
to2
after that my server is much more usable
so i modified the package to implement the
libjemalloc
thingalso implemented presence tracking deactivation, since the docs says that it can be the culprit
PR Status