Purpose
Usually, when the system fails to allocate memory due to memory fragmentation, it will actively clean up memory fragments and retry. You can also use the ALTER SYSTEM WASH MEMORY FRAGMENTATION statement to manually clean up memory fragments. This statement can release all idle blocks on the server.
Privilege requirements
Only the root user of the sys tenant (root@sys) can execute the ALTER SYSTEM WASH MEMORY FRAGMENTATION statement.
Syntax
ALTER SYSTEM WASH MEMORY FRAGMENTATION server_or_zone;
server_or_zone:
SERVER [=] 'ip:port'
| ZONE [=] 'zone_name'
Parameters
| Parameter | Description |
|---|---|
| server_or_zone | Specifies the scope of the cleanup, either an OBServer node or a Zone. |
| ip:port | Specifies the IP address and RPC port number of the OBServer node to be cleaned. Only one OBServer node can be specified at a time. |
| zone_name | Specifies the Zone to be refreshed. Only one Zone can be specified at a time. |
Examples
Clean up memory fragments on all OBServer nodes within
Zone1.obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION ZONE = 'zone1';Clean up memory fragments on a specified OBServer node.
obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION SERVER = '10.10.10.1:2882';