LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 12-10-2018, 03:04 AM   #1
linuly
Member
 
Registered: Jan 2018
Posts: 96

Rep: Reputation: Disabled
schedule


hi,
the kvm hypervisor scheduler among other things check to see if there is a free cpu to run a process.When a process (VM) need cpu to run this(process) will talk to hypervisor.right?
tnx
 
Old 12-10-2018, 03:15 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by linuly View Post
hi,
the kvm hypervisor scheduler among other things check to see if there is a free cpu to run a process.When a process (VM) need cpu to run this(process) will talk to hypervisor.right?
tnx
There is no such thing as a "free CPU", except if you mean an idle CPU. When you use KVM your VM runs as a normal process. Consequently, the kernel (not KVM) schedules it to CPU(s), and it competes for CPU time like all other processes on the hypervisor host.

You can pin a VM onto certain CPUs, so that they will only be scheduled on those CPUs. This is useful if the hypervisor host has a NUMA architecture, where access to memory on a "remote" CPU is more costly than memory on the "local" CPU.
 
Old 12-10-2018, 04:20 AM   #3
linuly
Member
 
Registered: Jan 2018
Posts: 96

Original Poster
Rep: Reputation: Disabled
hi,
the kernel schedule the idle cpu to a process(VM) but the kernel must talk to the hypervisor to see what cpu is in idle.right?
in order to monitor or capacity planning i consider everything at process level (include VM) and i perform monitor or capacity planing like in a linux system without hypervisor.Then i can take in consideration the VM level where i log in VM and check there the resource consumption.right?
With the observation that i can move on other servers(physical) processes(VM).
tnx
 
Old 12-10-2018, 04:59 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by linuly View Post
hi,
the kernel schedule the idle cpu to a process(VM) but the kernel must talk to the hypervisor to see what cpu is in idle.right?
There are processes, CPUs and a kernel on the hypervisor host, and there are processes, CPUs and a kernel on the virtual machine. I don’t understand which you mean, but the kernel on the hypervisor host doesn’t manage the virtual CPUs of the virtual machine.

There are several types of hypervisors, too. Traditionally, type 1 and 2. Type 1 is a hypervisor that “owns” the entire physical hypervisor host without competition from other processes. Examples: ESXi and Xen. Type 2 hypervisors run as normal processes on top of a kernel, competing with other processes for system resources, such as Qemu. KVM is in-between the two, competing with processes but also running on the bare metal via a kernel module. I don’t know which you have in mind.

Quote:
in order to monitor or capacity planning i consider everything at process level (include VM) and i perform monitor or capacity planing like in a linux system without hypervisor.Then i can take in consideration the VM level where i log in VM and check there the resource consumption.right?
You want to plan the capacity of the hypervisor host and monitor its resource usage? You need an idea of the resource consumption of your application, i.e. the VMs you are running, and multiply that with the desired number of VMs. Then you monitor the load on the hypervisor, and you gauge throughput, responsiveness etc. of the applications on the VMs.
Quote:
With the observation that i can move on other servers(physical) processes(VM).
You mean you will move VMs to other hosts? That’s certainly a strategy when you observe a high load.
 
Old 12-10-2018, 09:15 AM   #5
linuly
Member
 
Registered: Jan 2018
Posts: 96

Original Poster
Rep: Reputation: Disabled
hi,
i talk about processes in physical server only.so if i have an hypervisor on this physical server the hypervisor itself has direct contact with the hardware.in this context is.
"the kernel(in physical server) schedule the idle cpu (physical core) to a process(that represent a VM)-in physical server- but the kernel must talk to the hypervisor to see what cpu is in idle.right?"

When there is a slow response time i start to monitor things at physical server level.Next base on what i see i monitor things inside a certain VM.right?
tnx
 
Old 12-10-2018, 09:20 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
no
If you have a "slow response time" issue you need to check that, but not how the hypervisor works. That is completely irrelevant.
There can be two cases: 1. the VM has no enough resources, so you need to assign more ram/cpu whatever is missing. 2. it is not related to these kind of resources, so you need to find the reason inside the VM. But probably it is network related (or something else).
 
Old 12-10-2018, 04:45 PM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by linuly View Post
the kernel must talk to the hypervisor to see what cpu is in idle.right?
Not right.

In case of a type 1 hypervisor, the hypervisor is the kernel.
Type 2 hypervisors run as processes on top of a kernel. In this case, the kernel has full control over all physical resources including the CPU. It doesn’t have to ask the hypervisor which CPU is idle.

Quote:
When there is a slow response time i start to monitor things at physical server level.Next base on what i see i monitor things inside a certain VM.right?
tnx
I would start measuring application-specific metrics, then system metrics inside the VM(s), then check the load on the physical server. However, it depends on the application. E.g. if it’s a LAMP web site, first check if response time is impacted by the DB, the app servers, the web servers, the load balancer. When you know that, drill down at that point.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Tentative Schedule Meets Tentative Schedule For ATO LXer Syndicated Linux News 0 08-11-2014 04:10 PM
LXer: Schedule Tasks Using Gnome-schedule (cron & at GUI) LXer Syndicated Linux News 0 07-28-2007 12:31 AM
Schedule, AGAIN!! erathomor Linux - General 0 04-11-2002 11:25 AM
HOW TO Schedule erathomor Linux - General 3 04-10-2002 01:57 PM
How to schedule unix script periodically from unix os level??? gopi_20us Programming 2 03-11-2002 06:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration