You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by jayakarteek <gi...@git.apache.org> on 2017/01/30 09:31:12 UTC
[GitHub] cloudstack pull request #1918: Management Server UI (VM statistics page) CPU...
GitHub user jayakarteek opened a pull request:
https://github.com/apache/cloudstack/pull/1918
Management Server UI (VM statistics page) CPU Utilized value is incorrect.
VMware CPU Utilised value is in Mhz , in MS value is displayed directly.
If CPU utilised is 500Mhz, UI value is displayed as 500 %
Planned to restrict changes in resource layer VmwareResource.java, but cpu allocated to VM by VMware is not same as allocated in the service offering.
If CPU limit flag is set to false in service offerings the Allocated CPU can go beyond what is assigned.
So picking actual user assigned Total CPU from database for calculating percentage.
It is expected that percentage would go beyond 100 percent.
so changes are made in UserVmJoinDaoImpl.java
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jayakarteek/cloudstack cloudstack-9762
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1918.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1918
----
commit 58d721603300b236bded82147363a06e80ecf67a
Author: Jayakarteek Vasana <ja...@persistent.co.in>
Date: 2017-01-30T09:06:03Z
Bug fix for CLOUDSTACK-9762 Management Server UI (VM statistics page) CPU Utilized value is incorrect
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@nvazquez, this helped.
I checked the \u201cVmwareResource.java\u201d at line 5113 is obtained the CPU usage of VM. From @jayakarteek explanations I understood that the usage does not come as %; VMware systems show the value as a continuous value of CPU used in MHz. Does not the object \u201cobjProps\u201d (created at line 5092) contain the configured CPU for the VM? So, the proper conversion could be applied on \u201cVmwareResource.java\u201d at line 5186, making the POJO (VmStatsEntry) consistent; otherwise, there is a variable called \u201ccpuUtilization\u201d that gives the idea of percentage/ratio of usage, but in reality, it is carrying the real used valued of CPU in MHz.
I also understood the issue regarding the CPU cap, but do not you think that if users select a service offering of 500MHz and their VMs are consuming 1GHz, it would be interesting to show that the VM is using more than they would expect? The cloud provider is being very generous in this case :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:
https://github.com/apache/cloudstack/pull/1918
This seems to be a great idea @nvazquez.
What do you think @jayakarteek ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request #1918: Management Server UI (VM statistics page) CPU...
Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1918#discussion_r108463719
--- Diff: server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java ---
@@ -196,6 +196,7 @@ public UserVmResponse newUserVmResponse(ResponseView view, String objectName, Us
// stats calculation
VmStats vmStats = ApiDBUtils.getVmStatistics(userVm.getId());
if (vmStats != null) {
+
--- End diff --
I think you can remove this extra line here
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:
https://github.com/apache/cloudstack/pull/1918
<b>Trillian test result (tid-824)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34138 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1918-t824-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Test completed. 47 look ok, 2 have error(s)
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_02_redundant_VPC_default_routes | `Failure` | 869.52 | test_vpc_redundant.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 388.71 | test_vpc_redundant.py
test_04_rvpc_privategw_static_routes | `Failure` | 345.89 | test_privategw_acl.py
test_01_vpc_site2site_vpn | Success | 170.19 | test_vpc_vpn.py
test_01_vpc_remote_access_vpn | Success | 66.17 | test_vpc_vpn.py
test_01_redundant_vpc_site2site_vpn | Success | 276.05 | test_vpc_vpn.py
test_02_VPC_default_routes | Success | 277.02 | test_vpc_router_nics.py
test_01_VPC_nics_after_destroy | Success | 527.97 | test_vpc_router_nics.py
test_05_rvpc_multi_tiers | Success | 526.88 | test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics | Success | 1301.03 | test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | Success | 575.17 | test_vpc_redundant.py
test_09_delete_detached_volume | Success | 156.56 | test_volumes.py
test_08_resize_volume | Success | 156.69 | test_volumes.py
test_07_resize_fail | Success | 161.53 | test_volumes.py
test_06_download_detached_volume | Success | 156.45 | test_volumes.py
test_05_detach_volume | Success | 155.70 | test_volumes.py
test_04_delete_attached_volume | Success | 151.20 | test_volumes.py
test_03_download_attached_volume | Success | 156.32 | test_volumes.py
test_02_attach_volume | Success | 124.41 | test_volumes.py
test_01_create_volume | Success | 709.37 | test_volumes.py
test_03_delete_vm_snapshots | Success | 275.21 | test_vm_snapshots.py
test_02_revert_vm_snapshots | Success | 100.74 | test_vm_snapshots.py
test_01_create_vm_snapshots | Success | 163.75 | test_vm_snapshots.py
test_deploy_vm_multiple | Success | 273.04 | test_vm_life_cycle.py
test_deploy_vm | Success | 0.05 | test_vm_life_cycle.py
test_advZoneVirtualRouter | Success | 0.03 | test_vm_life_cycle.py
test_10_attachAndDetach_iso | Success | 26.70 | test_vm_life_cycle.py
test_09_expunge_vm | Success | 125.22 | test_vm_life_cycle.py
test_08_migrate_vm | Success | 45.97 | test_vm_life_cycle.py
test_07_restore_vm | Success | 0.13 | test_vm_life_cycle.py
test_06_destroy_vm | Success | 130.85 | test_vm_life_cycle.py
test_03_reboot_vm | Success | 125.86 | test_vm_life_cycle.py
test_02_start_vm | Success | 10.18 | test_vm_life_cycle.py
test_01_stop_vm | Success | 40.32 | test_vm_life_cycle.py
test_CreateTemplateWithDuplicateName | Success | 70.66 | test_templates.py
test_08_list_system_templates | Success | 0.03 | test_templates.py
test_07_list_public_templates | Success | 0.04 | test_templates.py
test_05_template_permissions | Success | 0.05 | test_templates.py
test_04_extract_template | Success | 5.20 | test_templates.py
test_03_delete_template | Success | 5.11 | test_templates.py
test_02_edit_template | Success | 90.18 | test_templates.py
test_01_create_template | Success | 60.55 | test_templates.py
test_10_destroy_cpvm | Success | 161.65 | test_ssvm.py
test_09_destroy_ssvm | Success | 168.67 | test_ssvm.py
test_08_reboot_cpvm | Success | 131.84 | test_ssvm.py
test_07_reboot_ssvm | Success | 133.96 | test_ssvm.py
test_06_stop_cpvm | Success | 131.76 | test_ssvm.py
test_05_stop_ssvm | Success | 169.24 | test_ssvm.py
test_04_cpvm_internals | Success | 1.20 | test_ssvm.py
test_03_ssvm_internals | Success | 3.37 | test_ssvm.py
test_02_list_cpvm_vm | Success | 0.13 | test_ssvm.py
test_01_list_sec_storage_vm | Success | 0.15 | test_ssvm.py
test_01_snapshot_root_disk | Success | 11.29 | test_snapshots.py
test_04_change_offering_small | Success | 239.64 | test_service_offerings.py
test_03_delete_service_offering | Success | 0.04 | test_service_offerings.py
test_02_edit_service_offering | Success | 0.06 | test_service_offerings.py
test_01_create_service_offering | Success | 0.12 | test_service_offerings.py
test_02_sys_template_ready | Success | 0.13 | test_secondary_storage.py
test_01_sys_vm_start | Success | 0.18 | test_secondary_storage.py
test_09_reboot_router | Success | 40.34 | test_routers.py
test_08_start_router | Success | 35.34 | test_routers.py
test_07_stop_router | Success | 10.17 | test_routers.py
test_06_router_advanced | Success | 0.06 | test_routers.py
test_05_router_basic | Success | 0.04 | test_routers.py
test_04_restart_network_wo_cleanup | Success | 5.70 | test_routers.py
test_03_restart_network_cleanup | Success | 60.53 | test_routers.py
test_02_router_internal_adv | Success | 1.08 | test_routers.py
test_01_router_internal_basic | Success | 0.58 | test_routers.py
test_router_dns_guestipquery | Success | 76.75 | test_router_dns.py
test_router_dns_externalipquery | Success | 0.10 | test_router_dns.py
test_router_dhcphosts | Success | 276.89 | test_router_dhcphosts.py
test_router_dhcp_opts | Success | 21.77 | test_router_dhcphosts.py
test_01_updatevolumedetail | Success | 0.08 | test_resource_detail.py
test_01_reset_vm_on_reboot | Success | 131.22 | test_reset_vm_on_reboot.py
test_createRegion | Success | 0.04 | test_regions.py
test_create_pvlan_network | Success | 5.21 | test_pvlan.py
test_dedicatePublicIpRange | Success | 0.50 | test_public_ip_range.py
test_03_vpc_privategw_restart_vpc_cleanup | Success | 506.79 | test_privategw_acl.py
test_02_vpc_privategw_static_routes | Success | 370.60 | test_privategw_acl.py
test_01_vpc_privategw_acl | Success | 102.40 | test_privategw_acl.py
test_01_primary_storage_nfs | Success | 35.96 | test_primary_storage.py
test_createPortablePublicIPRange | Success | 15.21 | test_portable_publicip.py
test_createPortablePublicIPAcquire | Success | 15.46 | test_portable_publicip.py
test_isolate_network_password_server | Success | 92.91 | test_password_server.py
test_UpdateStorageOverProvisioningFactor | Success | 0.13 | test_over_provisioning.py
test_oobm_zchange_password | Success | 30.70 | test_outofbandmanagement.py
test_oobm_multiple_mgmt_server_ownership | Success | 16.38 | test_outofbandmanagement.py
test_oobm_issue_power_status | Success | 10.25 | test_outofbandmanagement.py
test_oobm_issue_power_soft | Success | 15.33 | test_outofbandmanagement.py
test_oobm_issue_power_reset | Success | 15.41 | test_outofbandmanagement.py
test_oobm_issue_power_on | Success | 15.31 | test_outofbandmanagement.py
test_oobm_issue_power_off | Success | 15.34 | test_outofbandmanagement.py
test_oobm_issue_power_cycle | Success | 15.68 | test_outofbandmanagement.py
test_oobm_enabledisable_across_clusterzones | Success | 87.80 | test_outofbandmanagement.py
test_oobm_enable_feature_valid | Success | 5.16 | test_outofbandmanagement.py
test_oobm_enable_feature_invalid | Success | 0.18 | test_outofbandmanagement.py
test_oobm_disable_feature_valid | Success | 5.18 | test_outofbandmanagement.py
test_oobm_disable_feature_invalid | Success | 0.10 | test_outofbandmanagement.py
test_oobm_configure_invalid_driver | Success | 0.08 | test_outofbandmanagement.py
test_oobm_configure_default_driver | Success | 0.07 | test_outofbandmanagement.py
test_oobm_background_powerstate_sync | Success | 18.41 | test_outofbandmanagement.py
test_extendPhysicalNetworkVlan | Success | 15.36 | test_non_contigiousvlan.py
test_01_nic | Success | 484.85 | test_nic.py
test_releaseIP | Success | 258.32 | test_network.py
test_reboot_router | Success | 408.61 | test_network.py
test_public_ip_user_account | Success | 10.26 | test_network.py
test_public_ip_admin_account | Success | 40.28 | test_network.py
test_network_rules_acquired_public_ip_3_Load_Balancer_Rule | Success | 67.21 | test_network.py
test_network_rules_acquired_public_ip_2_nat_rule | Success | 61.82 | test_network.py
test_network_rules_acquired_public_ip_1_static_nat_rule | Success | 124.53 | test_network.py
test_delete_account | Success | 277.75 | test_network.py
test_02_port_fwd_on_non_src_nat | Success | 55.79 | test_network.py
test_01_port_fwd_on_src_nat | Success | 111.76 | test_network.py
test_nic_secondaryip_add_remove | Success | 207.73 | test_multipleips_per_nic.py
login_test_saml_user | Success | 19.27 | test_login.py
test_assign_and_removal_lb | Success | 133.67 | test_loadbalance.py
test_02_create_lb_rule_non_nat | Success | 187.34 | test_loadbalance.py
test_01_create_lb_rule_src_nat | Success | 207.78 | test_loadbalance.py
test_03_list_snapshots | Success | 0.06 | test_list_ids_parameter.py
test_02_list_templates | Success | 0.04 | test_list_ids_parameter.py
test_01_list_volumes | Success | 0.03 | test_list_ids_parameter.py
test_07_list_default_iso | Success | 0.06 | test_iso.py
test_05_iso_permissions | Success | 0.06 | test_iso.py
test_04_extract_Iso | Success | 5.16 | test_iso.py
test_03_delete_iso | Success | 95.20 | test_iso.py
test_02_edit_iso | Success | 0.06 | test_iso.py
test_01_create_iso | Success | 21.02 | test_iso.py
test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | Success | 193.11 | test_internal_lb.py
test_03_vpc_internallb_haproxy_stats_on_all_interfaces | Success | 148.19 | test_internal_lb.py
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | Success | 511.41 | test_internal_lb.py
test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | Success | 440.56 | test_internal_lb.py
test_dedicateGuestVlanRange | Success | 10.30 | test_guest_vlan_range.py
test_UpdateConfigParamWithScope | Success | 0.13 | test_global_settings.py
test_rolepermission_lifecycle_update | Success | 6.23 | test_dynamicroles.py
test_rolepermission_lifecycle_list | Success | 6.00 | test_dynamicroles.py
test_rolepermission_lifecycle_delete | Success | 5.88 | test_dynamicroles.py
test_rolepermission_lifecycle_create | Success | 5.96 | test_dynamicroles.py
test_rolepermission_lifecycle_concurrent_updates | Success | 6.05 | test_dynamicroles.py
test_role_lifecycle_update_role_inuse | Success | 5.93 | test_dynamicroles.py
test_role_lifecycle_update | Success | 11.01 | test_dynamicroles.py
test_role_lifecycle_list | Success | 5.92 | test_dynamicroles.py
test_role_lifecycle_delete | Success | 11.00 | test_dynamicroles.py
test_role_lifecycle_create | Success | 5.94 | test_dynamicroles.py
test_role_inuse_deletion | Success | 5.88 | test_dynamicroles.py
test_role_account_acls_multiple_mgmt_servers | Success | 8.28 | test_dynamicroles.py
test_role_account_acls | Success | 8.36 | test_dynamicroles.py
test_default_role_deletion | Success | 6.02 | test_dynamicroles.py
test_04_create_fat_type_disk_offering | Success | 0.09 | test_disk_offerings.py
test_03_delete_disk_offering | Success | 0.04 | test_disk_offerings.py
test_02_edit_disk_offering | Success | 0.05 | test_disk_offerings.py
test_02_create_sparse_type_disk_offering | Success | 0.07 | test_disk_offerings.py
test_01_create_disk_offering | Success | 0.11 | test_disk_offerings.py
test_deployvm_userdispersing | Success | 20.58 | test_deploy_vms_with_varied_deploymentplanners.py
test_deployvm_userconcentrated | Success | 35.69 | test_deploy_vms_with_varied_deploymentplanners.py
test_deployvm_firstfit | Success | 55.64 | test_deploy_vms_with_varied_deploymentplanners.py
test_deployvm_userdata_post | Success | 10.47 | test_deploy_vm_with_userdata.py
test_deployvm_userdata | Success | 66.27 | test_deploy_vm_with_userdata.py
test_02_deploy_vm_root_resize | Success | 6.04 | test_deploy_vm_root_resize.py
test_01_deploy_vm_root_resize | Success | 6.02 | test_deploy_vm_root_resize.py
test_00_deploy_vm_root_resize | Success | 212.66 | test_deploy_vm_root_resize.py
test_deploy_vm_from_iso | Success | 212.54 | test_deploy_vm_iso.py
test_DeployVmAntiAffinityGroup | Success | 65.98 | test_affinity_groups.py
test_01_test_vm_volume_snapshot | Skipped | 0.00 | test_vm_snapshots.py
test_06_copy_template | Skipped | 0.00 | test_templates.py
test_static_role_account_acls | Skipped | 0.02 | test_staticroles.py
test_11_ss_nfs_version_on_ssvm | Skipped | 0.02 | test_ssvm.py
test_01_scale_vm | Skipped | 0.00 | test_scale_vm.py
test_01_primary_storage_iscsi | Skipped | 0.04 | test_primary_storage.py
test_nested_virtualization_vmware | Skipped | 0.00 | test_nested_virtualization.py
test_06_copy_iso | Skipped | 0.00 | test_iso.py
test_deploy_vgpu_enabled_vm | Skipped | 0.03 | test_deploy_vgpu_enabled_vm.py
test_3d_gpu_support | Skipped | 0.04 | test_deploy_vgpu_enabled_vm.py
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by nvazquez <gi...@git.apache.org>.
Github user nvazquez commented on the issue:
https://github.com/apache/cloudstack/pull/1918
Hi @jayakarteek @rafaelweingartner,
I confirm issue, I tested using an instance with 1 CPU 500Mhz. I'll add screenshots for cases when CPU utilization is low and high:
First, with little utilization, vSphere shows 51Mhz CPU Utilization, while on Management Server statistics shows 51% CPU utilization


Then, ran a loop to increase CPU utilization increasing it to ~1609Mhz and Management Server statistics shows 1609% CPU Utilization,


Hope this helps!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by nvazquez <gi...@git.apache.org>.
Github user nvazquez commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@jayakarteek @rafaelweingartner what about retrieving CPU performance metric for usage using [PerfomanceManager](https://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.wssdk.apiref.doc/vim.PerformanceManager.html)? It is already used in `VmwareResource.getVmStats` lines 5134-5185 to retrieve vm network metrics. I think that similar as it is done for these metrics, we must query for available metrics and look for [usage CPU counter](https://pubs.vmware.com/vsphere-60/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fcpu_counters.html) which already comes as percentage for a given interval which would have to be low. This way we don't have to calculate depending on limit flag. What do you think about this approach?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by jayakarteek <gi...@git.apache.org>.
Github user jayakarteek commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@rafaelweingartner , @nvazquez
Review the code changes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by jayakarteek <gi...@git.apache.org>.
Github user jayakarteek commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@rafaelweingartner
we can retrieve the CPU speed of the host but the utilisation will have mismatch.
create VM with Medium Instance having 1000 Mhz , and VM is utilising 200Mhz of CPU then utilisation is 20%.
But if we consider host CPU capacity with 2400Mhz then utilisation in 8.3%.
@nvazquez
I checked CPUCounter API doc, even in this case values will have some missmatch.
as per the below document with the usage formula they are using.
https://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/cpu_counters.html
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by jayakarteek <gi...@git.apache.org>.
Github user jayakarteek commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@nvazquez @rafaelweingartner
Done.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by nvazquez <gi...@git.apache.org>.
Github user nvazquez commented on the issue:
https://github.com/apache/cloudstack/pull/1918
LGTM for testing. Tested on Vmware 6.0, I attach some screenshots for test scenarios, in which vm was deployed using service offering, infinite loop was executed to increase CPU utilization and then stopped
- Test case 1: Service offering not limiting CPU speed






- Test case 2: Service offering limiting CPU speed




@rafaelweingartner thanks for your effort in this PR
@jayakarteek can you please rebase master branch and squash your commits?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by borisstoyanov <gi...@git.apache.org>.
Github user borisstoyanov commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@blueorangutan package
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by jayakarteek <gi...@git.apache.org>.
Github user jayakarteek commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@rafaelweingartner
Tried using both cpuentitlement cpu reservedCapacity but retrieved values from vmware are zero.
While going through docs , I saw **summary.runtime.maxCpuUsage** property which is max cpu that is allocated per vm, this looks accurate.
If I enable CPU cap in ACS UI , the cpu allocated returned by this property matches with the service offering.
If CPU cap is not enabled then cpu allocated value is determined by VMware.
So I am going with the above property using which I will calculate the CPU % and populate the POJO.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@jayakarteek I did not understand your doubt.
I see by your SS that the reservation field contains the speed configured in your service offering. From what I understood so far, this is what you want right? Looking at your debug SS, I also see that you can get this property on the ACS side. It is just because of this property (the configured CPU speed for the service offering) that you moved the calculation/definition of cpuUtilization to another layer in ACS components for VMware VMs. So, I am not seeing a problem to execute the calculations there (VmwareResource.java), when you create the POJO with the VM usage information.
Could you elaborate it a bit more?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by nvazquez <gi...@git.apache.org>.
Github user nvazquez commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@rafaelweingartner please ommit my last comment, service offering didn't use reserve CPU, so it didn't limit CPU speed to 500Mhz, it used all the available frecuency of the CPU instead.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by jayakarteek <gi...@git.apache.org>.
Github user jayakarteek commented on the issue:
https://github.com/apache/cloudstack/pull/1918
tag:mergeready
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by jayakarteek <gi...@git.apache.org>.
Github user jayakarteek commented on the issue:
https://github.com/apache/cloudstack/pull/1918
HI raferweingartner, nvazquez<https://github.com/nvazquez>,
Yes as specified in mail,
The issue is specific to VMware.
--JayaKarteek
From: Nicolas Vazquez [mailto:notifications@github.com]
Sent: Tuesday, February 14, 2017 5:36 AM
To: apache/cloudstack <cl...@noreply.github.com>
Cc: Jayakarteek Vasana <ja...@accelerite.com>; Mention <me...@noreply.github.com>
Subject: Re: [apache/cloudstack] Management Server UI (VM statistics page) CPU Utilized value is incorrect. (#1918)
Hi @jayakarteek<https://github.com/jayakarteek> @rafaelweingartner<https://github.com/rafaelweingartner>,
I confirm issue, I tested using an instance with 1 CPU 500Mhz. I'll add screenshots for cases when CPU utilization is low and high:
First, with little utilization, vSphere shows 51Mhz CPU Utilization, while on Management Server statistics shows 51% CPU utilization
[cpu51]<https://cloud.githubusercontent.com/assets/5295080/22908776/1e437a10-f22f-11e6-87a5-6933c990f911.JPG>
[cpu512]<https://cloud.githubusercontent.com/assets/5295080/22908783/26db1ba6-f22f-11e6-9a83-8743d7abb0e8.JPG>
Then, ran a loop to increase CPU utilization increasing it to ~1609Mhz and Management Server statistics shows 1609% CPU Utilization,
[cpu1600]<https://cloud.githubusercontent.com/assets/5295080/22908949/fed18ad6-f22f-11e6-9635-23cd5da38cba.JPG>
[cpu16002]<https://cloud.githubusercontent.com/assets/5295080/22908951/01fb02fa-f230-11e6-8f72-739709c87984.JPG>
Hope this helps!
\u2014
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://github.com/apache/cloudstack/pull/1918#issuecomment-279564806>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AWddQthernP9VQSqZ9_-mWxvHl93t9MIks5rcPADgaJpZM4LxMFs>.
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Accelerite, a Persistent Systems business. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Accelerite, a Persistent Systems business does not accept any liability for virus infected mails.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by nvazquez <gi...@git.apache.org>.
Github user nvazquez commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@rafaelweingartner I checked 'objProps' object and it doesn't contain the property. However, I think it can be easily retrieved by adding "summary.config.cpuReservation" on array at line 5089 (from Vmware docs: https://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.vm.Summary.ConfigSummary.html) for method `getVmPropertiesOnHyperHost`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:
https://github.com/apache/cloudstack/pull/1918
That is a good idea @nvazquez, thanks for the help here ;)
What do you think guys (@nvazquez, @borisstoyanov, @jayakarteek)? if we use the "summary.config.cpuReservatio" as @nvazquez suggested we could remove the changes proposed on (UserVmJoinDaoImpl.java) and avoid having a POJO with inconsistent data. Moreover, we concentrate VMware related logic and operation in VMware classes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by nvazquez <gi...@git.apache.org>.
Github user nvazquez commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@rafaelweingartner sorry for the last example, actually I think we've found a bug on change service offering, as I've been using that instance for changing its service offering when it had vm snapshots for PR #1727. Looking at `/proc/cpuinfo` I could see that CPU speed was 2.6Ghz, as vCenter shows, and not 500Mhz as listed on Management Server, so CPU speed was not properly set after changing service offering. I'll work on this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@jayakarteek thanks for the explanation
I thought that ACS would configure those parameters automatically. The way you described it feels like ACS is not limiting the use of CPU for VMs created in VMware systems.
I was checking the code, and there is this piece here: `com.cloud.hypervisor.vmware.util.VmwareHelper.setBasicVmConfig(VirtualMachineConfigSpec, int, int, int, int, int, String, boolean)`. At line 634 ACS is setting the CPU limit if CPU cap is enabled. Isn't that information available to be retrieved later (when we get the stats of a VM)? I know, this will only work with CPU cap. However, we could retrieve that CPU limit configuration, if it is '-1', we could then retrieve the CPU speed of the host (and use it to calculate the percentage of usage), is it possible? Or do you think it brings much trouble for the code?
@nvazquez could you also provide some feedback here?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@nvazquez no problem. I think it is ok to use everything that is available because the service offering is not restricting the CPU usage.
@nvazquez would it be possible for you to check if the object \u201cobjProps\u201d (created at line 5092) contains the configured CPU for the VM in \u201cVmwareResource.java\u201d? I think we should try to put the logic to fix that value there, instead of creating a POJO with inconsistent data.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by borisstoyanov <gi...@git.apache.org>.
Github user borisstoyanov commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@blueorangutan test
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by jayakarteek <gi...@git.apache.org>.
Github user jayakarteek commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@nvazquez , @borisstoyanov , @rafaelweingartner
Attached screen shots. where I set CPU Reservation as 500 Mhz using VSphere-Client , and same is obtained by the API call.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:
https://github.com/apache/cloudstack/pull/1918
Packaging result: \u2714centos6 \u2714centos7 \u2714debian. JID-487
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@jayakarteek from what I understood so far, there will always be a mismatch.
For instance, the way it is implemented so far, if a VM uses a service offering that provides 1000 MHz; and if CPU cap is not used, it (the VM) can use up to the real CPU of the host. If real CPU on the host is 2000 MHz, then it would show 200% of usage. Unless we want this behavior, the use of CPUCounter seems a better approach to avoid having an inconsistent POJO in the code. You said it might not be ideal because the CPUCounter (per its documentation) does not seem to consider the amount of virtual CPU allocated in MHz while calculating usage, right?
I just started this discussion because of the POJO that has an attribute that sometimes is set using percentage values and some other as continuous values. My goal was to highlight this and maybe discuss some solution.
I was reading the documentation link you sent, what are the differences between \u201ccpuentitlement\u201d and \u201creservedCapacity\u201d; I mean, I can read the description of the parameters
> cpuentitlement is computed based on an ideal scenario in which all virtual machines are completely busy and the load is perfectly balanced across all hosts
but the description for me seems different from what I can understand from "entitlement" when I read "CPU entitlement" I think of CPU power that the CPU is entitled and may not be using or getting for one or other reason. However, the description may sound like something else (this value being based on the load of hosts/clusters).
Would not one of these two configurations have the CPU in MHz allocated for the VM?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@jayakarteek this problem is happening only for VMware, right?
@nvazquez could you confirm this problem here? I believe you have access to an ACS system that orchestrates VMware deployment.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by jayakarteek <gi...@git.apache.org>.
Github user jayakarteek commented on the issue:
https://github.com/apache/cloudstack/pull/1918
Hi @nvazquez , @borisstoyanov , @rafaelweingartner ,
Pardon me for very late reply.
I tried with new property "summary.config.cpuReservation" , but it deals with the CPU reservation for the VM that is configured by VMWare.
It is different from the CPU speed, we define in CPU service offerings, as explained by below link
http://www.vfrank.org/2013/09/19/understanding-vmware-reservations-limits-and-shares/
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:
https://github.com/apache/cloudstack/pull/1918
Awesome! This seems a good approach to deal with the issue.
@jayakarteek and @nvazquez thanks for the effort.
@jayakarteek sorry for all of the stubbornness ;)
You really listened and discussed, and I think we reached a better solution here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1918: Management Server UI (VM statistics page) CPU Utiliz...
Posted by jayakarteek <gi...@git.apache.org>.
Github user jayakarteek commented on the issue:
https://github.com/apache/cloudstack/pull/1918
@rafaelweingartner
The CPU.Reservation value by **default** is 0, Also the value is set in VMware not from the ACS UI.
this gives ambiguity about the CPU allocated and Utilised.
Use case 1 :
CPU.Reservation is 0 by default, In this case we cannot calculate % as the value is always zero.
Use case 2:
CPU.Reservation is set by VMware admin say 500Mhz.
But while creating vm-instance using ACS UI , admin selected service offering as Medium Instance which is 1Ghz CPU. so CPU utilisation will be wrong.
In case say cloud environment has 30 instances , then Vmware admin has to manually set the CPU.Reservation value for each of the VM Instance which is cumbersome.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---