Purpose
By default, when the system fails to allocate memory due to memory fragmentation, it automatically cleans up the memory fragmentation and retries. You can also use the ALTER SYSTEM WASH MEMORY FRAGMENTATION statement to manually clean up memory fragmentation. This statement releases all free 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 for cleaning up memory fragmentation. It can be an OBServer node or a zone. |
| ip:port | Specifies the IP address and RPC port number of the OBServer node to be cleaned up. 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 fragmentation on all OBServer nodes in
Zone1.obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION ZONE = 'zone1';Clean up memory fragmentation on the specified OBServer node.
obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION SERVER = '10.10.10.1:2882';