Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
None
Description
The bucket stats:
- vb_active_itm_memory
- vb_pending_itm_memory
- vb_replica_itm_memory
Are all exposed via the bucket stats endpoint: http://localhost:8091/pools/default/buckets/travel-sample/stats
When bucket compression is being used, there are no available stats in the REST API to use this as each of the above stats is compressed, the only way to figure out the compressed vs. uncompressed size is to run:
/opt/couchbase/bin/cbstats \
|
localhost:11210 all \
|
-u Administrator \
|
-p password \
|
-b "travel-sample" | \
|
grep "itm_memory"
|
Which will output:
vb_active_itm_memory: 22395150
|
vb_active_itm_memory_uncompressed: 38385818
|
vb_pending_itm_memory: 0
|
vb_pending_itm_memory_uncompressed: 0
|
vb_replica_itm_memory: 0
|
vb_replica_itm_memory_uncompressed: 0
|
This can be very useful for sizing as well as determining the compression ratio and savings. Additionally, the document counts (active/replica) are exposed in the REST API as `curr_items` and `vb_replica_curr_items` but this does not offer any indication as to which documents are compressed and which ones aren't. The only way to determine that information is to run:
/opt/couchbase/bin/cbstats \
|
localhost:11210 all \
|
-u Administrator \
|
-p password \
|
-b "travel-sample" | \
|
grep "datatype"
|
ep_active_datatype_json: 6384
|
ep_active_datatype_json,xattr: 0
|
ep_active_datatype_raw: 0
|
ep_active_datatype_snappy: 0
|
ep_active_datatype_snappy,json: 25207
|
ep_active_datatype_snappy,json,xattr: 0
|
ep_active_datatype_snappy,xattr: 0
|
ep_active_datatype_xattr: 0
|
ep_replica_datatype_json: 0
|
ep_replica_datatype_json,xattr: 0
|
ep_replica_datatype_raw: 0
|
ep_replica_datatype_snappy: 0
|
ep_replica_datatype_snappy,json: 0
|
ep_replica_datatype_snappy,json,xattr: 0
|
ep_replica_datatype_snappy,xattr: 0
|
ep_replica_datatype_xattr: 0
|