centOS虚拟机卡 vmos虚拟机卡_java

vm虚拟机 卡慢

I continue to meet folks who complain that their Virtual Machine performance is slow. Yes, it would be great if VMs somehow were able to self-tune the relationship between themselves and the host OS, but that's sadly not the case.

我继续遇到那些抱怨他们的虚拟机性能很慢的人。 是的,如果VM能够以某种方式自我调整其自身与主机OS之间的关系,那将是很好的,但事实并非如此。

When you're running an OS within and OS and maintaining a FileSystem within a FileSystem, not to mention sharing a hard drive spindle, there's lots of opportunities for things to go very slowly.

当您在一个OS中运行一个OS并在一个文件系统中维护一个文件系统时,更不用说共享硬盘驱动器主轴了,事情进展的机会非常多。

If you're experiencing poor VM performance, I would encourage you to go through a Performance Checklist.

如果您遇到较差的VM性能,建议您通过性能检查表。

Also, before you start, remember what you goals are. You'll not get your VMs running at 100% of native speed, at least not this year, so just stop aiming for that as a goal.

另外,在开始之前,请记住您的目标是什么。 您不会让VM至少以本机速度的100%运行,至少今年不是这样,所以就不要再为此目标了。

Here's some more realistic goals:

这是一些更现实的目标:

  • Ideally Virtual PC performance is at: 理想情况下,Virtual PC的性能为:
  • CPU: 96-97% of host CPU:主机的96-97%
  • Network: 70-90% of host 网络:主机的70-90%
  • Disk: 40-70% of host 磁盘:主机的40-70%

Try to make all of these changes if you can. If you can't do one or more of these recommendations, then you can't complain. ;)

如果可以,请尝试进行所有这些更改。 如果您不能执行这些建议中的一项或多项,那么您就不会抱怨。 ;)

