摘要: RSS is how much memory this process currently has in main memory (RAM). VSZ is how much virtual memory the process has in total. This includes all types of memory, both in RAM and swapped out. These numbers can get skewed because they also include shared libraries and other types of memory. You can 阅读全文
posted @ 2013-02-28 20:14 zaleilynn 阅读(309) 评论(0) 推荐(0) 编辑
摘要: #include <libvirt/libvirt.h>#include <libvirt/virterror.h>#include "include/proxy.h"#include "include/rpc.h"int main(int argc, char ** argv) { virConnectPtr conn = virConnectOpen("qemu:///system"); if(conn == NULL) { printf("error connecting qemu driver 阅读全文
posted @ 2013-02-28 20:04 zaleilynn 阅读(441) 评论(0) 推荐(0) 编辑
摘要: memory: 客户机最大使用的物理机内存上限。物理机器在boot使用的最大内存。currentMemory: 如果设置的话,一旦机器被boot起来之后,相应模块被加载了,客户机就会调整它的内存到这个值。若客户机为linux,即使有一个balloon驱动,也不会像期望的那样运行,当memory被设置高于currentMemory,客户机就不会“看到”,也不会使用它应该有的内存。理想情况下,客户机报告的Used Memory应该被客户机可见和使用。实验证明,当memory设置的比currentMemory大的时候,free -m 报告的可见内存要小于currentMemory链接http://b 阅读全文
posted @ 2013-02-28 19:34 zaleilynn 阅读(1124) 评论(0) 推荐(0) 编辑
摘要: 我们为什么需要资源控制?在实际的生产环境中,希望每台虚拟机对资源的消耗是可控的,避免过度的消耗资源,造成对其他虚拟机的影响。测试环境:Centos 6.3 update到 2012年11月 25日。操作步骤1.升级系统到最新yum update -y2.安装epel源rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-7.noarch.rpm3.安装cgroup包yum install libcgroup libgroup-devel -y启动服务/etc/init.d/cgconfig start停止服务/ 阅读全文
posted @ 2013-02-28 16:51 zaleilynn 阅读(1035) 评论(0) 推荐(0) 编辑
摘要: 1. for guest xml desc:<memballoon model='virtio'/>一定要设置<currentMemory>,这个bollon没有起作用2. 在windows guest里面安装ballooning驱动: a) 下载并安装devcon,http://support.microsoft.com/kb/311272 b) devcon install BALLOON.inf "PCI\VEN_1AF4&DEV_1002&SUBSYS_00051AF4&REV_00"3. 重启gues 阅读全文
posted @ 2013-02-28 16:30 zaleilynn 阅读(834) 评论(0) 推荐(0) 编辑
摘要: 下载http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-0.1-52.isohttp://www.linuxwind.org/download/virtio-win-0.1-52.tar.gz (软盘vfd文件)支持以下系统(支持win 8):tar -tvf virtio-win-0.1-52.tar.gz-rw-r--r-- root/root 1474560 2013-02-16 09:41 virtio-WIN2003-amd64.vfd-rw-r--r-- root/root 147 阅读全文
posted @ 2013-02-28 15:55 zaleilynn 阅读(1228) 评论(0) 推荐(0) 编辑
摘要: 网桥:<interface type = 'bridge'> <source bridge = 'br0'/> </interface>默认的nat:(virbr0)<interface type = 'network'> <source network = 'default'/> </interface> 阅读全文
posted @ 2013-02-28 14:39 zaleilynn 阅读(372) 评论(0) 推荐(0) 编辑
摘要: (一)计算资源与内存资源的监控libvirt中提供virDomainGetInfo方法可以将一个domain的计算资源和内存资源的使用情况封装在一个结构体中,如下:C代码structvirDomainInfo{unsignedcharstate://therunningstate,oneofvirDomainStateunsignedlongmaxMem://themaximummemoryinKBytesallowedunsignedlongmemory://thememoryinKBytesusedbythedomainunsignedshortnrVirtCpu://thenumbero 阅读全文
posted @ 2013-02-28 09:42 zaleilynn 阅读(5718) 评论(0) 推荐(0) 编辑