I have one physical machine which has 4 CPUs. I want to have some VM on it. The goal of my work is finding CPU utilization. But I am confused how the CPU usage of VMs and physical machine are related. Is there a relation between CPU utilization of VMs and physical machine? How should I measure the CPU utilization of each VM? What is the CPU utilization of the physical machine?
If you are using any xen enabled hypervisor, you can use xenmon or xentop in your Dom0(physical machine) to check the utilization or performance of your VMs.
You can do so by typing xentop(it is /usr/sbin/xentop in my case) on the command line which will give you all the info you are looking for. Alternatively you can use xenmon -l command (/usr/sbin/xenmon.py python script) in my case which shows all the live information about your VMs.
Related
I used the stress command to stress the CPU of the Linux server(CentOS). Following is the command used.
sudo stress --cpu 4 --timeout 3600
Also I want to do the stress test for the Server memory using such a bash command. The answer here is not supported with bash commands. I am aware of the tools that can be used to stress the memory as stated here. But I want to write a bash script to do stressing.
Does memory stressing affect for virtual memory or only physical memory?
Virtual memory is when some disk space is allocated for this to be more RAM, but would be slower as you are using the hard drive. I would not stress test the virtual memory, if you cannot stop a stress test using the virtual memory, then i would disable virtual memory temporarily, and then after your stress test on the RAM, you can enable the virtual memory again.
I'm testing the speed of different sorting methods for a CS class, and although our professor said we didn't need to be terribly precise, he still wants us to be careful not to run apps in the background while testing, use a different machine, or do anything to throw the speed of the sorts off.
If I ran the tests in a VM, would the environment outside of the VM affect the speed? Would that help make the tests accurate without having to worry about changes in the apps I have open alongside the VM?
In short, yes.
In most scenarios, hosts share their resources with the VM. If you bog down/freeze/crash the host then the VM will be affected.
For those that have more robust servers with better resources, processes running in the host won't affect the VM as much. Because if you have more resources on the host you can assign better RAM and Virtual Processors to the VM so it runs smoothly.
For instance, let's say our host has 64GB of RAM a processor that has 4 cores and 8 threads (such as an Intel® Xeon® E3-1240 Processor).
We can tell VirtualBox, VMware or Hyper-V to assign 32GB of RAM and 4 virtual processors to the VM, essentially cutting the host's power by half.
With this in mind, any processes you run on the host will usually be separate from the VM but if the processes freeze, crash or cause a hard reboot on the host then the VM will be affected regardless of RAM or virtual processors assigned.
In enterprises environments, a hyper-v server should only be used for that purpose and installing/running a lot of processes in the host is usually frowned upon (such as installing/running DHCP, DNS, Web Server (IIS), etc).
So your professor is right to advise against running processes on the host while testing your VM.
I am running 2250 users test from AWS windows VM, Following are the details.
Windows
RAM: 32GB
CPU: 8 Core
Once test reaches to 600 concurrent users the cpu is going 100% utilization. The action taken to resolve this,(Using Jmeter for test)
Increased the Heap size (HEAP=-Xms512m -Xmx12288m)
Removed lisners from the test.
Running test from NON GUI mode.
Still Load generator machine reaching to 100%. What whould be the best solution to fix this issue.
First check you follow best practices in your test:
http://jmeter.apache.org/usermanual/best-practices.html
http://www.ubik-ingenierie.com/blog/jmeter_performance_tuning_tips/
Then it would be better to use a linux machine instead of Windows as it usually scales better.
Finally try increasing the machine type to give it more CPUs.
The best option would be switching from single machine having 32 GB of RAM to 3 machines having 12 GB of RAM and run JMeter in distributed mode as your test seems to be very CPU intensive.
See What’s the Max Number of Users You Can Test on JMeter? for more comprehensive explanation of JMeter virtual users limits and what needs to be done to overcome them.
i'm using windows machine over EC2 and i'm running a very heavy CPU consuming process.
my question is if it is dangerous to run a windows over EC2 that use 95-100 cpu most of the time?
is it can cause a crush of the machine or crush of the process?
is because the machine is using VCPU (virtual CPU) can i use 100? CPU with not casing any damage?
There is no problem with that. The only thing you may need to be concerned about is that it can increase clock skew. If you regularly update your system clock you should be fine.
No, not dangerous.
As datasage mentioned, it can increase clock scew, but that shouldn't be much of a problem.
The main reason it's not a problem is that it's not actual hardware! EC2 is a collection of virtual machines running on big, huge, servers - 100% of a Micro instance is about 0.1% to them.
I want to test with a windows machine with low performance hard wares. Unfortunately I have a higher end machine. Is there a way to limit the performance of CPU and RAM memory usage? Can I do it through any other software or is there way through windows OS itself?
You can use VMWare to limit memory. You won't be able to limit processor speed in your virtual machine but you can assign only 1 core to it.
Try CPUKiller - software for limiting CPU performance.
You can use the truncatememory boot options to limit the amount of memory available usable by Windows. See BCDEdit /set (MSDN)