为什么 Android 上跑虚拟机这个主意不是特别理想

来源:互联网 发布:linux 内存泄漏工具 编辑:程序博客网 时间:2024/04/29 11:04
2011-12-24 14:53

今天在上网,搜索了一下 Android 上跑虚拟机是否有什么选择。查了有关 adosbox、bochs 和 qemu 的贴子,看到有下面这样一段网友评论:

The closest thing i've seen is "aDOSbox" which runs MS-DOS programs (and i've run Windows 3.11 on it) - the experience, for the most part, is painful (at best).

Even if someone were to port something like VMWare or VirtualBox over to Android, it would likely be too slow to be of much use, at least running a modern OS. And since ARM chipsets would require binary translation, the overhead would be much too high. In the end, lack of system RAM and processing power would likely be a showstopper.

I know that in my experience, an XP VM on an Intel Atom netbook borders on unuseable. I can't imagine it being any better on a modern mobile chipset.

这段评论是讲,速度很慢(最好的情况下还是很痛苦)。然后说起在英特尔 Atom CPU 上跑虚拟机的感受也是类似。我想起我曾经用过一台使用 Atom 450 CPU 的上网本,它跑 Win 7 时,资源管理器如果有开启的文件夹窗口,就会占用掉 30% 左右的 CPU。其实从它的主频来看不算太慢,1.66GHz。我又联想起我以前用过的另一台 DELL 电脑,主频 2.53GHz,但是跑虚拟机,即使是 Virtual PC 这样的轻量级虚拟机也比较慢。相比之下,另一台 Core 2 Duo 2.04GHz 的 CPU,跑虚拟机就很畅快。仔细想想,其最大区别可以说是在 CPU 缓存的容量上面。Core 2 Duo 有 2MB 的二级缓存,而 Celeron D 只有 256KB。

类似的,想来 Android 跑在 ARM 架构的 CPU 上,可能也是因为手机硬件成本限制,CPU 的缓存不够大的缘故,才使得虚拟机的速度如此之慢。从主频来看,中端智能手机的 ARM 芯片都达到 1GHz,已经是当年早期奔 4 的水平了。内存也有 512MB,是奔 3 时期的主流配置。因此虚拟机慢的话,想来主要问题还是出在 CPU 的缓存上。


原创粉丝点击