真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

怎么解決后端使用cephqem性能問(wèn)題

怎么解決后端使用ceph qem性能問(wèn)題,相信很多沒(méi)有經(jīng)驗(yàn)的人對(duì)此束手無(wú)策,為此本文總結(jié)了問(wèn)題出現(xiàn)的原因和解決方法,通過(guò)這篇文章希望你能解決這個(gè)問(wèn)題。

昌樂(lè)網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián),昌樂(lè)網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為昌樂(lè)上千余家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)網(wǎng)站建設(shè)要多少錢,請(qǐng)找那個(gè)售后服務(wù)好的昌樂(lè)做網(wǎng)站的公司定做!

由于升級(jí)libvirt、qemu后沒(méi)有qemu-kvm模塊。nova配置文件配置為 virt-type=kvm將會(huì)報(bào)錯(cuò)、配置為qemu則性能低。

本次測(cè)試環(huán)境配置:

horizon 的ip 192.168.10.71

其他組件ip 192.168.10.191

1、使用virt-type=qemu啟動(dòng)的虛擬機(jī):

怎么解決后端使用ceph qem性能問(wèn)題

root     24502 17.6  0.4 2530112 307192 ?      Sl   21:51   1:23 /usr/bin/qemu-system-x86_64 -name instance-00000001 -S -machine pc-i440fx-1.6,accel=tcg,usb=off -m 512 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 8ee337e0-4808-49e7-9e66-45dc4a7b1f40 -smbios type=1,manufacturer=Red Hat Inc.,product=OpenStack Nova,version=2014.1.1-3.el6,serial=44454c4c-3600-1058-8033-b3c04f463232,uuid=8ee337e0-4808-49e7-9e66-45dc4a7b1f40 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/usr/local/libvirt/var/lib/libvirt/qemu/instance-00000001.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=rbd:liunova/8ee337e0-4808-49e7-9e66-45dc4a7b1f40_disk:id=admin:key=AQBlwSxU0HsWBxAAMfhhWANPIIDihk7JTFunKQ==:auth_supported=cephx\;none:mon_host=192.168.10.186\:6789\;192.168.10.187\:6789\;192.168.10.188\:6789\;192.168.10.189\:6789,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=18,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:99:7c:a0,bus=pci.0,addr=0x3 -chardev file,id=charserial0,path=/var/lib/nova/instances/8ee337e0-4808-49e7-9e66-45dc4a7b1f40/console.log -device isa-serial,chardev=charserial0,id=serial0 -chardev pty,id=charserial1 -device isa-serial,chardev=charserial1,id=serial1 -device usb-tablet,id=input0 -spice port=5900,addr=0.0.0.0,disable-ticketing,seamless-migration=on -k en-us -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5


很明顯看到上面使用的是/usr/bin/qemu-system-x86_64。


看看:/usr/bin/qemu-system-x86_64 --help

怎么解決后端使用ceph qem性能問(wèn)題

2、virt-type=kvm用openstack生成虛擬機(jī),報(bào)錯(cuò):

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8] Traceback (most recent call last):

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1305, in _build_instance

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     set_access_ip=set_access_ip)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 393, in decorated_function

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     return function(self, context, *args, **kwargs)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1717, in _spawn

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     LOG.exception(_('Instance failed to spawn'), instance=instance)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     six.reraise(self.type_, self.value, self.tb)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1714, in _spawn

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     block_device_info)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 2265, in spawn

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     block_device_info)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 3656, in _create_domain_and_network

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     power_on=power_on)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 3559, in _create_domain

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     domain.XMLDesc(0))

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     six.reraise(self.type_, self.value, self.tb)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 3554, in _create_domain

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     domain.createWithFlags(launch_flags)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 183, in doit

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     result = proxy_call(self._autowrap, f, *args, **kwargs)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 141, in proxy_call

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     rv = execute(f, *args, **kwargs)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 122, in execute

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     six.reraise(c, e, tb)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 80, in tworker

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     rv = meth(*args, **kwargs)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]   File "/usr/lib64/python2.6/site-packages/libvirt.py", line 727, in createWithFlags

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8]     if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self)

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee1tafd7f8] libvirtError: internal error: process exited while connecting to monitor: char device redirected to /dev/pts/4

2014-11-18 21:53:55.498 25214 TRACE nova.compute.manager [instance: 5b50ed5b-c3d9-40cd-889d-0aee14afd7f8] q%mu-kvm: -drive file=rbd:liunova/5b50ed5b-c3d9-40cd-889d-0aee14afd7f8_disk:id=admin:key=AQBlwSxU0HsWBxAAMfhhWANPIIDihk7JTFunKQ==:auth_supported=cephx\;none:mon_host=192.168.10.186\:6789\;192.168.10.187\:6789\;192.168.10.188\:6789\;192.168.10.189\:6789,if=none,id=drive-virtio-disk0,format=raw,cache=none%sA could not open disk image rbd:liunova/5b50ed5b-c3d9-40cd-889d-0aee14afd7f8_disk:id=admin:key=AQBlwSxU0HsWBxAAMfhhWANPIIDihk7JTFunKQ==:auth_supported=cephx\;none:mon_host=192.168.10.186\:6789\;192.168.10.187\:6789\;192.168.10.188\:6789\;192.168.10.189\:6789: No such file or directory

