I want to leave a Linux guest running all the time on my laptop, so I want it to use as little power as possible. I'd prefer it to be doing nothing[/b] when idle.
I've compiled a Linux kernel with the new "tickless" option, so it no longer has a timer that fires at 1000 Hz (the default under CentOS 5). This was a huge improvement - of course 1000 fewer wakeups per second; also before Activity Monitor said the virtual machine was using 20-25% CPU when idle. After, it wakes up 20-30 times per second (measured through the powertop utility within the guest) and uses 4-5% (measured through Activity Monitor). Much better.
I'd like to do better still, but the VMware Tools are holding me back. Without them running, there are only 5-10 wakeups per second and 2-3% CPU usage. The biggest offender seems to be vmware-guestd, which wakes up exactly 10 times per second. vmmemctl wakes up exactly once per second. (Note those numbers don't add up; I think they're also causing more wakeups within the kernel.) My processor could go into deeper sleep states if vmware-guestd didn't wake up so often.
Are there any VMware people on this forum? Is it possible to get VMware Tools to wait for events rather than polling for them? Or at least poll less frequently? At first glance, vmware-guestd doesn't seem to be doing much:
$ sudo strace -p `pidof vmware-guestd`
...
select(0, \[], [], NULL, \{0, 100000}) = 0 (Timeout)
times(\{tms_utime=4, tms_stime=20, tms_cutime=2, tms_cstime=31}) = 34214
times(\{tms_utime=4, tms_stime=20, tms_cutime=2, tms_cstime=31}) = 34214
waitpid(-1, NULL, WNOHANG) = -1 ECHILD (No child processes)
select(0, \[], [], NULL, \{0, 0}) = 0 (Timeout)
times(\{tms_utime=4, tms_stime=20, tms_cutime=2, tms_cstime=31}) = 34214
waitpid(-1, NULL, WNOHANG) = -1 ECHILD (No child processes)
select(0, \[], [], NULL, \{0, 100000}) = 0 (Timeout)
...
If it were open source, I'd be able to take a closer look. Any particular reason it's not?
I'm not sure what's exactly in it, but you do have some source to the linux tools (check the tar.gz version) since you have to be able to build them for custom kernels.
>If it were open source, I'd be able to take a closer look. Any particular reason it's not?
Umm... perhaps because VMware wants to sell software and actually make money (i.e. Stay in business)?
I saw that, but it's pretty limited. There's just enough to recompile the modules for a new kernel and nothing more. Not even the entirety of the kernel modules is open-source - they ship several object files to be linked together with tiny .c files like this:
/*
os.c --
*
Wrappers for Linux system functions required by "vmmemctl".
This allows customers to build their own vmmemctl driver for
custom versioned kernels without the need for source code.
*/
>If it were open source, I'd be able to take a closer
look. Any particular reason it's not?
Umm... perhaps because VMware wants to sell software
and actually make money (i.e. Stay in business)?
Is there some reason opening VMware Tools would impede them from doing so? I'm not asking them to open the bulk of their product.
Hmm, sorry for not being able to help.
I can't answer your "why aren't the tools open sourced" question because I don't know, but my guess would be that there are legal/strategic reasons for not doing so. I'm pretty sure the request for open-source tools has come up before, though - you might want to give this feedback over in the Product and Feature Suggestions[/url] forum.
Well, thanks etung. I took your advice and opened a thread there. In the meantime, I made a binary patch to vmware-guestd which makes it wake up once per second instead of 10 times per second.
http://www.slamb.org/tmp/vmware-guestd-slower.xdelta
It was a pain to make, but least VMware's CPU impact is less now.
nice work srlamb. Do you have a newer patch for the VMware tools that came with Fusion 1.0? I'd like to try it out.
You don't know that do you. Opening up the Tools could show more of the magic VMWare runs on then they want to.
Of course the best reason not to just open them up is that they just don't want to.
Woohoo! Thank you! That's wonderful!