VirtualBox - Heat

From FreeDOS
Jump to: navigation, search

Chapter 1: Prepare a virtual machine for FreeDOS in VirtualBox

Chapter 2: Special settings for FreeDOS

Chapter 3: Connect the FreeDOS install CD

Chapter 4: Install FreeDOS

Chapter 5: Install the network

Chapter 6: Mount the FreeDOS image to transfer files

Chapter 7: FTP between host and guest


Bugs: High CPU usage of FreeDOS machine

Bugs: FreeDOS crashes at boot

Bugs: ICH9 chipset breaks networking

Bugs: Old bugs



Description

If you run certain DOS programs in a virtual machine, you get high CPU usage and loud fan noise. Your machine will get hot.

This problem affects all DOS installations (FreeDOS, MS-DOS) in all versions of VirtualBox under all host operating systems.

Warning!

Running the CPU at 100 percent for too long can damage your computer.
  • Please monitor CPU usage while using FreeDOS as guest in VirtualBox.
  • Use the precautions in this document.
  • Identify problematic programs and avoid them.

One of the problematic programs in FreeDOS 1.2 is Edit. Do not use it.


Examples

The following screenshots show a VirtualBox FreeDOS guest running Edit with a new textfile opened. Task Manager, System Monitor and Activity monitor show that one processor of the host machine is completely occupied by the VirtualBox guest.

High CPU usage in Windows

VirtualBox-Heat-Windows.png


High CPU usage in Ubuntu

VirtualBox-Heat-Ubuntu.png


High CPU usage on a Mac

VirtualBox-Heat-Mac.png


High CPU usage with MS-DOS 6.22

MSDOS in Virtual Box



The problem

As I have learned, the problem has something to do with the HLT instruction and the IDLE mode of the CPU. As far as I understand it, DOS programs seem to forget to signal the CPU that they don't need it any more.

VirtualBox on the other hand gives these programs unlimited access to the CPU and reserves it for them.



Precautions:

Limit the CPU usage of VirtualBox

First of all limit the processor usage for your DOS/FreeDOS guest.

  • To do this, click on System in the right side


VirtualBox-Settings1.png


  • Then choose the "Processor" tab and reduce the Execution Cap from 100 percent to 40 percent.


VirtualBox-Settings2.png

I can recommend a setting of 40%. I can not feel any difference in the look and feel of the DOS guest. The computer will not get as hot as before and the fan won't run as much as with a CPU usage of 100%.



Use FreeDOS Power Management

Using power management solves the problem as long as you use the shell / work at the DOS prompt.

By default, power management in FreeDOS should be active. Check your AUTOEXEC.BAT: There should be a line:

LH FDAPM APMDOS

Unfortunately the CPU usage may go up again if you start other programs.

MS-DOS Power Management

If you use MS-DOS and are experiencing the same problem: Edit your CONFIG.SYS to have a line:

C:\DOS\POWER.EXE



Use better DOS software

Some programs can be configured to avoid the program. In DOSZIP, the default file manager of FreeDOS 1.2, open the Setup menu, choose System Options and check the "Use DOS Idle Int 2Fh" checkbox.

DOSZIP settings

These programs were recommended and seem to work without a problem:



Use a DOS TSR that controls CPU usage

Some people had success with programs that limit the CPU usage.

I must admit, that these programs didn't work for me.



Conclusion

Take care to protect your host by limiting the processor usage for the guest. Enable Power management. Use programs that do not come with the problem.


Ulihansen 19:24, 26 January 2017 (UTC)