Purpose
By default, when the system fails to allocate memory due to memory fragmentation, it actively clears the memory fragmentation and retries. You can also use the ALTER SYSTEM WASH MEMORY FRAGMENTATION statement to manually clear memory fragmentation. This statement releases 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 for clearing 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 cleared. Only one OBServer node can be specified at a time. |
| zone_name | Specifies the zone to be cleared. Only one zone can be specified at a time. |
Examples
Clear memory fragmentation on all OBServer nodes within
Zone1.obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION ZONE = 'zone1';Clear memory fragmentation on a specified OBServer node.
obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION SERVER = '10.10.10.1:2882';
