From abeaeb75d5e7fee149d9750dac4c59288d20582c Mon Sep 17 00:00:00 2001 From: Maria Date: Mon, 20 Jan 2025 13:25:16 +0300 Subject: [PATCH 01/16] Add lua memory option --- .../configuration/configuration_reference.rst | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index cfbe74009..ecdbab32c 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3133,6 +3133,28 @@ log.syslog.* | Default: box.NULL | Environment variable: TT_LOG_SYSLOG_SERVER +.. _configuration_reference_lua: + +lua +=== + +The ``lua`` section outlines the configuration parameters related to the Lua environment within Tarantool. + +lua.memory +---------- + +Specifies the amount of memory allocated to Lua, measured in bytes. + +- **Default Value**: 2GB +- **Minimum Value**: 256MB + +Dynamic adjustment behavior +--------------------------- + +- If the specified value is **greater** than the current memory usage, the new limit is applied immediately without requiring a restart. +- If the specified value is **less** than the current memory usage, a **restart** of the instance is required for the change to take effect. + + .. _configuration_reference_memtx: memtx From 0aec71c6372a6b07ba29bb707e8af25666e2fe11 Mon Sep 17 00:00:00 2001 From: Maria Date: Mon, 20 Jan 2025 14:00:07 +0300 Subject: [PATCH 02/16] Tree fixed --- doc/reference/configuration/configuration_reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index ecdbab32c..7e70ec18f 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3136,7 +3136,7 @@ log.syslog.* .. _configuration_reference_lua: lua -=== +--- The ``lua`` section outlines the configuration parameters related to the Lua environment within Tarantool. From d56f64bbdbc80562d45b834fb96fd920becbc29d Mon Sep 17 00:00:00 2001 From: Maria Date: Mon, 20 Jan 2025 14:10:08 +0300 Subject: [PATCH 03/16] Tree fixed_1 --- doc/reference/configuration/configuration_reference.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index 7e70ec18f..31d0294c4 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3141,7 +3141,7 @@ lua The ``lua`` section outlines the configuration parameters related to the Lua environment within Tarantool. lua.memory ----------- +~~~~~~~~~~ Specifies the amount of memory allocated to Lua, measured in bytes. @@ -3149,7 +3149,7 @@ Specifies the amount of memory allocated to Lua, measured in bytes. - **Minimum Value**: 256MB Dynamic adjustment behavior ---------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~ - If the specified value is **greater** than the current memory usage, the new limit is applied immediately without requiring a restart. - If the specified value is **less** than the current memory usage, a **restart** of the instance is required for the change to take effect. From d0107fcd92d5392303946c99c70a8869115b761b Mon Sep 17 00:00:00 2001 From: Maria Date: Mon, 20 Jan 2025 15:22:12 +0300 Subject: [PATCH 04/16] Tree fixed_2 --- doc/reference/configuration/configuration_reference.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index 31d0294c4..b100e4546 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3140,16 +3140,18 @@ lua The ``lua`` section outlines the configuration parameters related to the Lua environment within Tarantool. -lua.memory -~~~~~~~~~~ +.. _configuration_reference_lua_memory: + +.. confval:: lua.memory Specifies the amount of memory allocated to Lua, measured in bytes. +- **Type**: integer - **Default Value**: 2GB - **Minimum Value**: 256MB Dynamic adjustment behavior -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^^^^^^ - If the specified value is **greater** than the current memory usage, the new limit is applied immediately without requiring a restart. - If the specified value is **less** than the current memory usage, a **restart** of the instance is required for the change to take effect. From 109b8f3f64981f7105bea259047f2dcf90686da0 Mon Sep 17 00:00:00 2001 From: Maria Date: Mon, 20 Jan 2025 15:33:42 +0300 Subject: [PATCH 05/16] Tree fixed_3 --- doc/reference/configuration/configuration_reference.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index b100e4546..710f947ec 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3140,6 +3140,11 @@ lua The ``lua`` section outlines the configuration parameters related to the Lua environment within Tarantool. +Below is an overview of the available configuration options for Lua: + +- :ref:`lua.memory` + + .. _configuration_reference_lua_memory: .. confval:: lua.memory @@ -3150,8 +3155,8 @@ Specifies the amount of memory allocated to Lua, measured in bytes. - **Default Value**: 2GB - **Minimum Value**: 256MB -Dynamic adjustment behavior -^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Dynamic adjustment behavior** - If the specified value is **greater** than the current memory usage, the new limit is applied immediately without requiring a restart. - If the specified value is **less** than the current memory usage, a **restart** of the instance is required for the change to take effect. From b69a5672546a04eaaf66500a29faf93d747990c3 Mon Sep 17 00:00:00 2001 From: Maria Date: Mon, 20 Jan 2025 15:43:51 +0300 Subject: [PATCH 06/16] Tree fixed_4 --- doc/reference/configuration/configuration_reference.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index 710f947ec..6072b25ce 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3142,7 +3142,7 @@ The ``lua`` section outlines the configuration parameters related to the Lua env Below is an overview of the available configuration options for Lua: -- :ref:`lua.memory` +- :ref:`lua.memory ` .. _configuration_reference_lua_memory: @@ -3156,7 +3156,7 @@ Specifies the amount of memory allocated to Lua, measured in bytes. - **Minimum Value**: 256MB -**Dynamic adjustment behavior** +**Dynamic adjustment behavior:** - If the specified value is **greater** than the current memory usage, the new limit is applied immediately without requiring a restart. - If the specified value is **less** than the current memory usage, a **restart** of the instance is required for the change to take effect. From a299eb7642ba47a79b1b1972a93bbc685042fc40 Mon Sep 17 00:00:00 2001 From: Maria Date: Mon, 20 Jan 2025 17:09:10 +0300 Subject: [PATCH 07/16] Tree fixed_5 --- doc/reference/configuration/configuration_reference.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index 6072b25ce..ef71f4264 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3138,9 +3138,9 @@ log.syslog.* lua --- -The ``lua`` section outlines the configuration parameters related to the Lua environment within Tarantool. +The ``lua`` section outlines the configuration parameters related to the ``lua`` environment within Tarantool. -Below is an overview of the available configuration options for Lua: +Below is an overview of the available configuration options for ``lua``: - :ref:`lua.memory ` @@ -3149,7 +3149,7 @@ Below is an overview of the available configuration options for Lua: .. confval:: lua.memory -Specifies the amount of memory allocated to Lua, measured in bytes. +Specifies the amount of memory allocated to ``lua``, measured in bytes. - **Type**: integer - **Default Value**: 2GB From cd28f650d5caacadfac3d72008e8977b9d6a18ae Mon Sep 17 00:00:00 2001 From: Maria Date: Tue, 21 Jan 2025 14:28:47 +0300 Subject: [PATCH 08/16] Tree fixed_6 --- .../configuration/configuration_reference.rst | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index ef71f4264..f79495f1b 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3138,9 +3138,13 @@ log.syslog.* lua --- -The ``lua`` section outlines the configuration parameters related to the ``lua`` environment within Tarantool. +The lua section outlines the configuration parameters related to the Lua environment within Tarantool. -Below is an overview of the available configuration options for ``lua``: +.. NOTE:: + + ``lua`` can be defined in any :ref:`scope `. + +.. NOTE:: - :ref:`lua.memory ` @@ -3149,18 +3153,20 @@ Below is an overview of the available configuration options for ``lua``: .. confval:: lua.memory -Specifies the amount of memory allocated to ``lua``, measured in bytes. - -- **Type**: integer -- **Default Value**: 2GB -- **Minimum Value**: 256MB +Specifies the amount of memory allocated to lua, measured in bytes. + | + | Type: integer + | Default Value: 2147483648 (2GB) + | Environment variable: TT_LUA_MEMORY for the cast value and TT_LUA_MEMORY_DEFAULT for the default value -**Dynamic adjustment behavior:** +When the specified value exceeds the current memory usage, the new limit takes effect immediately without a restart. +However, **when the specified value is lower than the current memory usage, a restart of the instance is required** for the change to take effect. -- If the specified value is **greater** than the current memory usage, the new limit is applied immediately without requiring a restart. -- If the specified value is **less** than the current memory usage, a **restart** of the instance is required for the change to take effect. +Example to set the Lua memory limit for 4 GB: +``lua: + memory: 4294967296`` .. _configuration_reference_memtx: From 9d74131c85124c59b55e4735810e6a72f0783dec Mon Sep 17 00:00:00 2001 From: Maria Date: Tue, 21 Jan 2025 15:11:23 +0300 Subject: [PATCH 09/16] Tree fixed_7 --- doc/reference/configuration/configuration_reference.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index f79495f1b..ab8fe4d34 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3165,8 +3165,9 @@ However, **when the specified value is lower than the current memory usage, a re Example to set the Lua memory limit for 4 GB: -``lua: - memory: 4294967296`` +.. code-block:: none + lua: + memory: 4294967296`` .. _configuration_reference_memtx: From fc75d0b8edc8fd6f9f3ca2fd052b7ea03e97dda9 Mon Sep 17 00:00:00 2001 From: Maria Date: Tue, 21 Jan 2025 15:21:59 +0300 Subject: [PATCH 10/16] Tree fixed_8 --- doc/reference/configuration/configuration_reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index ab8fe4d34..b3942fbb7 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3165,7 +3165,7 @@ However, **when the specified value is lower than the current memory usage, a re Example to set the Lua memory limit for 4 GB: -.. code-block:: none +.. code-block:: yaml lua: memory: 4294967296`` From e58783ab720f241387ec3b6a05b9346161661ff9 Mon Sep 17 00:00:00 2001 From: Maria Date: Tue, 21 Jan 2025 15:44:44 +0300 Subject: [PATCH 11/16] Tree fixed_9 --- doc/reference/configuration/configuration_reference.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index b3942fbb7..532809343 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3165,9 +3165,9 @@ However, **when the specified value is lower than the current memory usage, a re Example to set the Lua memory limit for 4 GB: -.. code-block:: yaml +.. code-block:: text lua: - memory: 4294967296`` + memory: 4294967296 .. _configuration_reference_memtx: From b37f413b69c7da6ab0ad2e57dd98742ec3663faf Mon Sep 17 00:00:00 2001 From: Maria Date: Tue, 21 Jan 2025 19:17:28 +0300 Subject: [PATCH 12/16] Tree fixed_10 --- doc/reference/configuration/configuration_reference.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index 532809343..214b26681 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3166,6 +3166,7 @@ However, **when the specified value is lower than the current memory usage, a re Example to set the Lua memory limit for 4 GB: .. code-block:: text + lua: memory: 4294967296 From 7d83a347ddd2f9233ba0aa5b57f759cb63b7a79d Mon Sep 17 00:00:00 2001 From: Maria Date: Tue, 21 Jan 2025 19:33:22 +0300 Subject: [PATCH 13/16] Tree fixed_11 --- doc/reference/configuration/configuration_reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index 214b26681..1f4acf2c0 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3165,7 +3165,7 @@ However, **when the specified value is lower than the current memory usage, a re Example to set the Lua memory limit for 4 GB: -.. code-block:: text +.. code-block:: yaml lua: memory: 4294967296 From 27b7acd6d7ec601abf2f9ce30d89be524a39e179 Mon Sep 17 00:00:00 2001 From: Maria Date: Tue, 21 Jan 2025 19:40:50 +0300 Subject: [PATCH 14/16] Tree fixed_12 --- doc/reference/configuration/configuration_reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index 1f4acf2c0..6863b4727 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3138,7 +3138,7 @@ log.syslog.* lua --- -The lua section outlines the configuration parameters related to the Lua environment within Tarantool. +The ``lua`` section outlines the configuration parameters related to the Lua environment within Tarantool. .. NOTE:: From cace10ac77e6d6c0dfdf07dd8f284e8cc969672b Mon Sep 17 00:00:00 2001 From: Maria Date: Wed, 22 Jan 2025 12:18:30 +0300 Subject: [PATCH 15/16] some reviewer's suggestions made --- doc/reference/configuration/configuration_reference.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index 6863b4727..44775a779 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3153,12 +3153,12 @@ The ``lua`` section outlines the configuration parameters related to the Lua env .. confval:: lua.memory -Specifies the amount of memory allocated to lua, measured in bytes. +Specifies the maximum memory amount available to Lua scripts, measured in bytes. | | Type: integer | Default Value: 2147483648 (2GB) - | Environment variable: TT_LUA_MEMORY for the cast value and TT_LUA_MEMORY_DEFAULT for the default value + | Environment variable: TT_LUA_MEMORY When the specified value exceeds the current memory usage, the new limit takes effect immediately without a restart. However, **when the specified value is lower than the current memory usage, a restart of the instance is required** for the change to take effect. From 516b294be5acbafe928bfdd66ad106f6e7438c9f Mon Sep 17 00:00:00 2001 From: Maria Date: Wed, 22 Jan 2025 13:10:58 +0300 Subject: [PATCH 16/16] some reviewer's suggestions made --- doc/reference/configuration/configuration_reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference/configuration/configuration_reference.rst b/doc/reference/configuration/configuration_reference.rst index 44775a779..3cd5bb281 100644 --- a/doc/reference/configuration/configuration_reference.rst +++ b/doc/reference/configuration/configuration_reference.rst @@ -3163,7 +3163,7 @@ Specifies the maximum memory amount available to Lua scripts, measured in bytes. When the specified value exceeds the current memory usage, the new limit takes effect immediately without a restart. However, **when the specified value is lower than the current memory usage, a restart of the instance is required** for the change to take effect. -Example to set the Lua memory limit for 4 GB: +Example to set the Lua memory limit to 4 GB: .. code-block:: yaml