Bug 1768518

Summary: [RFE] Add CPU throttling in model
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: V2VAssignee: Fabien Dupont <fdupont>
Status: CLOSED WONTFIX QA Contact: Md Nadeem <mnadeem>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.2CC: bthurber, dmetzger, istein, jprause, mturley, pvauter, simaishi, smallamp, ytale
Target Milestone: GAKeywords: ZStream
Target Release: 5.11.zFlags: pm-rhel: cfme-5.11.z+
Hardware: All   
OS: All   
Whiteboard: v2v
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1690851 Environment:
Last Closed: 2020-04-10 09:42:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: V2V Target Upstream Version:
Embargoed:
Bug Depends On: 1690851    
Bug Blocks:    
Attachments:
Description Flags
Top command output
none
throttling setting
none
migration-page none

Comment 2 CFME Bot 2019-11-04 18:00:55 UTC
New commits detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/eb6b2d647937029237c88f448e42459b955fbc8c
commit eb6b2d647937029237c88f448e42459b955fbc8c
Author:     Adam Grare <agrare>
AuthorDate: Thu Sep 12 08:21:56 2019 -0400
Commit:     Adam Grare <agrare>
CommitDate: Thu Sep 12 08:21:56 2019 -0400

    Merge pull request #19277 from fdupont-redhat/v2v_allow_dispatching_running_infraconversionjob

    [V2V] Allow active InfraConversionJob to be throttled

    (cherry picked from commit 1ec27c37b21eb91013e20bfd437f608481c876d7)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1768518

 app/models/job_proxy_dispatcher.rb | 2 +-
 spec/models/job_proxy_dispatcher_spec.rb | 29 +
 2 files changed, 30 insertions(+), 1 deletion(-)

Comment 3 Md Nadeem 2019-12-04 10:47:30 UTC
Hello Team,

I have set the CPU throttling to 1% on GUI, however it seems the value has not reflected in v2v-import file on conversion host or appliance. Please let me know if we need any additional steps to set the throttling.  Please find attached snapshot.
 
~~~~~~~~~~~~~~~~~~~~~~~
cat v2v-import-20191204T023714-37267.state | python -m json.tool
{
    "disk_count": 1,
    "disks": [
        {
            "path": "[netapp-nfs] test-v2v-a-tlt5/test-v2v-a-tlt5.vmdk",
            "progress": 100.0
        },
        {
            "path": "[env-vcenter67-ims-nfs-netapp-rdu-01a] test-v2v-a-tlt5/test-v2v-a-tlt5.vmdk",
            "progress": 0
        }
    ],
    "failed": false,
    "finished": true,
    "pid": 37333,
    "return_code": 0,
    "started": true,
    "throttling": {
        "cpu": null,
        "network": null
    },
    "vm_id": "a278375d-bf95-4070-ba33-62e827d51287"
}



irb(main):004:0> ServiceTemplateTransformationPlanTask.all.select { |t| t.source.name == 'test-v2v-a-tlt5' }.last.options[:virtv2v_limits]
=> nil
irb(main):005:0> 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`



The top command for "qemu-img convert" process showing the CPU utilization varies and goes beyond 1% threshold. So please have a look.


~~~~~~~~~~~~~~
                                               (%CPU) 
30255 vdsm      20   0  593884  34480   7692 S   1.3  0.0   0:04.87 qemu-img convert -p -n -f qcow2 -O raw /va+
30255 vdsm      20   0  593884  34480   7692 S   0.7  0.0   0:04.89 qemu-img convert -p -n -f qcow2 -O raw /va+
30255 vdsm      20   0  593884  34480   7692 S   2.0  0.0   0:04.95 qemu-img convert -p -n -f qcow2 -O raw /va+
30255 vdsm      20   0  593884  34480   7692 S   4.3  0.0   0:14.24 qemu-img convert -p -n -f qcow2 -O raw /va+
30255 vdsm      20   0  593884  34480   7692 S   4.3  0.0   0:14.37 qemu-img convert -p -n -f qcow2 -O raw /va+
~~~~~~~~~~~~~~~

Comment 4 Md Nadeem 2019-12-04 10:51:53 UTC
Created attachment 1642014 [details]
Top command output

Comment 5 Md Nadeem 2019-12-04 10:53:01 UTC
Created attachment 1642015 [details]
throttling setting

Comment 6 Md Nadeem 2019-12-04 10:53:50 UTC
Created attachment 1642016 [details]
migration-page