Data Compaction Commands¶
Remove logical deleted objects and meta data and check the current disk usage
Shell | Description |
---|---|
Compaction Commands | |
leofs-adm compact-start <storage-node> (all|<num-of-targets>) [<num-of-compaction-proc>] |
|
leofs-adm compact-suspend <storage-node> |
|
leofs-adm compact-resume <storage-node> |
|
leofs-adm compact-status <storage-node> |
|
leofs-adm diagnose-start <storage-node> |
|
Disk Usage | |
leofs-adm du <storage-node> |
|
leofs-adm du detail <storage-node> |
|
compact-start <storage-node> (all | <num-of-targets>) [<num-of-compaction-procs>]¶
- Remove unnecessary objects from the node
- num-of-targets: It controls the number of containers in parallel
- num-of-compaction-procs: It controls the number of procs to execute the compaction in parallel
Note
Default <num-of-compation-procs>
is ‘3’ - You can control the number of processes to execute compaction in parallel. It enables you to get maximum performance by setting an appropriate number corresponding to the number of cores.
## All compaction-targets will be executed with 3 concurrent processes
## (default concurrency is 3)
$ leofs-adm compact-start [email protected] all
OK
## Number of compaction-targets will be executed with 2 concurrent processes
$ leofs-adm compact-start [email protected] 5 2
OK
compact-suspend <storage-node>¶
Suspend the compaction
$ leofs-adm compact-suspend [email protected]
OK
compact-resume <storage-node>¶
Resume the compaction
$ leofs-adm compact-resume [email protected]
OK
compact-status <storage-node>¶
- See the current compaction status
- Compaction’s status:
idle
,running
andsuspend
$ leofs-adm compact-status [email protected]
current status: running
last compaction start: 2013-03-04 12:39:47 +0900
total targets: 64
# of pending targets: 5
# of ongoing targets: 3
# of out of targets : 56
diagnose-start <storage-node>¶
v1.1.5-
Diagnose data of a target storage node- See also: LeoFS Storage data-diagnosis-log format
$ leofs-adm diagnose-start [email protected]
OK
du <storage-node>¶
See the current disk usages
$ leofs-adm du [email protected]
active number of objects: 19968
total number of objects: 39936
active size of objects: 198256974.0
total size of objects: 254725020.0
ratio of active size: 77.83%
last compaction start: 2013-03-04 12:39:47 +0900
last compaction end: 2013-03-04 12:39:55 +0900
du detail <storage-node>¶
See the current disk usages in the details
$ leofs-adm du detail [email protected]
[du(storage stats)]
file path: /home/leofs/dev/leofs/package/leofs/storage/avs/object/0.avs
active number of objects: 320
total number of objects: 640
active size of objects: 3206378.0
total size of objects: 4082036.0
ratio of active size: 78.55%
last compaction start: 2013-03-04 12:39:47 +0900
last compaction end: 2013-03-04 12:39:55 +0900
.
.
.
file path: /home/leofs/dev/leofs/package/leofs/storage/avs/object/63.avs
active number of objects: 293
total number of objects: 586
active size of objects: 2968909.0
total size of objects: 3737690.0
ratio of active size: 79.43%
last compaction start: ____-__-__ __:__:__
last compaction end: ____-__-__ __:__:__