Wednesday, 18 April 2018

Virtual Machine Causing System Hang Issue - 100% Disk Usage

Virtual Machine Causing System Hang Issue - 100% Disk Usage

I have used VMware Workstation and Oracle Virtual Box for creating and managing Virtual Machines, and for me, these are the best Virtual Machine Solutions available on the internet for everyone's use. For now, I am using only Oracle Virtual Box as it is free and personally I like it more.
   
Now what I am going to discuss here is a very well known issue (you are reading this that simply means that either you are currently facing the issue or you are familiar with the problem which Virtual Machines often creates). Yes, I am taking about System Hang problem which is majorly caused by Virtual Machines and the main reason behind the same is full Hard Disk Resource Usage. When you run the Virtual Machine, Open your Resource Monitor and in the Disk Usage part, you will see that the Disk is getting 100% used.

If you are not sure how to find that Disk Usage is getting 100% used, please follow the steps below:
  • Press Ctrl+Shift+Esc. It will open Task Manager window.
  • Click on Performance tab and you'll see Resource Monitor Button at the bottom. Click on it.
  • It will provide you run-time stats for CPU, DISK, NETWORK and MEMORY with detailed information.
  • In the DISK section, there will be two main highlights with Green Button which represents Disk I/O and Blue Button which represents Highest Active Time. If the Highest Active Time is 100%, it simply means your disk usage is 100% for the moment and till the time it is 100%, you will face performance issues as you won't be able to perform operations smoothly because your Hard Disk resource is fully occupied.
Anyway, I haven't found a permanent solution for the problem because normally if you see, it is not the fault of Virtual Machine. You are running 2 or more OS on a single system which is doubling or tripling up the number of processes for the same machine. What do you expect? It's a simple understanding, the more powerful resources you'll provide to the system, the more better it will perform. It's a machine and it's power is its components and the smartness of the one operating it.

As per my expertise, I can give you some tips on how to minimize this hanging situation. 

Allocate the Hard Disk with Fixed Size option:

While creating Virtual Machines, you allocate Hard Disk or in simple terms some physical space where your Virtual Machine will be installed. At that time, you have two options, either use the Dynamic Hard Disk Allocation Feature or use the Fixed Size Hard Disk Allocation. Most of the people choose Dynamic Hard Disk Allocation, as it helps in fast HD addition in VM as well as saves physical space in Hard Disk in the Host System. Opposite to this, a fixed size allocation provides the complete HD (as mentioned by you) at once which takes some time in VM HD creation depending upon the size of HD you are allocating to VM. Also you loose the same amount of physical space from your Host HD Drive at once.
What I will suggest is you should go for Fixed Size Allocation rather than Dynamic Allocation because it is wiser to provide the full HD resource at once rather than asking for it again and again.

Also Fixed Size Allocation helps you to avoid Read Only issue with VM which is mostly seen in Dynamic HD Allocation cases.

Allow Virtual Disk to use Host I/O Cache:

As shown in the image below, there's an option in the VM Settings to allow the Virtual Disk to use Host's I/O Cache. Enabling this can dramatically improve the performance. By default, the option is unchecked.



Leave the system free if the Hard Disk Usage is going on Maximum:

Once your Hard Disk resource is getting 100% used, it would be a wiser decision to leave the system as it is for quite some time rather than continue doing operations on the system. The less the pressure you'll put on the system at that moment, the more will be the probability of that system to overcome the Hanging situation.

No comments:

Post a comment