##// END OF EJS Templates
docs: added example how to make tmpfs changes permanent
marcink -
r2159:31411168 default
parent child Browse files
Show More
@@ -1,42 +1,51 b''
1 1 .. _data-mem:
2 2
3 3 Mount Cache Folders To Memory
4 4 -----------------------------
5 5
6 6 To increase the performance of folders containing cache data, you can mount
7 7 them to memory. The following folders specified in the :file:`rhodecode.ini`
8 8 file would benefit from this.
9 9
10 10 .. code-block:: ini
11 11
12 12 cache_dir = %(here)s/data
13 13 search.location = %(here)s/data/index
14 14
15 15 Use the following Ubuntu example to mount these to memory, or see your
16 16 particular |os| instructions. The expected performance benefit is
17 17 approximately 5%. You should ensure you allocate an adequate amount of memory
18 18 depending on your available resources.
19 19
20 20 .. code-block:: bash
21 21
22 22 # mount to memory with 2GB limit and 755 write permissions
23 23 mount -t tmpfs -o size=2G,mode=0755 tmpfs /home/user/.rccontrol/enterprise-1/data
24 24 mount -t tmpfs -o size=2G,mode=0755 tmpfs /home/user/.rccontrol/enterprise-1/data/index
25 25
26 26 .. _move-tmp:
27 27
28
29 In order to make this change permanent it's recommend to set it as /etc/fstab
30 entry.
31
32 .. code-block:: bash
33
34 tmpfs /home/user/.rccontrol/enterprise-1/data tmpfs nodev,nosuid,noexec,nodiratime,size=2G 0 0
35
36
28 37 Move ``tmp`` to TMPFS
29 38 ---------------------
30 39
31 40 |RCE| components heavily use the :file:`/tmp` folder, so moving your
32 41 :file:`/tmp` folder into to a RAM-based TMPS can lead to a noticeable
33 42 performance boost.
34 43
35 44 .. code-block:: bash
36 45
37 46 # mount tmp to memory with 2GB limit and 1777 write permissions
38 47 mount -t tmpfs -o size=2G,mode=1777 tmpfs /tmp
39 48
40 49 For more information about TMPFS, see the documentation `here`_.
41 50
42 51 .. _here: https://wiki.archlinux.org/index.php/Tmpfs
General Comments 0
You need to be logged in to leave comments. Login now