Purpose
Normally, when the system fails to allocate memory due to memory fragmentation, it will proactively clean up memory fragments and retry. You can also manually clean up memory fragmentation using the ALTER SYSTEM WASH MEMORY FRAGMENTATION statement. 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
Parameters |
Description |
|---|---|
| server_or_zone | Specify the cleanup scope: OBServer node or zone. |
| ip:port | Specify 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 flushed. 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';Cleans up memory fragmentation on the specified OBServer node.
obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION SERVER = '10.10.10.1:2882';