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