docs: updated docs about session tunning, and fixed DB tunning guide.
This commit is contained in:
parent
86553f719e
commit
6a662ef4ed
3 changed files with 63 additions and 17 deletions
|
|
@ -3,21 +3,6 @@
|
|||
Increase Database Performance
|
||||
-----------------------------
|
||||
|
||||
To increase database performance switch to database-based user sessions.
|
||||
File-based sessions are only suitable for smaller setups. The most common
|
||||
issue being file limit errors which occur if there are lots of session files.
|
||||
Therefore, in a large scale deployment, to give better performance,
|
||||
scalability, and maintainability we recommend switching from file-based
|
||||
sessions to database-based user sessions.
|
||||
For tuning PostgreSQL we recommend reading: http://www.revsys.com/writings/postgresql-performance.html
|
||||
|
||||
To switch to database-based user sessions uncomment the following section in
|
||||
your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
# db session
|
||||
beaker.session.type = ext:database
|
||||
|
||||
# adjust this property to include your database credentials
|
||||
beaker.session.sa.url = postgresql://postgres:<pass>@localhost/rhodecode
|
||||
beaker.session.table_name = db_session
|
||||
For tuning MySQL we recommend reading: http://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/
|
||||
|
|
@ -10,6 +10,7 @@ may find some of the following methods useful.
|
|||
|
||||
tuning-gunicorn
|
||||
tuning-vcs-memory-cache
|
||||
tuning-user-sessions-performance
|
||||
tuning-increase-db-performance
|
||||
tuning-scale-horizontally
|
||||
tuning-increase-cache-size
|
||||
|
|
|
|||
60
docs/admin/tuning-user-sessions-performance.rst
Normal file
60
docs/admin/tuning-user-sessions-performance.rst
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
.. _user-session-ref:
|
||||
|
||||
Increase User Session Performance
|
||||
---------------------------------
|
||||
|
||||
The default file-based sessions are only suitable for smaller setups, or
|
||||
instances that doesn't have a lot of users or traffic.
|
||||
They are set as default option because it's setup-free solution.
|
||||
|
||||
The most common issue of file based sessions are file limit errors which occur
|
||||
if there are lots of session files.
|
||||
|
||||
Therefore, in a large scale deployment, to give better performance,
|
||||
scalability, and maintainability we recommend switching from file-based
|
||||
sessions to database-based user sessions or memcached sessions.
|
||||
|
||||
To switch to database-based user sessions uncomment the following section in
|
||||
your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
|
||||
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
## db based session, fast, and allows easy management over logged in users
|
||||
beaker.session.type = ext:database
|
||||
beaker.session.table_name = db_session
|
||||
|
||||
# use just one of the following accoring to the type of database
|
||||
beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
|
||||
beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
|
||||
|
||||
beaker.session.sa.pool_recycle = 3600
|
||||
beaker.session.sa.echo = false
|
||||
|
||||
|
||||
and make sure you comment out the file based sessions.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
## types are file, ext:memcached, ext:database, and memory (default).
|
||||
#beaker.session.type = file
|
||||
#beaker.session.data_dir = %(here)s/data/sessions/data
|
||||
|
||||
|
||||
To switch to memcached-based user sessions uncomment the following section in
|
||||
your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
## memcached sessions
|
||||
beaker.session.type = ext:memcached
|
||||
beaker.session.url = localhost:11211
|
||||
|
||||
|
||||
and make sure you comment out the file based sessions.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
## types are file, ext:memcached, ext:database, and memory (default).
|
||||
#beaker.session.type = file
|
||||
#beaker.session.data_dir = %(here)s/data/sessions/data
|
||||
Loading…
Add table
Add a link
Reference in a new issue