Hi,
Can you explain to me how/when to use this and whether this is enabled by default on the new version?
Thanks
Hi,
Can you explain to me how/when to use this and whether this is enabled by default on the new version?
Thanks
Hi there!
This command is used to instruct the Lua script engine instances to perform a GC. I am not sure when to use it though, but I am thinking normally we should not bother using it unless something heavy happens on the Lua engine. I will ask an engineer to take a look at this thread as well!
The SCRIPT HELP
command has some explanation as well:
dragonfly$> SCRIPT HELP
1) SCRIPT <subcommand> [<arg> [value] [opt] ...]
2) Subcommands are:
3) EXISTS <sha1> [<sha1> ...]
4) Return information about the existence of the scripts in the script cache.
5) FLUSH
6) Flush the Lua scripts cache. Very dangerous on replicas.
7) LOAD <script>
8) Load a script into the scripts cache without executing it.
9) FLAGS <sha> [flags ...]
10) Set specific flags for script. Can be called before the sript is loaded.
11) The following flags are possible:
12) - Use 'allow-undeclared-keys' to allow accessing undeclared keys
13) - Use 'disable-atomicity' to allow running scripts non-atomically
14) LIST
15) Lists loaded scripts.
16) LATENCY
17) Prints latency histograms in usec for every called function.
18) GC
19) Invokes garbage collection on all unused interpreter instances.
20) HELP
21) Prints this help.
Hi!
Because lua uses garbage collection, not all freed memory is instantly reclaimed. This is a command that you can call manually to run lua’s garbage collector. To avoid runtime penalties, we don’t call it manually when a script finishes execution, it only get’s to run from time to time when new allocations happen