Nova实践:实践计算节点调度算法——选择内存大的计算节点
程序员文章站
2022-05-11 17:25:47
...
一 实践介绍
两个计算节点,一个分配2G内存,一个分配1G内存。当启动一个虚拟机,最终选择分配2G内存的计算节点。
二 实践过程
1 实践后结果,有一个虚拟机在运行,运行在2G的计算节点上。
2 Nova的目录介绍
3 每启动一个虚拟机,就有一个虚拟机进程
[[email protected] instances]# ps -ef|grep -i qemu
qemu 3534 1 10 20:39 ? 00:00:30 /usr/libexec/qemu-kvm -name guest=instance-00000002,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-instance-00000002/master-key.aes -machine pc-i440fx-rhel7.4.0,accel=tcg,usb=off,dump-guest-core=off -m 512 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 57835459-1d60-40ae-b0c7-381bcbaba738 -smbios type=1,manufacturer=RDO,product=OpenStack Compute,version=15.1.0-1.el7,serial=69622dce-ad6c-4c40-8378-f3a512cacec8,uuid=57835459-1d60-40ae-b0c7-381bcbaba738,family=Virtual Machine -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-1-instance-00000002/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/dev/disk/by-path/ip-192.168.0.120:3260-iscsi-iqn.2010-10.org.openstack:volume-b64fedef-d528-435f-9256-414b44aa9bc5-lun-0,format=raw,if=none,id=drive-virtio-disk0,serial=b64fedef-d528-435f-9256-414b44aa9bc5,cache=none,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/dev/disk/by-path/ip-192.168.0.120:3260-iscsi-iqn.2010-10.org.openstack:volume-7236ed4b-bf0a-423f-bc7a-bb213c0e9853-lun-0,format=raw,if=none,id=drive-virtio-disk1,serial=7236ed4b-bf0a-423f-bc7a-bb213c0e9853,cache=none,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 -netdev tap,fd=27,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:5f:26:45,bus=pci.0,addr=0x3 -add-fd set=1,fd=30 -chardev pty,id=charserial0,logfile=/dev/fdset/1,logappend=on -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc 0.0.0.0:0 -k en-us -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -msg timestamp=on
root 3858 2298 0 20:44 pts/0 00:00:00 grep --color=auto -i qemu
4 调度日志
[[email protected] instances]# cd /var/log/nova/
[[email protected] nova]# ll nova-scheduler.log
-rw-r--r--. 1 nova nova 159582 Mar 21 21:10 nova-scheduler.log
上一篇: Nova中的RPC讲解
下一篇: Samba源码安装与配置