Purpose
By default, when a system fails to allocate memory due to memory fragmentation, the system automatically 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 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 to be cleared, 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 refreshed. Only one zone can be specified at a time. |
Examples
Clear memory fragmentation on all OBServer nodes in
Zone1.obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION ZONE = 'zone1';Clear memory fragmentation on the specified OBServer node.
obclient [(none)]> ALTER SYSTEM WASH MEMORY FRAGMENTATION SERVER = '10.10.10.1:2882';