Debian Codegraph @

doc/source/reference/commands/database_unmap.rst

raw
1 .. -*- rst -*-
2
3 .. groonga-command
4 .. database: commands_database_unmap
5
6 .. groonga-command
7 .. thread_limit 2
8
9 ``database_unmap``
10 ==================
11
12 Summary
13 -------
14
15 .. versionadded:: 5.0.7
16
17 ``database_unmap`` unmaps already mapped tables and columns in the
18 database. "Map" means that loading from disk to memory. "Unmap" means
19 that releasing mapped memory.
20
21 .. note::
22
23 Normally, you don't need to use ``database_unmap`` because OS
24 manages memory cleverly. If remained system memory is reduced, OS
25 moves memory used by Groonga to disk until Groonga needs the
26 memory. OS moves unused memory preferentially.
27
28 .. caution::
29
30 You can use this command only when :doc:`thread_limit` returns
31 ``1``. It means that this command doesn't work with multithreading.
32
33 Syntax
34 ------
35
36 This command takes no parameters::
37
38 database_unmap
39
40 Usage
41 -----
42
43 You can unmap database after you change the max number of threads to
44 ``1``:
45
46 .. groonga-command
47 .. include:: ../../example/reference/commands/database_unmap/usage_success.log
48 .. thread_limit --max 1
49 .. database_unmap
50
51 If the max number of threads is larger than ``1``, ``database_unmap``
52 fails:
53
54 .. groonga-command
55 .. include:: ../../example/reference/commands/database_unmap/usage_failure.log
56 .. thread_limit --max 2
57 .. database_unmap
58
59 Parameters
60 ----------
61
62 This section describes all parameters.
63
64 Required parameters
65 ^^^^^^^^^^^^^^^^^^^
66
67 There is no required parameter.
68
69 Optional parameters
70 ^^^^^^^^^^^^^^^^^^^
71
72 There is no optional parameter.
73
74 Return value
75 ------------
76
77 The command returns ``true`` as body on success such as::
78
79 [HEADER, true]
80
81 If the command fails, error details are in ``HEADER``.
82
83 See :doc:`/reference/command/output_format` for ``HEADER``.