图解性能优化读书笔记--虚拟机部分性能(二)

今天看到了虚拟化部分的性能优化,因为加班时先看了下知乎关于CPU架构的介绍,然后看书时间缩短了很多,比较概略的看了一下,要点:

1. 虚拟化的种类。bare-metal的和host方式的

以及介绍了下半虚拟化和全虚拟化,以及CPU的辅助虚拟化,这里面与我之前的理解不太一样 他认为的全虚拟化性能比较差一些,需要host os 协助进行命令转码,版虚拟化应该是ring -1 级执行的命令了。

2. over commited

在自己使用虚拟机的过程中经常CPU 超售,但是没有对内存进行超售,看到有内存压缩,相同内存的处理,但是感觉对虚拟机的性能都有不好的影响,所以在功能测试的时候,一般同时运行的虚拟机会超过服务器的逻辑处理器的个数,没有高并发的情况运行还ok

但是感觉如果内存分的比较狠出现较大的swap处理了感觉就是性能不行了。

3. 存储优化

这个貌似除了用缓存和投钱没有别的好办法,一分钱一分货,怕丢数据永远没有大缓存带来的高性能。

4. ESXi性能查看

开启ssh登录使用esxtop命令查看:

1)开启ssh的方法:

服务器-配置-安全配置文件-将SSH的服务属性打开以及将防火墙部分关闭

 

xshell 登录服务器 密码就是root用户的密码

执行esxtop 查看性能。。

跟linux的top命令非常接近

能够看到开机时间,以及逻辑CPU的个数,以及正在看起的虚拟机的概述

所有虚拟机综合的vcpu数目以及CPU的平均负载

 

2)vcenter或者是vsphere client直接连接服务器 查看性能页 或者是摘要页查看性能

摘要能够看到CPU的信息以及总计的CPU的核数,线程数

性能配置页 显示大体的服务器负载

 

 

 5. ssh连接服务器下其他的命令

    感觉最关键的就是esxcli命令

   前期有虚拟机处于关闭不了的状态时,就是使用这个命令,将虚拟机强制关闭了。

   

Usage: esxcli [options] {namespace}+ {cmd} [cmd options]

Options:
--formatter=FORMATTER
Override the formatter to use for a given command. Available formatter: xml, csv, keyvalue
--debug Enable debug or internal use options
--version Display version information for the script
-?, --help Display usage information for the script

Available Namespaces:
device Device manager commands
esxcli Commands that operate on the esxcli system itself allowing users to get additional information.
fcoe VMware FCOE commands.
graphics VMware graphics commands.
hardware VMKernel hardware properties and commands for configuring hardware.
iscsi VMware iSCSI commands.
network Operations that pertain to the maintenance of networking on an ESX host. This includes a wide variety of commands to manipulate virtual networking components (vswitch, portgroup, etc) as well as local host IP, DNS and general host networking
settings.
sched VMKernel system properties and commands for configuring scheduling related functionality.
software Manage the ESXi software image and packages
storage VMware storage commands.
system VMKernel system properties and commands for configuring properties of the kernel core system.
vm A small number of operations that allow a user to Control Virtual Machine operations.
vsan VMware VSAN commands.

 简单使用 

esxcli vm process list 显示列表

 

 使用命令关闭虚拟机

esxcli vm process kill --type= [soft,hard,force] --world-id= WorldNumber

kill                      Used to forcibly kill Virtual Machines that are stuck and not responding to normal stop operations.
list                     List the virtual machines on this system. This command currently will only list running VMs on the system.

很多命令可以使用:类似

 

posted @ 2017-12-13 22:56  济南小老虎  阅读(229)  评论(0编辑  收藏  举报