##// END OF EJS Templates
docs: updated docs about session tunning, and fixed DB tunning guide.
marcink -
r1292:771d79b4 default
parent child Browse files
Show More
@@ -0,0 +1,60 b''
1 .. _user-session-ref:
2
3 Increase User Session Performance
4 ---------------------------------
5
6 The default file-based sessions are only suitable for smaller setups, or
7 instances that doesn't have a lot of users or traffic.
8 They are set as default option because it's setup-free solution.
9
10 The most common issue of file based sessions are file limit errors which occur
11 if there are lots of session files.
12
13 Therefore, in a large scale deployment, to give better performance,
14 scalability, and maintainability we recommend switching from file-based
15 sessions to database-based user sessions or memcached sessions.
16
17 To switch to database-based user sessions uncomment the following section in
18 your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
19
20
21 .. code-block:: ini
22
23 ## db based session, fast, and allows easy management over logged in users
24 beaker.session.type = ext:database
25 beaker.session.table_name = db_session
26
27 # use just one of the following accoring to the type of database
28 beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
29 beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
30
31 beaker.session.sa.pool_recycle = 3600
32 beaker.session.sa.echo = false
33
34
35 and make sure you comment out the file based sessions.
36
37 .. code-block:: ini
38
39 ## types are file, ext:memcached, ext:database, and memory (default).
40 #beaker.session.type = file
41 #beaker.session.data_dir = %(here)s/data/sessions/data
42
43
44 To switch to memcached-based user sessions uncomment the following section in
45 your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
46
47 .. code-block:: ini
48
49 ## memcached sessions
50 beaker.session.type = ext:memcached
51 beaker.session.url = localhost:11211
52
53
54 and make sure you comment out the file based sessions.
55
56 .. code-block:: ini
57
58 ## types are file, ext:memcached, ext:database, and memory (default).
59 #beaker.session.type = file
60 #beaker.session.data_dir = %(here)s/data/sessions/data No newline at end of file
@@ -3,21 +3,6 b''
3 Increase Database Performance
3 Increase Database Performance
4 -----------------------------
4 -----------------------------
5
5
6 To increase database performance switch to database-based user sessions.
6 For tuning PostgreSQL we recommend reading: http://www.revsys.com/writings/postgresql-performance.html
7 File-based sessions are only suitable for smaller setups. The most common
8 issue being file limit errors which occur if there are lots of session files.
9 Therefore, in a large scale deployment, to give better performance,
10 scalability, and maintainability we recommend switching from file-based
11 sessions to database-based user sessions.
12
7
13 To switch to database-based user sessions uncomment the following section in
8 For tuning MySQL we recommend reading: http://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/ No newline at end of file
14 your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
15
16 .. code-block:: ini
17
18 # db session
19 beaker.session.type = ext:database
20
21 # adjust this property to include your database credentials
22 beaker.session.sa.url = postgresql://postgres:<pass>@localhost/rhodecode
23 beaker.session.table_name = db_session
@@ -10,6 +10,7 b' may find some of the following methods u'
10
10
11 tuning-gunicorn
11 tuning-gunicorn
12 tuning-vcs-memory-cache
12 tuning-vcs-memory-cache
13 tuning-user-sessions-performance
13 tuning-increase-db-performance
14 tuning-increase-db-performance
14 tuning-scale-horizontally
15 tuning-scale-horizontally
15 tuning-increase-cache-size
16 tuning-increase-cache-size
General Comments 0
You need to be logged in to leave comments. Login now