怎么解決后端使用ceph qem性能問(wèn)題

3、關(guān)于qemu-system-x86_64、qemu-kvm、qemu-img

圖3.1

怎么解決后端使用ceph qem性能問(wèn)題

查看上面兩個(gè)qemu-img對(duì)應(yīng)的版本及支持格式:

/usr/bin/qemu-img | grep -E  "version|Supported"

圖3.2

怎么解決后端使用ceph qem性能問(wèn)題

/usr/local/qemu/bin/qemu-img | grep -E  "version|Supported"

圖3.3

怎么解決后端使用ceph qem性能問(wèn)題

在回到上述錯(cuò)誤:

圖3.4

怎么解決后端使用ceph qem性能問(wèn)題

此處啟動(dòng)用的qemu-kvm:

查找qemu-kvm:

圖3.5

怎么解決后端使用ceph qem性能問(wèn)題

查看qemu-kvm版本:

圖3.6

怎么解決后端使用ceph qem性能問(wèn)題

再找到對(duì)應(yīng)的0.12.1版本的qemu-img(圖3.2),發(fā)現(xiàn)不支持rbd(ceph后端使用需要rbd支持)。(注:圖3.3qemu-img支持rbd。)

通過(guò)上面分析總結(jié)一下:

/usr/bin/qemu-system-x86_64與/usr/local/qemu/bin/qemu-img是配套的。版本為:version 1.6.1(手動(dòng)編譯1.6.1 qemu的源碼包之后版本)

/usr/libexec/qemu-kvm與/usr/bin/qemu-img是配套的。版本為:version 0.12.1(為升級(jí)前版本)


 

這樣就可以解釋圖3.4的錯(cuò)誤了,因?yàn)閳D3.4使用的是V0.12.1,而 V0.12.1的qemu-img沒(méi)有編譯支持rbd的模塊,因此出現(xiàn)圖3.4錯(cuò)誤。


 

解決辦法:

將圖3.4中啟動(dòng)的qemu-kvm替換為新版version 1.6.1的/usr/bin/qemu-system-x86_64來(lái)啟動(dòng)虛擬機(jī)。


 

操作步驟:

 mv /usr/libexec/qemu-kvm /usr/libexec/qemu-kvm.bak

再次生成虛擬機(jī):

怎么解決后端使用ceph qem性能問(wèn)題

發(fā)現(xiàn)虛擬機(jī)生成成功。

再來(lái)看看底冊(cè)啟動(dòng)參數(shù):

ps aux | grep qemu

怎么解決后端使用ceph qem性能問(wèn)題

發(fā)現(xiàn)后面生成的虛擬機(jī),將nova.conf配置為virt-type=kvm之后。再將原生自帶的qemu-kvm移除掉則能正常生成虛擬機(jī)。且生成的虛擬機(jī)使用了kvm虛擬機(jī)(accel=kvm),提高了性能。

結(jié)論:

1、當(dāng)     nova.conf配置為virt-type=qemu時(shí)候,會(huì)使用qemu軟件特性模擬生成虛擬機(jī),一次性能降低。    

2、當(dāng)nova.conf配置為virt-type=kvm時(shí)候,首先回去查找qemu-kvm模塊。如果存在qemu-kvm模塊則直接使用此模塊啟動(dòng)虛擬機(jī)。如果qemu-kvm模塊找不到,則會(huì)去尋找qemu-system-x86_64,找到則用qemu-system-x86_64啟動(dòng)虛擬機(jī),并使用kvm虛擬機(jī)特性。及開啟--enable-kvm特性參數(shù)


 

注:kvm虛擬化模塊:

在老版本中有單獨(dú)的qemu-kvm模塊存在,結(jié)合qemu一起做虛擬機(jī)工作。     在后續(xù)新版本中,已經(jīng)將qemu-kvm模塊完全合并到qemu中去。因此當(dāng)需要使用kvm特性時(shí)候,只需要qemu-system-x86_64 啟動(dòng)命令中增加參數(shù) --enable-kvm參數(shù)使能即可。

看完上述內(nèi)容,你們掌握怎么解決后端使用ceph qem性能問(wèn)題的方法了嗎?如果還想學(xué)到更多技能或想了解更多相關(guān)內(nèi)容,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!


標(biāo)題名稱:怎么解決后端使用cephqem性能問(wèn)題
鏈接分享:http://weahome.cn/article/pscede.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部