VMware Workstation

 View Only
Expand all | Collapse all

Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

  • 1.  Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Nov 19, 2023 03:12 AM

    I am using VMware Workstation 17.5.0 on Ubuntu 20.04 host and I noticed that whenever there is at least one Linux VM running, a vmware-clk processes is started and it keeps using around 17% CPU.
    When only Windows VMs are running, this doesn't happen. I can see such process occasionally but it quits quickly without causing any excessive CPU usage.
    It doesn't matter how many Linux VMs are running, there is only 1 process and the CPU usage doesn't really change.
    When I shut down all Linux VMs, the process quits.
    When I power on a Linux VM to firmware, there is no such issue until I exit the firmware and the OS boots.

    I managed to reproduce this issues in Ubuntu VM using nested virtualization, so it doesn't seem to be an issue with my host OS.
    Interestingly, when I search for vmware-clk in Google, I get only 1 result which is a shell script in GitHub. Also nothing in this forum.

    I am not sure if this issue is new for VMware Workstation 17.5 since I upgraded from 16.2.5 and I never tried 17.0.x.

    My host's CPU is Ryzen 5 1600x.



  • 2.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Nov 23, 2023 06:20 AM

    This also happens on EYPC 7601 with VMware 17.0.2 and 17.5, Linux kernel 6.5.0 host. Guests are running open-vm-tools. Time sync is enabled in most of the VMs. The vmware-clk cpu usage does not increase with more VMs running. Slightly different behavior than above, vmware-clk uses ~30% core constantly and never goes away.



  • 3.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Nov 24, 2023 01:27 AM

    It's interesting if this only happens on hosts with AMD CPUs.
    In my case vmware-clk's CPU usage is 17% of one thread, but the lower % may be due to the higher base clock (3.6 GHz vs. 2.2 GHz of EPYC 7601).
    The CPU usage doesn't increase when 2 or more Linux VMs are running.
    I don't have time sync enabled for any of the VMs and I also tried to completely disable it by adding a bunch of settings in the .vmx file, but this didn't help.
    I see the same issue even when running RouterOS.
    I guess that the issue doesn't happen when only Windows VMs are running because Windows uses tick counting for timekeeping while recent Linux kernels use tickless timekeeping.

    It will be good if someone who runs Workstation 7.5.0 on Linux with Intel CPU reports whether such issue exists on such host.



  • 4.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Dec 06, 2023 02:54 PM

    I have the same thing. vmware-clk taking 10 % CPU while the guest and host are idle.

    In the settings it says: "Time sync off"

    This is with: AMD Ryzen 9 5900X



  • 5.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Dec 14, 2023 12:34 PM

    What is going on here? Is somebody from vmware monitoring this forum or is it just a useless excercise to engage here?



  • 6.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Jan 11, 2024 08:34 AM


    I had to manually patch the vmmon module to work-around/resolve this issue.

    Here is what I did (on Ubuntu 22.04):


    mkdir /tmp/work
    cd /tmp/work
    tar xf /usr/lib/vmware/modules/source/vmmon.tar
    cd vmmon-only/

    # Edit the code - patch
    vi linux/hostif.c

    #
    # Change the following in function HostIF_SetFastClockRate(), line number 3353
    #
    # from:
    # if (rate > MIN_RATE) {
    # to:
    # if (false) {
    #
    # Save the file and exit ( :wq )
    #

    # Build the module
    make

    # If the above is successfult then the vmmon.ko module would be placed in current directory

    ls -l ./vmmon.ko

    #
    # Unload the module
    # Make sure there are no VMs running
    #
    sudo rmmod vmmon

    # Save a copy of the original module, in case we need to revert back
    sudo mv /usr/lib/modules/$(uname -r)/misc/vmmon.ko /usr/lib/modules/$(uname -r)/misc/orig.vmmon.ko

    # Copy our newly built module
    sudo cp ./vmmon.ko /usr/lib/modules/$(uname -r)/misc/vmmon.ko

    # Load the newly built module
    sudo modprobe vmmon

    # Verify that the module has been loaded
    sudo lsmod | grep vmmon

    #
    # Now save the patched sources
    # so that if the ubuntu kernel is updated in future and
    # VMware player/workstation needs to rebuild the modules,
    # ensure that your changes are preserved
    #
    cd ..
    tar cvf vmmon.tar vmmon-only/
    sudo mv /usr/lib/vmware/modules/source/vmmon.tar /usr/lib/vmware/modules/source/orig.vmmon.tar
    sudo mv ./vmmon.tar /usr/lib/vmware/modules/source/vmmon.tar

     



  • 7.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Jan 14, 2024 04:15 PM

    That did not work for me. The module builds and loads fine. But when I start a VM the computer basically freezes.



  • 8.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Feb 28, 2024 02:10 AM

    This issue is not resolved in Workstation Pro 17.5.1.

    Looks like VMware has problems with QA.

    Also no one from VMware pays attention to this forum.



  • 9.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Apr 14, 2024 08:04 PM

    Yes, this issue is still present on 17.5.1.  I followed sahat's suggestion and it worked on three different hosts.  Thank you sahat!



  • 10.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Apr 15, 2024 09:45 AM

    I gave  's fix another try. And, indeed, it works for me now too. I must have done something wrong when I tried it the first time. Now its working fine. I can not see any vmware-clk process anymore. Thank you!

     



  • 11.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted Jun 07, 2024 10:45 AM

    The problem persists in Workstation Pro 17.5.2.

    I have tried the workaround and the CPU usage drops, but I am not sure what exactly this patch is doing.

    The skipped code exists in VMware 6.2.x as well, but there is no such problem there.

    Given that this is a Ryzen only issue and probably VMware only tests on Intel CPUs, this may not be fixed in the foreseeable future.




  • 12.  RE: Workstation 17.5.0: vmware-clk spinning on CPU when Linux VMs are running

    Posted 10 days ago

    The problem persists in Workstation Pro 17.6.0.

    Ryzen CPUs are becoming more popular, especially after the recent stability issues of the Intel Gen 13-14 CPUs.

    So I think that VMware (Broadcom) should start testing their products on the AMD platform too.

    Note that I only have Ryzen Gen 1 CPU so I can't be sure the issue happens with the latest Ryzen CPUs.