Bug 1247053

Summary: cluster policy is not active when cpu load overrun
Product: [Retired] oVirt Reporter: vanlos wang <vanloswang>
Component: ovirt-engine-webadminAssignee: bugs <bugs>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5CC: bugs, dfediuck, ecohen, gklein, lsurette, mgoldboi, rbalakri, vanloswang, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: sla
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-11 11:43:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
two vm cpu load
none
host cpu load with two vms
none
cluster policy
none
engine.log none

Description vanlos wang 2015-07-27 08:50:37 UTC
Description of problem:
I set a cluster policy which is in picture cluster_policy.jpg. And I run one vm with 100% cpu load by using dd cmd as below.
# for i in `seq 1 $(cat /proc/cpuinfo |grep "physical id" |wc -l)`; do dd if=/dev/zero of=/dev/null & done
Then I run another vm by the same method. After a while, each of the two vms has 49% cpu load, and the host cpu load is 99%.
At this time, I run another vm, according to the administrator guide, with such a cluster policy the 3rd vm will not be power up. But it is power up. 
Is it a bug or I missed some setting? Could you give me some suggestions? Thanks very much!

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.set a cluster policy as cluster_policy.jpg
2.create one vm, run the dd cmd, look at the cpu usage
3.create another vm, run the dd cmd, look at the cpu usage
4.start the 3rd vm

Actual results:
the 3rd vm is power up

Expected results:
the 3rd vm can not be power up

Additional info:

Comment 1 vanlos wang 2015-07-27 08:51:54 UTC
Created attachment 1056522 [details]
two vm cpu load

Comment 2 vanlos wang 2015-07-27 08:52:59 UTC
Created attachment 1056523 [details]
host cpu load with two vms

Comment 3 vanlos wang 2015-07-27 08:53:55 UTC
Created attachment 1056524 [details]
cluster policy

Comment 4 vanlos wang 2015-07-27 09:18:28 UTC
The cpu load caculated by top cmd shows as below:
# top
Tasks: 449 total,   2 running, 446 sleeping,   0 stopped,   1 zombie
%Cpu(s): 99.8 us,  0.2 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  1870516 total,   593384 free,   955432 used,   321700 buff/cache
KiB Swap:  4063228 total,  4048588 free,    14640 used.   722980 avail Mem 

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                        
 14397 qemu      20   0 2829060 377108  10768 R 212.0 20.2 123:45.54 qemu-kvm                                                                                       
 15000 qemu      20   0 3077004 365636  10828 S 186.7 19.5 124:00.59 qemu-kvm                                                                                       
  6563 vdsm       0 -20 2730656  62516   4212 S   1.0  3.3   3:57.61 vdsm                                                                                           
 17043 root      20   0  130328   2188   1268 R   0.3  0.1   0:07.52 top                                                                                            
     1 root      20   0   56900   4676   2776 S   0.0  0.2   0:02.33 systemd                                                                                        
     2 root      20   0       0      0      0 S   0.0  0.0   0:00.05 kthreadd                                                                                       
     3 root      20   0       0      0      0 S   0.0  0.0   0:00.05 ksoftirqd/0                                                                                    
     5 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H                                                                                   
     7 root      rt   0       0      0      0 S   0.0  0.0   0:01.71 migration/0                                                                                    
     8 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh                                                                                         
     9 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcuob/0

Comment 5 vanlos wang 2015-07-27 09:29:57 UTC
In administrator guide, Chapter 4.2.2.4, it says as below:
Distributes the CPU processing load evenly across all hosts in the cluster. Additional virtual machines attached to a host will not start if that host has reached the defined Maximum Service Level.

Comment 6 Doron Fediuck 2015-08-11 11:43:37 UTC
Hi,
the policy you defined is optimized for speed which will not
consider cpu utilization, and this is the result. In order to
get the right utilization, set the cluster optimization to utilization.

Comment 7 vanlos wang 2015-08-18 07:57:03 UTC
(In reply to Doron Fediuck from comment #6)
> Hi,
> the policy you defined is optimized for speed which will not
> consider cpu utilization, and this is the result. In order to
> get the right utilization, set the cluster optimization to utilization.

Hi, 
 I also set the policy to optimize for utilization, but vm is still can power up. In addition, I do not enable power managerment for my node, does it matter? I read the managerment guide, it says this feature need power management to be enabled. Could you give me some suggestion to active the cluster policy? Thanks very much.

Comment 8 Doron Fediuck 2015-08-19 18:28:53 UTC
(In reply to vanlos wang from comment #7)
> (In reply to Doron Fediuck from comment #6)
> > Hi,
> > the policy you defined is optimized for speed which will not
> > consider cpu utilization, and this is the result. In order to
> > get the right utilization, set the cluster optimization to utilization.
> 
> Hi, 
>  I also set the policy to optimize for utilization, but vm is still can
> power up. In addition, I do not enable power managerment for my node, does
> it matter? I read the managerment guide, it says this feature need power
> management to be enabled. Could you give me some suggestion to active the
> cluster policy? Thanks very much.

What is the relevant error message that you got?
Can you please attach the relevant part from the engine log file?

Comment 9 vanlos wang 2015-08-20 09:58:37 UTC
Created attachment 1065204 [details]
engine.log

Comment 10 vanlos wang 2015-08-20 10:00:08 UTC
Hi, 
I add the log which is named as engine.log, hope this will help debug this issue.

(In reply to Doron Fediuck from comment #8)
> (In reply to vanlos wang from comment #7)
> > (In reply to Doron Fediuck from comment #6)
> > > Hi,
> > > the policy you defined is optimized for speed which will not
> > > consider cpu utilization, and this is the result. In order to
> > > get the right utilization, set the cluster optimization to utilization.
> > 
> > Hi, 
> >  I also set the policy to optimize for utilization, but vm is still can
> > power up. In addition, I do not enable power managerment for my node, does
> > it matter? I read the managerment guide, it says this feature need power
> > management to be enabled. Could you give me some suggestion to active the
> > cluster policy? Thanks very much.
> 
> What is the relevant error message that you got?
> Can you please attach the relevant part from the engine log file?