SPEC 虚拟机配置

来源:互联网 发布:淘宝不能结算怎么回事 编辑:程序博客网 时间:2024/06/05 07:06

SPEC infraserver.xml

<!--WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BEOVERWRITTEN AND LOST. Changes to this xml configuration should be made using:  virsh edit infraserver1or other application using the libvirt API.--><domain type='kvm'>  <name>infraserver1</name>  <uuid>b48b6279-c5bd-44ef-9898-14dcff416a71</uuid>  <memory unit='KiB'>1048576</memory>  <currentMemory unit='KiB'>1048576</currentMemory>  <vcpu placement='static' cpuset='8-15,24-31'>1</vcpu>  <numatune>    <memory mode='strict' nodeset='1'/>  </numatune>  <resource>    <partition>/machine</partition>  </resource>  <os>    <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>    <boot dev='hd'/>  </os>  <features>    <acpi/>    <apic/>  </features>  <cpu mode='custom' match='exact' check='full'>    <model fallback='forbid'>SandyBridge</model>    <feature policy='require' name='hypervisor'/>    <feature policy='require' name='xsaveopt'/>  </cpu>  <clock offset='utc'>    <timer name='pit' tickpolicy='delay'/>  </clock>  <on_poweroff>destroy</on_poweroff>  <on_reboot>restart</on_reboot>  <on_crash>restart</on_crash>  <pm>    <suspend-to-mem enabled='no'/>    <suspend-to-disk enabled='no'/>  </pm>  <devices>    <emulator>/usr/libexec/qemu-kvm</emulator>    <disk type='block' device='disk'>      <driver name='qemu' type='raw' cache='none' io='native'/>      <source dev='/dev/vgtile1/infraserver1'/>      <target dev='vda' bus='virtio'/>      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>    </disk>    <disk type='block' device='disk'>      <driver name='qemu' type='raw' cache='none' io='native'/>      <source dev='/dev/vgtile1/infraserver1_vdb'/>      <target dev='vdb' bus='virtio'/>      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>    </disk>    <controller type='pci' index='0' model='pci-root'/>    <controller type='usb' index='0' model='piix3-uhci'>      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>    </controller>    <interface type='hostdev'>      <mac address='52:54:00:09:06:8d'/>      <source>        <address type='pci' domain='0x0000' bus='0x02' slot='0x10' function='0x0'/>      </source>      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>    </interface>    <interface type='hostdev'>      <mac address='52:54:00:92:b3:37'/>      <source>        <address type='pci' domain='0x0000' bus='0x02' slot='0x10' function='0x1'/>      </source>      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>    </interface>    <input type='mouse' bus='ps2'/>    <input type='keyboard' bus='ps2'/>    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>      <listen type='address' address='0.0.0.0'/>    </graphics>    <video>      <model type='cirrus' vram='16384' heads='1' primary='yes'/>      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>    </video>    <memballoon model='none'/>  </devices></domain>

优化方法:

        1SR-IOV提升网络I/O性能;

        2:dev使用逻辑卷;

        3virtio_blk提升磁盘I/O性能;

        4:物理cpu隔离核、vcpu绑核;

        5cpu高频配置;

        6:I/O调度模式(deadline)、cache模式优化(cache=none);

        7Guest文件系统优化(关闭内存屏障 nobarrier);

[root@webserver1 ~]# cat /etc/fstab## /etc/fstab# Created by anaconda on Tue Aug 29 15:38:31 2017## Accessible filesystems, by reference, are maintained under '/dev/disk'# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info#/dev/mapper/VolGroup-lv_root /                       ext4    nobarrier,noatime        1 1UUID=192e6f0a-9343-4948-a023-0b0b5373f98a /boot                   ext4    defaults        1 2/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0tmpfs                   /dev/shm                tmpfs   defaults        0 0devpts                  /dev/pts                devpts  gid=5,mode=620  0 0sysfs                   /sys                    sysfs   defaults        0 0proc                    /proc                   proc    defaults        0 0infraserver1-int:/home/webfiles/downloads /var/www/html/support/downloads   nfs     defaults        0 0

        7:关闭虚拟机没有用的service,减少虚机负载;

        8:更新ixgbevf驱动(SR-IOV),配置InterruptThrottleRate参数,减少中断次数;


原创粉丝点击