(Virtual PC Performance Checklist)

  • Make sure your Host Operating System's disk is defragmented. 确保主机操作系统的磁盘已碎片整理。
  • This includes the System Disk (the disk your OS boots off of) as well as the Disk that holds your Virtual Hard Disk File.
  • For a quick fix, use a single-file defragmenter like Contig from SysInternals. With the Virtual Machine shut down, run Contig -a to analyze single file fragmentation and run without -a to defragment the file. 为了速战速决,使用像一个单个文件碎片整理重叠群从Sysinternals的。 关闭虚拟机后,运行Contig -a分析单个文件碎片,然后运行不使用-a进行文件碎片整理。
  • Run Fewer Applications. 运行更少的应用程序。
  • I'm continually amazed when folks complain about VM performance and when I get to their desk I see that they are running Outlook. That 200+megs could be better used by the system. Are you running a VM or checking your email? Consider checking your email on a schedule, or using Outlook Web Access while you work on your VM.
  • If you have 2 GIG or more of memory, consider running your Host Operating System without a Paging File. This doesn't mean you get to keep 50 applications, plus Outlook running all at once, but it does take the pressure off your Host OS's disk, and you might find things run considerably snappier. 如果您有2 GIG或更多的内存,请考虑在没有分页文件的情况下运行主机操作系统。 这并不意味着您要保留50个应用程序,还要同时运行Outlook,但这确实减轻了主机操作系统磁盘的压力,并且您可能会发现事情运行起来非常简单。
  • Run the Virtual Machine on a separate spindle. 在单独的主轴上运行虚拟机。
  • There's no better tip, as anyone who has run VMs (I've been using VMWare since it was in Beta) will tell you. The #1 bottleneck is disk. 没有更好的提示,因为任何运行VM的人(自从处于Beta版以来我就一直在使用VMWare)会告诉您。 #1瓶颈是磁盘。
  • Try to use a 7200RPM or 10000RPM drive for your VM disk
  • Use USB2 or SATA or Fireware.使用USB2或SATA或Fireware。
  • If you're using USB2, make sure the Eternal Hard Drive is on it's own USB root hub, all alone. Don't share it with your keyboard, mouse, or webcam.
  • Optimize your VM for your current task. 针对当前任务优化VM。
  • Personally, I use and highly recommend Invirtus Virtual Machine Optimizer for this. It's inexpensive if you value your time. Considering getting a site license and actually do the math at how much time it'll save your company when you're trying to convince your boss. I run it over lunch on a VM and move on. You can also do a lot of the work manually if you have the time using tools like XPLite and CrapCleaner (although less so with CrapCleaner if the box is already fresh). 就个人而言,我为此使用并强烈推荐Invirtus Virtual Machine Optimizer 。 如果您珍惜时间,那就便宜了。 考虑获得站点许可证,并在试图说服老板时实际上花了多少时间才能节省公司费用。 我在虚拟机上午餐时运行它,然后继续前进。 如果您有时间使用XPLite和CrapCleaner之类的工具,您也可以手动完成很多工作(如果盒子已经很新鲜,则使用CrapCleaner则少一些)。
  • Remove any application that's not needed.
  • Shut down every service you can possibly get away with.
  • Enable Hardware Assisted Virtualization 启用硬件辅助虚拟化
  • If you've got this on your computer, turn it on. There IS some concern about really sophisticated Trojans that can use this technology for evil, but for me, it's all good as it speeds most Guest Operating Systems (especially non-Microsoft ones) up quite a bit.
  • Give your Virtual Machines LESS MEMORY 给您的虚拟机更少的内存
  • I've found that 512 megs is just about the Ideal Amount of memory for 90% of your Virtual Machines. Don't bother trying to give them 1024 megs, it's just not worth the pressure it'll put on the Host Operating System.
  • Considering making a custom Windows install for your VMs. 考虑为您的VM进行自定义Windows安装。
  • Rather than going to all the effort to REMOVE things, why not create a Windows installation that can be shared across your organization that doesn't include the crap ahead of time. There's a Windows Installation Customizer called nLite that lets you prepare Windows installations so they never include the stuff you don't want. Makes it easier if Solitaire is never installed, eh? 而不是花所有精力去删除所有东西,为什么不创建一个Windows安装,该安装可以在您的组织之间共享,并且不提前包含废话。 有一个称为nLite的Windows安装自定义程序,可让您准备Windows安装,因此它们永远不会包含您不需要的内容。 如果从不安装纸牌,会更容易吗?
  • Make sure the Guest Operating System is defragmented. 确保客户机操作系统已进行碎片整理。
  • Jeff likes this free Disk Defragmenter that runs in that "Text Mode" place before Windows really starts up. This allows it to get at files that don't always get defragmented. Jeff喜欢这个免费的磁盘碎片整理程序,它可以在Windows真正启动之前在“文本模式”位置运行。 这使它可以获取不总是进行碎片整理的文件。
  • Squish your VM Hard Drive. 压缩您的VM硬盘驱动器。
  • Again, I use Invirtus so it does this for me, but you can also zero out the free space on your VM hard drive with the Virtual PC Pre-Compactor that comes with Virtual PC when hosting Windows, and there are Linux options for shrinking VM hard drives as well. 再说一次,我使用Invirtus来做到这一点,但是当托管Windows时,您也可以使用Virtual PC附带的Virtual PC Pre-Compactor将VM硬盘驱动器上的可用空间清零,并且有Linux选项可以缩小VM硬盘驱动器。
  • Don't use NTFS Compression on the Virtual Machine Hard Drive File in the Host Operating System 不要在主机操作系统中的虚拟机硬盘文件上使用NTFS压缩
  • NTFS Compression doesn't work on files larger than 4 gigs, and can cause corruption.NTFS压缩不适用于大于4个演出的文件,并且可能导致损坏。
  • Don't Remote Desktop or VNC into Host Operating Systems that are hosting Virtual Machines. 不要将桌面或VNC远程到托管虚拟机的主机操作系统中。
  • If you're remoting into a machine where THAT machine is running a VM, note that to the Remote Desktop protocol (and VNC) the VM just looks like a big square bitmap that is constantly changing. That guarantees you slow performance. If you can, instead, Remote Desktop into the Virtual Machine itself.
  • Make sure you've install the Virtual Machine Additions (or Tools, or Utilities, or Whatever) 确保已安装虚拟机附加(或工具,实用程序或其他)
  • Virtual PC and VMWare and Parallels all include drivers and tools that improve the performance of your Virtual Machine. They are there for good reason, make sure you've installed them.
  • Also, if you're running a Virtual Machine created under and older version, like Virtual PC 2004, and you're now running under a newer one, like 2007, pay attention to the upgrade warnings and install the latest drivers and Virtual Machine Additions.
  • Optimize Painting and the "Perception of Responsiveness" 优化绘画和“响应感”
  • If you're running a VM, you don't need to have eye candy like menu fades, smooth scrolling or shadows.
  • Turn off wallpaper
  • Turn off Window Dragging and Shadows under Menus (under Effects in the Display Control Panel). Consider removing all effects like fading as well as ClearType.
  • Consider running the Classic Theme if you're running an XP VM, or consider "net stop themes" altogether.
  • Turn off the Mouse Pointer Shadow in the Mouse Control Panel.
  • Turn off Mouse
  • Use TweakXP or change the Registry to remove the Menu Delay for the Start Menu and other Menus via the MenuShowDelay setting in HKEY_CURRENT_USER\Control Panel\Desktop.使用TweakXP或更改注册表,以通过HKEY_CURRENT_USER \ Control Panel \ Desktop中的MenuShowDelay设置删除开始菜单和其他菜单的菜单延迟。

Did I miss any tips?

我错过了任何提示吗?

翻译自: https://www.hanselman.com/blog/vm-performance-checklist-before-you-complain-that-your-virtual-machine-is-slow

vm虚拟机 卡慢