-
Notifications
You must be signed in to change notification settings - Fork 50
HOWTO: Extract performance data directly from the Metric Store
As discussed elsewhere, the metrics collected by CBTOOL can be grouped in three categories: Management performance metrics (management), Application performance metrics (runtime_app), and OS resource usage metrics (runtime_os). Unsurprisingly the data is stored in the Metric Store (a MongoDB data store) in collections whose names contain the management, runtime_app or runtime_os string.
The data structure of the Metric Store is the following:
> show dbs
local (empty)
metrics 5.951171875GB
test (empty)
> use metrics
switched to db metrics
> show collections
latest_management_VM_msilva
latest_runtime_os_HOST_msilva
management_HOST_msilva
management_VM_msilva
reported_management_VM_metric_names_msilva
reported_runtime_app_VM_metric_names_msilva
reported_runtime_os_HOST_metric_names_msilva
reported_runtime_os_VM_metric_names_msilva
runtime_app_VM_msilva
runtime_os_HOST_msilva
runtime_os_VM_msilva
system.indexes
trace_msilva
Please note that the name formation rule for each collection is PREFIXCATEGORYOBJECT_USERNAME.
-
Possible values for PREFIX can be either reported, latest or nothing. Collections prefixed by reported and latest are used only by the CloudBench GUI, and can be safely ignored by CBTOOL users.
-
Possible values for CATEGORY are (as discussed), management, runtime_app or runtime_os.
-
Possible values for OBJECT are VM or HOST.
-
Finally, by suffixing the collections with the USERNAME, multiple CBTOOL users can share the same MongoDB database.
The important collections, containing the actual data that can be extract and analyzed are then the ones that do not have a prefix. It is important to keep in mind that, each individual collection holds data pertaining multiple experiments (that is why is so important to set an experiment id early in your experiment file through the command expid
).
Collection have internal arrangements that vary according to its category. For instance, the management_VM_msilva collection contains one document per VM (i.e. each VM produces a single "sample"), containing all the information regarding the VM provisioning/deprovisioning timing. An illustrative example:
db.management_VM_msilva.find({"expid" : "mynewexperiment"}) { "_id" : "128A7C32-9DC4-52A2-8CEF-91545A22EB43", "imageid1" : "cb_nullworkload", "expid" : "mynewexperiment", "host_cloud_ip" : "9.2.223.20", "last_known_state" : "ACTIVE with ip assigned", "ai" : "336B60C4-0095-5EC0-8731-9FE4B4A90049", "mgt_001_provisioning_request_originated" : "1400017863", "vmc_name" : "RegionOne", "size" : "m1.tiny", "obj_type" : "VM", "uuid" : "128A7C32-9DC4-52A2-8CEF-91545A22EB43", "pattern" : "none", "mgt_002_provisioning_request_sent" : "1", "cloud_ip" : "10.10.0.5", "state" : "attached", "role" : "tinyvm", "mgt_004_network_acessible" : "15", "cloud_hostname" : "cb-msilva-TESTOPENSTACK-vm1-tinyvm", "type" : "nullworkload", "ai_name" : "ai_1", "mgt_003_provisioning_request_completed" : "11", "aidrs" : "none", "cloud_name" : "TESTOPENSTACK", "mgt_006_application_start" : "5", "aidrs_name" : "none", "name" : "vm_1", "vmc_cloud_ip" : "10.10.0.3", "mgt_005_file_transfer" : "2", "host_name" : "ngp-c1-virt-9", "model" : "osk" } { "_id" : "4F3A2A3F-A5EA-56B6-99AA-4013F56AC6BE", "imageid1" : "cb_netperf", "expid" : "mynewexperiment", "host_cloud_ip" : "9.2.223.21", "last_known_state" : "ACTIVE with ip assigned", "ai" : "DDD497F0-A9D2-5532-B97B-B6DAF03E3D72", "mgt_001_provisioning_request_originated" : "1400018004", "vmc_name" : "RegionOne", "size" : "m1.medium", "obj_type" : "VM", "uuid" : "4F3A2A3F-A5EA-56B6-99AA-4013F56AC6BE", "pattern" : "none", "mgt_002_provisioning_request_sent" : "1", "cloud_ip" : "10.10.0.7", "state" : "attached", "role" : "netclient", "mgt_004_network_acessible" : "5", "cloud_hostname" : "cb-msilva-TESTOPENSTACK-vm2-netclient", "type" : "netperf", "ai_name" : "ai_2", "mgt_003_provisioning_request_completed" : "11", "aidrs" : "none", "cloud_name" : "TESTOPENSTACK", "mgt_006_application_start" : "0", "aidrs_name" : "none", "name" : "vm_2", "vmc_cloud_ip" : "10.10.0.3", "mgt_005_file_transfer" : "1", "host_name" : "ngp-c1-virt-10", "model" : "osk" } { "_id" : "666CC54B-329F-5946-BCA7-DACF17EB495B", "imageid1" : "cb_netperf", "expid" : "mynewexperiment", "host_cloud_ip" : "9.2.223.20", "last_known_state" : "ACTIVE with ip assigned", "ai" : "DDD497F0-A9D2-5532-B97B-B6DAF03E3D72", "mgt_001_provisioning_request_originated" : "1400018004", "vmc_name" : "RegionOne", "size" : "m1.tiny", "obj_type" : "VM", "uuid" : "666CC54B-329F-5946-BCA7-DACF17EB495B", "pattern" : "none", "mgt_002_provisioning_request_sent" : "1", "cloud_ip" : "10.10.0.6", "state" : "attached", "role" : "netserver", "mgt_004_network_acessible" : "10", "cloud_hostname" : "cb-msilva-TESTOPENSTACK-vm3-netserver", "type" : "netperf", "ai_name" : "ai_2", "mgt_003_provisioning_request_completed" : "11", "aidrs" : "none", "cloud_name" : "TESTOPENSTACK", "mgt_006_application_start" : "0", "aidrs_name" : "none", "name" : "vm_3", "vmc_cloud_ip" : "10.10.0.3", "mgt_005_file_transfer" : "2", "host_name" : "ngp-c1-virt-9", "model" : "osk" }