Post 9yAzJ6kjbYvCfHPTWa by mt@social.bau-ha.us
 (DIR) More posts by mt@social.bau-ha.us
 (DIR) Post #9y4TQysOwTBbjcjyWu by mt@social.bau-ha.us
       2020-08-13T06:27:08Z
       
       0 likes, 1 repeats
       
       now matrix.bau-ha.us should be quite a lot faster than before, we catched that extremities bug again and it slowed sync to a crawl, now it's fixed quite a bit faster (seconds instead of minutes for me), we also tuned some postgres stuff like statistics target and run analyze daily on the db, that might make the indices a bit faster - looks good for now, let's hope it'll last #matrix #synapse
       
 (DIR) Post #9y4TpHjeTccXAtElcG by mt@social.bau-ha.us
       2020-08-13T06:31:32Z
       
       0 likes, 1 repeats
       
       looks like this:
       
 (DIR) Post #9y5h3wzJOH4djXqSnY by nipos@social.avareborn.de
       2020-08-13T20:34:37Z
       
       0 likes, 0 repeats
       
       @mt I totally forgot about this Extremities bug.Maybe that's also the reason why ggc-project.de is quite slow these days.I should check that again 🤔
       
 (DIR) Post #9y72k7rz5BmTB5XI2K by mt@social.bau-ha.us
       2020-08-14T12:12:11Z
       
       0 likes, 0 repeats
       
       @nipos looks like raising the statistics target in postgres and running analaze regulary also has some effect - now indices are used for everything
       
 (DIR) Post #9y9Z68lrzunvC48YkK by nipos@social.avareborn.de
       2020-08-15T17:24:13Z
       
       0 likes, 0 repeats
       
       @mt I just cleared the extremities - it was nearly 900 and I ran ANALYZE; and it immediately improved.However,this query I found on Stackoverflow shows zero for all statistics:SELECT attrelid::regclass, attname, attstattarget FROM pg_attribute WHERE attstattarget >= 0 order by attstattarget desc;What are good values to set here?
       
 (DIR) Post #9y9meykeXbkjeqVhaK by mt@social.bau-ha.us
       2020-08-15T19:56:09Z
       
       0 likes, 0 repeats
       
       @nipos sorry no idea - just raised default statistics target and did this: https://github.com/matrix-org/synapse/issues/5064#issuecomment-497668250 also vacuumdb daily, no idea - have to look later
       
 (DIR) Post #9y9mtplYEOiI8L0vLs by nipos@social.avareborn.de
       2020-08-15T19:58:52Z
       
       0 likes, 0 repeats
       
       @mt I have no idea what you mean with default statistics target as i never did anything with the statistics before but I'll try the query from the issue.
       
 (DIR) Post #9y9nE60XYQzqIXgd5k by mt@social.bau-ha.us
       2020-08-15T20:02:31Z
       
       0 likes, 0 repeats
       
       @nipos it's a setting postgresql.conf - here is a short explanation: https://elephas.io/analyzing-effect-on-default_statistics_target-on-analyze/ - I've set it to 1000 - no idea if that is good enough but running ANALYZE is slower and not all tables are large
       
 (DIR) Post #9y9nrwDNNqtXVcgl1M by nipos@social.avareborn.de
       2020-08-15T20:09:43Z
       
       0 likes, 0 repeats
       
       @mt Thanks,I'll try that tomorrow.I hope it will help.I mean the performance is still quite good but I'm not that happy with the high CPU usage as a normal Synapse installation can still only run on one CPU core.
       
 (DIR) Post #9yAzJ6kjbYvCfHPTWa by mt@social.bau-ha.us
       2020-08-16T09:52:35Z
       
       0 likes, 0 repeats
       
       @nipos if you have the time running a few workers might be a good idea - and I'm really happy about switching to https://github.com/turt2live/matrix-media-repo - I don't know how many active users are on the instance but usally more than core is used but no process is pegging at 99% for a long time (sometimes sync and federation sender but usally not longer than a minute) - but it's all wasted time and hassle - I hope the matrix-guys figure their shit out or present some low-maintenance synapse replacement...
       
 (DIR) Post #9yAzi37uDy3weq8oHQ by nipos@social.avareborn.de
       2020-08-16T09:57:07Z
       
       0 likes, 0 repeats
       
       @mt I don't think that the media repository is the biggest problem.You're right that workers are better but I think many things regarding workers changed in the recent version so I want to wait with setting them up at ggc-project.de until the latest version arrives in the Arch Linux repository.On riotchat.de we've been using workers already for a very long time and they work great so far.But it's a vServer.On the dedicated server at ggc-project.de everything worked fine without workers until a few weeks ago when Synapse started taking 100% of one CPU core permanently.Your other tips fixed that,the CPU load is much lower now.
       
 (DIR) Post #9yB07dU4BYA8eqhu0u by mt@social.bau-ha.us
       2020-08-16T10:01:43Z
       
       0 likes, 0 repeats
       
       @nipos that's probably extremities, but the analyse stuff might also help -> faster queries less cpu probably :)
       
 (DIR) Post #9yB0EXyh3SyHbmKPAm by nipos@social.avareborn.de
       2020-08-16T10:02:59Z
       
       0 likes, 0 repeats
       
       @mt I deleted Extremities,too.I think every step helped to make it a bit better and faster.