#blkdeviotune
Explore tagged Tumblr posts
Text
OpenStack
Instance Resource Quota
IO limits
OS uses QEMU’s blkdeviotune underneath to apply i/o limits. Limits are setup at flavor level, altering them requires resizing an instance.
Setting up flavor with limits:
nova flavor-key <flavor name> set quota:disk_read_bytes_sec=<limit> nova flavor-key <flavor name> set quota:disk_write_bytes_sec=<limit>
CPU limits
Those are handled with CPU cgroup controller and applied at flavor level as well:
nova flavor-key <flavor name> set quota:cpu_quota=<limit> nova flavor-key <flavor name> set quota:cpu_period=<limit>
Bandwidth limits
Tc is used to control traffic shaping.
nova flavor-key <flavor name> set quota:vif_inbound_average=<limit> nova flavor-key <flavor name> set quota:vif_outbound_average=<limit>
Ref:. https://wiki.openstack.org/wiki/InstanceResourceQuota
Persisting DevStack’s ‘br-ex’ interface configuration across host OS reboots (on Ubuntu 18.04)
Stack.sh
Once stack.sh successfully deploys DevStack the ‘br-ex’ OVS bridge is assigned an IPv4 address of 172.24.4.1/24:
br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000 link/ether 46:98:c5:26:1d:49 brd ff:ff:ff:ff:ff:ff inet 172.24.4.1/24 brd 172.24.4.255 scope global br-ex valid_lft forever preferred_lft forever
Also there is an iptables rule for floating IPs masking:
# /sbin/iptables -t nat -L POSTROUTING (...) MASQUERADE all -- 172.24.4.0/24 anywhere
Once the host OS is rebooted all of the above is lost and OS instances are no longer reachable via floating IPs assigned to them.
Persisting the configuration
Create Netplan yaml file for br-ex interface:
/# cd /etc/netplan/ /etc/netplan# cat 99-br-ex.yaml network: version: 2 renderer: networkd ethernets: br-ex: addresses: - 172.24.4.1/24
Test new settings:
/etc/netplan# netplan try (...) Configuration accepted.
Persist iptables rule:
/# cd /etc/networkd-dispatcher/routable.d/ /etc/networkd-dispatcher/routable.d# cat br-ex-snat.sh #!/bin/sh /sbin/iptables -t nat -C POSTROUTING -s 172.24.4.0/24 -d 0.0.0.0/0 -j MASQUERADE 2>/dev/null || /sbin/iptables -t nat -A POSTROUTING -s 172.24.4.0/24 -d 0.0.0.0/0 -j MASQUERADE
0 notes