CPU usage 15% on virutal machines.

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
rgesswein
Posts: 2
Joined: 20 Sep 2007 18:52

CPU usage 15% on virutal machines.

Post by rgesswein »

I've noticed that my CPU utilization jumps to 15-20% and stays there when I have XYplorer running in a virtual machine. I've noticed this with both Virtual PC 2007 and Virtual Box latest version.

Within the virtual machine XYplorer doesn't show up with the usage, it's on the host machine where this is showing up (as virtual machine activity), but only when XYplorer is running. Also, Windows explorer does not show this behavior, so it's something unique to XYplorer that Windows explorer is not doing.

Any idea what might be causing this? Can anyone else confirm this?

John Bee
Posts: 323
Joined: 01 May 2005 20:21
Location: Win10, Win11 @100%

Re: CPU usage 15% on virutal machines.

Post by John Bee »

rgesswein wrote:I've noticed that my CPU utilization jumps to 15-20% and stays there when I have XYplorer running in a virtual machine.
Yes, for me too. Both in Linux and Win and VirtualBox. Now at version 1.5

admin
Site Admin
Posts: 65245
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: CPU usage 15% on virutal machines.

Post by admin »

rgesswein wrote:Any idea what might be causing this? Can anyone else confirm this?
Not really. Try turning off Auto-Refresh (but I don't really think it can cause that much usage).

rgesswein
Posts: 2
Joined: 20 Sep 2007 18:52

Post by rgesswein »

No good. I tried turning off most every option and there was no change to CPU utilization.

tgrand
Posts: 17
Joined: 03 Oct 2008 20:23

Re: CPU usage 15% on virutal machines.

Post by tgrand »

I have the same problem. After some investigation, I believe I've found the cause. It's described in this ticket:
http://www.virtualbox.org/ticket/3613

Windows programs that request high-resolution timing cause the number of RTC interrupts to increase to around 1000Hz. This incurs additional host CPU usage when it's happening in a VM. The interrupt rate change is clearly visible in the VirtualBox log file. When I start XYplorer, I see the following:

Code: Select all

00:01:00.473 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
When I close XYplorer, I see the following:

Code: Select all

00:01:30.504 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
PIT is the programmable interval timer, the system timer that generates timing interrupts. I theorized that while any apps that have called beginTimePeriod(1) are running, the virtual PIT is set to ~1000Hz. When those apps are closed, it's restored to a lower rate (~100Hz in my current VM state). I tested my theory by creating a Win32 console app that only calls beginTimePeriod(1) once and then calls Sleep() to sleep indefinitely. The behavior was exactly the same as with XYplorer: increased interrupt frequency and CPU usage on the host.

Is XYplorer calling beginTimePeriod(1)? If so, could you please stop doing that or give the user an option to stop doing that? I'm not sure if the problem will ever be solved on the VirtualBox side, but it might be very easy to solve on the XYplorer side. I would appreciate a solution as I currently need to keep opening and closing XYplorer in my VM to avoid excessive CPU usage on the host (which is especially bad on OS X).

admin
Site Admin
Posts: 65245
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: CPU usage 15% on virutal machines.

Post by admin »

Wow, very interesting!
tgrand wrote:Is XYplorer calling beginTimePeriod(1)? If so, could you please stop doing that or give the user an option to stop doing that? I'm not sure if the problem will ever be solved on the VirtualBox side, but it might be very easy to solve on the XYplorer side. I would appreciate a solution as I currently need to keep opening and closing XYplorer in my VM to avoid excessive CPU usage on the host (which is especially bad on OS X).
Indeed, I'm calling it! I will stop it and see what happens.

John Bee
Posts: 323
Joined: 01 May 2005 20:21
Location: Win10, Win11 @100%

Re: CPU usage 15% on virutal machines.

Post by John Bee »

admin wrote:Indeed, I'm calling it! I will stop it and see what happens.
! Might have fixed an issue where CPU utilization jumps to 15-20%
and stays there when XYplorer is running in a virtual machine.

That did the trick, Don. Thank you very much. I can now use XY again in VBox.

8) :D :mrgreen:

admin
Site Admin
Posts: 65245
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: CPU usage 15% on virutal machines.

Post by admin »

John Bee wrote:
admin wrote:Indeed, I'm calling it! I will stop it and see what happens.
! Might have fixed an issue where CPU utilization jumps to 15-20%
and stays there when XYplorer is running in a virtual machine.

That did the trick, Don. Thank you very much. I can now use XY again in VBox.

8) :D :mrgreen:
Great!! :D But thanks should go to tgrand!

John Bee
Posts: 323
Joined: 01 May 2005 20:21
Location: Win10, Win11 @100%

Re: CPU usage 15% on virutal machines.

Post by John Bee »

admin wrote:Great!! :D But thanks should go to tgrand!
Oh yes, tgrand, thank you. If it wasn't for you figuring this out, I still wouldn't be using XY

As I am no longer a windows user, the only place where XY resides is in a VM. And even in a
VM, it still does things that I cannot do in a linux filemanager. (I let XY see my linux file systems via
a share in VBox, so I can manipulate/massage linux files/folders with XY from inside the VM. :D )

Again, thanks to you both! 8)

tgrand
Posts: 17
Joined: 03 Oct 2008 20:23

Re: CPU usage 15% on virutal machines.

Post by tgrand »

Glad I could help!

Thanks for getting this fix out so quick. I just tried the latest beta version and the problem is definitely solved. Excellent!

Post Reply