summary refs log tree commit diff
path: root/README.rst
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-02 14:36:10 +0000
committerErik Johnston <erik@matrix.org>2016-03-02 14:36:10 +0000
commit2a78dac60dc5d7ba7050386ba864f83f8d19e8e6 (patch)
tree5acc2246661fece680929dacbe73522b336cdce8 /README.rst
parentMerge pull request #489 from matrix-org/markjh/replication (diff)
parentSet SYNAPSE_CACHE_FACTOR=1 in jenkins (diff)
downloadsynapse-2a78dac60dc5d7ba7050386ba864f83f8d19e8e6.tar.xz
Merge pull request #612 from matrix-org/erikj/cache_size
Add environment variable SYNAPSE_CACHE_FACTOR, default it to 0.1
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst19
1 files changed, 18 insertions, 1 deletions
diff --git a/README.rst b/README.rst
index 39a338c790..8a745259bf 100644
--- a/README.rst
+++ b/README.rst
@@ -565,4 +565,21 @@ sphinxcontrib-napoleon::
 Building internal API documentation::
 
     python setup.py build_sphinx
-    
\ No newline at end of file
+
+
+
+Halp!! Synapse eats all my RAM!
+===============================
+
+Synapse's architecture is quite RAM hungry currently - we deliberately
+cache a lot of recent room data and metadata in RAM in order to speed up
+common requests.  We'll improve this in future, but for now the easiest
+way to either reduce the RAM usage (at the risk of slowing things down)
+is to set the almost-undocumented ``SYNAPSE_CACHE_FACTOR`` environment
+variable.  Roughly speaking, a SYNAPSE_CACHE_FACTOR of 1.0 will max out
+at around 3-4GB of resident memory - this is what we currently run the
+matrix.org on.  The default setting is currently 0.1, which is probably
+around a ~700MB footprint.  You can dial it down further to 0.02 if
+desired, which targets roughly ~512MB.  Conversely you can dial it up if
+you need performance for lots of users and have a box with a lot of RAM.
+