Purpose
Generally, if memory allocation fails due to memory fragmentation, the system will automatically clean up the memory fragments and try again. You can use the ALTER SYSTEM WASH MEMORY FRAGMENTATION statement to manually clean up memory fragments. This statement can release all idle blocks on a server.
Required privileges
You must execute the ALTER SYSTEM WASH MEMORY FRAGMENTATION statement as the root user of the sys tenant (namely root@sys).
Syntax
ALTER SYSTEM WASH MEMORY FRAGMENTATION server_or_zone;
server_or_zone:
SERVER [=] 'ip:port'
| ZONE [=] 'zone_name'
Parameters
| Parameter | Description |
|---|---|
| server_or_zone | The cleanup scope, which can be an OBServer node or a zone. |
| ip:port | The IP address and RPC port of the OBServer node from which memory fragments are to be cleaned up. You can specify only one OBServer node. |
| zone_name | The zone. You can specify only one zone. |
Examples
Clean up memory fragments from all OBServer nodes in
zone1.obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION ZONE = 'zone1';Clean up memory fragments from the specified OBServer node.
obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION SERVER = '10.10.10.1:2882';