Jump to: navigation, search

Difference between revisions of "InstanceResourceQuota"

 
Line 12: Line 12:
  
 
1; set IO limit for the specified instance type
 
1; set IO limit for the specified instance type
  nova-manage flavor set_key --name m1.small  --key read_bytes_sec --value 10240000
+
   
 +
<pre><nowiki>nova-manage flavor set_key --name m1.small  --key read_bytes_sec --value 10240000
 
  nova-manage flavor set_key --name m1.small  --key write_bytes_sec --value 10240000
 
  nova-manage flavor set_key --name m1.small  --key write_bytes_sec --value 10240000
 +
</nowiki></pre>
 +
  
 
2;set CPU limit for the specified instance type
 
2;set CPU limit for the specified instance type
 +
 +
<pre><nowiki>
 
nova-manage flavor set_key --name m1.small  --key cpu_quota --value 5000
 
nova-manage flavor set_key --name m1.small  --key cpu_quota --value 5000
 
nova-manage flavor set_key --name m1.small  --key cpu_period --value 2500
 
nova-manage flavor set_key --name m1.small  --key cpu_period --value 2500
 +
</nowiki></pre>
 +
  
 
3;set Bandwidth limit for instance network traffic
 
3;set Bandwidth limit for instance network traffic
 +
 +
<pre><nowiki>
 
nova-manage flavor set_key --name m1.small  --key inboud_average --value 10240
 
nova-manage flavor set_key --name m1.small  --key inboud_average --value 10240
 
nova-manage flavor set_key --name m1.small  --key outboud_average --value 10240
 
nova-manage flavor set_key --name m1.small  --key outboud_average --value 10240
 +
</nowiki></pre>
 +
 +
 +
for the details about bandwidth  inbound_peak,inbound_burst,outbound_peak,outbound_burst refer to
  
for the details about bandwidth  inbound_peak,inbound_burst,outbound_peak,outbound_burst refer to http://libvirt.org/formatnetwork.html
+
http://libvirt.org/formatnetwork.html

Revision as of 06:46, 10 October 2012

Instance Resource Quota

How to set Server CPU,disk IO,Bandwidth consumption limit for instances using the new feather of nova. By using cgroup,libvirt can set the per instance CPU time consumption percent. and the instances's read_iops,read_byteps, write_iops,write_byteps.also libvirt support limit the instances in/out bandwidth.

blueprint https://blueprints.launchpad.net/nova/+spec/instance-resource-quota
commit https://review.openstack.org/#/c/14151/

Config Nova to use these feathers

1; set IO limit for the specified instance type

nova-manage flavor set_key --name m1.small  --key read_bytes_sec --value 10240000
 nova-manage flavor set_key --name m1.small  --key write_bytes_sec --value 10240000


2;set CPU limit for the specified instance type

nova-manage flavor set_key --name m1.small  --key cpu_quota --value 5000
nova-manage flavor set_key --name m1.small  --key cpu_period --value 2500


3;set Bandwidth limit for instance network traffic

nova-manage flavor set_key --name m1.small  --key inboud_average --value 10240
nova-manage flavor set_key --name m1.small  --key outboud_average --value 10240


for the details about bandwidth inbound_peak,inbound_burst,outbound_peak,outbound_burst refer to

http://libvirt.org/formatnetwork.html