1 / 20

《 网络存储与系统虚拟化技术 》 实验

《 网络存储与系统虚拟化技术 》 实验. 洪星星 hongyzniu@126.com 李涛 hellolitom@gmail.com 高博 631538670@qq.com. 提纲. 普通实验 RAID 环境搭建 NAS (NFS) 环境搭建 KVM 虚拟化平台及 VM 安装 虚拟机基本操作与迁移 虚拟化性能评测 开放 实验 虚拟化集群监控系统 设计 Openstack , KVM 中 Ceph , Sheepdog 镜像存储方式性能对比 VM 镜像文件优化研究. 普通实验 1—— RAID 环境搭建. 实验目标

israel
Download Presentation

《 网络存储与系统虚拟化技术 》 实验

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 《网络存储与系统虚拟化技术》实验 洪星星 hongyzniu@126.com 李涛 hellolitom@gmail.com 高博 631538670@qq.com 1

  2. 提纲 • 普通实验 • RAID环境搭建 • NAS (NFS) 环境搭建 • KVM虚拟化平台及VM安装 • 虚拟机基本操作与迁移 • 虚拟化性能评测 • 开放实验 • 虚拟化集群监控系统设计 • Openstack, KVM中Ceph, Sheepdog镜像存储方式性能对比 • VM镜像文件优化研究 http://ncis.pku.edu.cn

  3. 普通实验1——RAID环境搭建 • 实验目标 • 基于CentOS平台用Mdadm软件实现RAID1和RAID5 • 使用Mdadm操作(create, manage, etc.) • 理解RAID原理 • 完成实验报告 • 参考文献 • http://en.wikipedia.org/wiki/Mdadm • http://toplab.sinaapp.com/2012/04/13/mdadm%E8%AF%A6%E7%BB%86%E4%BD%BF%E7%94%A8%E6%89%8B%E5%86%8C/ http://ncis.pku.edu.cn

  4. 普通实验1——Mdadm命令 • Create an array • mdadm--create /dev/md0 --level=mirror --raid-devices=2 /dev/sda1 /dev/sdb1 • Growing an array by adding devices • mdadm --add /dev/md1 /dev/sdd1 • mdadm --grow /dev/md1 --raid-devices=4 • Deleting an array • mdadm --stop /dev/md0 # to halt the array • mdadm --remove /dev/md0 # to remove the array • mdadm --zero-superblock /dev/sd[abc]1 # delete the superblock from all drives in the array http://ncis.pku.edu.cn

  5. 普通实验2——NFS环境搭建 • 实验目标 • 基于CentOS平台配置NFS Server和NFS Client • 使用benchmark评测NFS性能 • 完成实验报告 • 参考文献 • http://nfs.sourceforge.net/nfs-howto/ • http://www.server-world.info/en/note?os=CentOS_5&p=nfs • https://www.digitalocean.com/community/articles/how-to-set-up-an-nfs-mount-on-centos-6 • http://www.iozone.org/docs/NFSClientPerf_revised.pdf • http://sourceforge.net/projects/nfstestmatrix/ http://ncis.pku.edu.cn

  6. 普通实验2——NFS配置

  7. 普通实验3——KVM平台及VM安装 • 实验目标 • 基于CentOS安装KVM, libvirt • virt-install安装虚拟机(VM) • 安装spice连接VM桌面 • 完成实验报告 • 参考文献 • https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization/sect-Virtualization-Installing_the_virtualization_packages-Installing_KVM_packages_on_an_existing_Red_Hat_Enterprise_Linux_system.html http://ncis.pku.edu.cn

  8. 普通实验3——安装KVM和VM • Installing the KVM hypervisor with yum yum install kvm • Install the other recommended virtualization packages yum install virt-manager libvirtlibvirt-python python-virtinst • Creating guests with virt-install virt-install --accelerate --hvm --connect qemu:///system \ --network network:default \ --name rhel3support --ram=756\ --file=/var/lib/libvirt/images/rhel3support.img \ --file-size=6 --vnc --cdrom=/dev/sr0 http://ncis.pku.edu.cn

  9. 普通实验4——虚拟机基本操作与迁移 • 实验目标 • 使用virsh命令操作虚拟机,如start, destroy等 • 使用virsh或virt-manager等工具迁移虚拟机 • qemu-img创建Qcow2镜像,配置XML以启动VM • 完成实验报告 • 参考文献 • https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/chap-Virtualization_Administration_Guide-KVM_live_migration.html • http://virt-manager.org/ • https://access.redhat.com/site/documentation/zh-CN/Red_Hat_Enterprise_Linux/5/html/Virtualization/ch-virt-task-virsh.html http://ncis.pku.edu.cn

  10. Libvirt XML http://ncis.pku.edu.cn

  11. Virsh命令 http://ncis.pku.edu.cn

  12. 普通实验5——虚拟化性能评测 • 实验目标 • 在Win7虚拟机中安装应用软件以体验VM性能 • 在Linux虚拟机中运行benchmark评测性能 • 测试NFS存储环境下的VM性能 • 完成实验报告 • 参考文献 • http://www.spec.org/ http://ncis.pku.edu.cn

  13. 开放实验1——虚拟化集群监控系统设计 1. 为便于管理员管理pVEE,管理员需要实时监测pVEE的运行状态,并自动化监控、预警甚至修复pVEE系统故障: • Host实时的CPU使用率,内存使用率,网络状况,IO等设备状况 • Host运行的虚拟机(VM)的VCPU,内存,网络状态,VM操作系统类型,VM资源配置信息,设备信息 • Host基本镜像存储及File Server增量镜像存储的容量状况 • Host宕机或VM dump • Hypervisor运行状况异常(如VM启动失败) • VM桌面连接失效(如Spice客户端连接VM桌面失败) • VM镜像磁盘块读写错误 • pVEE管理工具运行错误 http://ncis.pku.edu.cn

  14. 开放实验1——虚拟化集群监控系统设计 2. pVEE作为教学实验环境,为改善其用户体验,我们需收集、分析用户利用VM参与上机活动时相关性能数据,根据监控反馈完善pVEE: • 学生在VM中使用课程应用的响应延迟(如使用VC编写程序) • 学生在VM中在线提交作业的网络延迟(如提交online judge代码) • 学生使用课程VM的学期中,个性化镜像增长状况与VM系统启动时间 • 学生课堂上机时段,个性化镜像存储服务器的压力状况 • 如果VM使用出现性能问题,能根据监测结果定位到关键原因 http://ncis.pku.edu.cn

  15. 开放实验2——Openstack, KVM中Ceph, Sheepdog镜像存储方式性能对比 • 研究目标(任选以下一种) • 对比openstack cinder不同存储方式的性能 • Ceph • Sheepdog • 对比KVM使用不同存储方案的性能 • Ceph • sheepdog • 参考文献 • http://docs.openstack.org/developer/cinder/ • http://ceph.com/docs/next/rbd/rbd-openstack/ • https://github.com/sheepdog/sheepdog • http://www.sebastien-han.fr/blog/2012/06/10/introducing-ceph-to-openstack/ http://ncis.pku.edu.cn

  16. 开放实验3——VM镜像文件优化研究 • 研究背景 • 增量镜像增长过快 目前增量镜像的存储格式为qcow2格式,在测试的应用当中,发现qcow2格式镜像的增长过快,初始化的增量大小很小,但是随着时间的增长,增量镜像的数量级可能达到10GB左右,甚至更大,这不仅会导致存储服务器端的存储容量过大,并且在实际应用中,密集的镜像下载上传过程,不仅会影响存储服务器的响应时间,并且加大网络传输延迟 • 相同课程增量镜像之间内容重合较多 由于课程要求均相同,所以用户使用虚拟机的行为类似,在增量镜像当中会有大量相同的用户数据,占用空间较大,增量镜像的个性化不明显。 http://ncis.pku.edu.cn

  17. 开放实验3——VM镜像文件优化研究 • 研究目标 • 优化增量镜像文件写入机制,在qcow2格式中加入标记模块,标记用户冗余数据。 • 分析相同课程的增量镜像之间的重复度,提取出增量镜像之间的公共部分,改变增量镜像地址索引模式,从基本镜像+增量镜像的启动模式变为基本镜像+公共部分+增量镜像的启动模式 http://ncis.pku.edu.cn

  18. 开放实验3——VM镜像文件优化研究 • Qcow2格式简介 TypedefstructQCowHeader{ • uint32_t magic; • uint32_t version; • uint64_t backing_file_offset; • uint32_t backing_file_size; • uint32_t cluster_bits; • uint64_t size; /*in bytes*/ • uint32_t crypt_method; • uint32_t l1_size; • uint64_t l1_table_offset; • uint64_t refcount_table_offset; • uint32_t refcount_table_clusters; • uint32_t nb_snapshots; • uint64_t snapshots_offset; }QCowHeader; Qcow2格式文件起始处有专门的区域存放元数据,支持一些高级特性,如加密,压缩和快照,以节省磁盘空间并保证数据安全 http://ncis.pku.edu.cn

  19. 开放实验3——VM镜像文件优化研究 Qcow2二级页表机制 Qcow2 文件存储数据的基本单元是cluster,每一个cluster 由若干个数据扇区组成,每个数据扇区的大小是512 字节。在qcow2 中,要定位镜像文件的cluster,需要经过两次地址查询操作,类似于主存二级页表转换机制 http://ncis.pku.edu.cn

  20. Q&A http://ncis.pku.edu.cn

More Related