[CentOS-virt] What are KVM guest cores?

2010-11-18 Thread MargoAndTodd
Hi All,

What are guest cores in KVM?  Are they fake, like everything else
in the guest?  Just another process running on the host emulating
a core?

Or are the guest cores actually connected directly to the physical
cores on my motherboard?

Many thanks,
-T
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] SPICE Benchmark

2010-11-18 Thread Pasi Kärkkäinen
On Wed, Nov 17, 2010 at 10:02:49PM -0500, Scott Dowdle wrote:
 Greetings,
 
 - Original Message -
  So as I understand it correctly, this whole SPICE thing is just
  something like VNC on steroids? Why can't we have this SPICE thing
  work on physical hosts as well?
 
 SPICE was specifically designed to be a display protocol for a KVM virtual 
 machine.  Most remote display protocols have two pieces... a client and a 
 server.  SPICE has three... a client, a server, and a qxl device driver 
 provided inside of a KVM virtual machine.  It is probably possible to take 
 the SPICE protocol and adapt it to work without the qxl device driver... but 
 no one has done that yet.
 
 The best experience I've seen for a remote Linux box was provided by No 
 Machine's NX protocol.  FreeNX comes from NX but it appears FreeNX has 
 stalled.  Google created some project, I forget the name, forked from FreeNX 
 I believe.  No Machine is working on version 4.0 of NX and supposedly will be 
 releasing a beta in the not too distant future.  Some time ago they posted a 
 lot of information about NX 4.0 on their website and it seems to rival SPICE 
 to a certain degree... but that remains to be seen.
 

Google's NX implementation is called 'neatx': http://code.google.com/p/neatx/

 What I'd like to see happen would be for SPICE to be adapted to a general 
 purpose remote display protocol or perhap Red Hat could buy No Machine and 
 open source that protocol too. :)
 

NX the protocol is open already.. :) 

Nomachine's NX server product is not..

-- Pasi

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


[CentOS-virt] [HOWTO] Running Xen 4.0 host (dom0) with Redhat Enterprise Linux 6 (RHEL6)

2010-11-18 Thread Pasi Kärkkäinen
Hello,

If you're interested in running Xen 4.0 hypervisor/dom0 on RHEL6,
take a look at here: http://wiki.xen.org/xenwiki/RHEL6Xen4Tutorial

It explains steps needed to rebuild Xen 4.0.1 src.rpm from Fedora on RHEL6,
and how to fetch dom0 capable 2.6.32.x kernel from upstream git repository.

It also shows how to get libvirt/virt-manager working with Xen on RHEL6.

Hopefully it helps :)

-- Pasi

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] [HOWTO] Running Xen 4.0 host (dom0) with Redhat Enterprise Linux 6 (RHEL6)

2010-11-18 Thread Kenni Lund
2010/11/18 Pasi Kärkkäinen pa...@iki.fi:
 Hello,

 If you're interested in running Xen 4.0 hypervisor/dom0 on RHEL6,
 take a look at here: http://wiki.xen.org/xenwiki/RHEL6Xen4Tutorial

 It explains steps needed to rebuild Xen 4.0.1 src.rpm from Fedora on RHEL6,
 and how to fetch dom0 capable 2.6.32.x kernel from upstream git repository.

 It also shows how to get libvirt/virt-manager working with Xen on RHEL6.

 Hopefully it helps :)

Very nice, thanks! I'll test it when time permits, but for now I'll
enjoy the working-out-of-the-box experience I get with KVM on RHEL ;)

Best regards
Kenni
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


[CentOS-virt] what scheduling algorithm does KVM use?

2010-11-18 Thread Nick
This may not be the best place to ask, but I was prompted by a question about
guest cores on KVM.

We currently use VMWare Server (v1.0) on CentOS5.

It supports up to two virtual CPUs, but not very well, as I understand it.
VMWare Server 2.0 might do better at supporting the same maximum of 2 CPUs, but
if my research is correct, they both use what is called strict co-scheduling.
 Which means, if a two virtual-CPU VM is waiting for a time slice on the
physical host, there needs to be two physical CPUs available to be allocated.
This is because amount of time scheduled to each virtual CPU has to stay equal,
else assumptions in the virtualised software may become false and things start
going wrong.

The problem with this is that it is obviously more of a constraint to have two
physical CPUs available.  Therefore adding virtual CPUs to a co-scheduled VM can
actually make performance worse if the physical CPUs are under any sort of
contention.  Performance degrades rapidly under load - which is exactly what you
don't want for a webserver.  Therefore advice seems to be to avoid using
multi-virtual CPU VMs.  [1]


VMWare ESX uses something supposedly better, called relaxed co-scheduling. [2].
We're not likely to use that any time soon, since we are using 11 root servers
running CentOS.

I did try and research the algorithm(s) used by KVM. Apparently it doesn't use
co-scheduling, but possibly something called the completely fair scheduler,
but I'm no an expert in VM scheduling and I didn't manage to discover what this
means, nor specifically what the implications are for performance were in terms
of scaling up the number of virtual CPUs on KVM.  (I understand that the number
of virtual CPUs supported by KVM is be quite high.)


Anyway, I've been asked how to scale a VM up utilise more - say four or more -
physical CPUs.  Is KVM better at this than VMware Server, or does the same basic
problem persist?

Thanks,

Nick


1. http://communities.vmware.com/thread/169323

   http://cs.gmu.edu/~hfoxwell/cs671projects/southern_v12n.pdf
 The SMP
 scheduling algorithms used by ESX server and by Xen
 have a low overhead for single-threaded compute inten-
 sive workloads. However, they do not scale as well for
 multi-threaded workloads on a system with overcommit-
 ted CPU resources.


2. http://communities.vmware.com/thread/157849
   http://communities.vmware.com/docs/DOC-4960
   http://communities.vmware.com/docs/DOC-5501
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] what scheduling algorithm does KVM use?

2010-11-18 Thread Kenni Lund
2010/11/19 Nick oinksoc...@letterboxes.org:
 The problem with this is that it is obviously more of a constraint to have two
 physical CPUs available.  Therefore adding virtual CPUs to a co-scheduled VM 
 can
 actually make performance worse if the physical CPUs are under any sort of
 contention.  Performance degrades rapidly under load - which is exactly what 
 you
 don't want for a webserver.  Therefore advice seems to be to avoid using
 multi-virtual CPU VMs.  [1]

As long as you keep the number of CPUs for *each* VM - equal to or
lower than - the number of physical cores, your performance should not
suffer with KVM. If you assign more CPUs to one VM than you have
available cores (a core can also be a hyperthreaded core), you will
for sure run into performance problems.

 I did try and research the algorithm(s) used by KVM. Apparently it doesn't use
 co-scheduling, but possibly something called the completely fair scheduler,

The good thing about KVM compared to other virtualization solutions,
is that KVM doesn't try to reinvent the wheel. It leaves scheduling to
the Linux kernel, so whatever your Linux system is setup to use, KVM
will use that. You can choose to run CFS (Completely Fair Scheduler),
deadline, BFS, or whatever scheduler you prefer. As long as Linux uses
it, KVM will use it.

 but I'm no an expert in VM scheduling and I didn't manage to discover what 
 this
 means, nor specifically what the implications are for performance were in 
 terms
 of scaling up the number of virtual CPUs on KVM.  (I understand that the 
 number
 of virtual CPUs supported by KVM is be quite high.)

If you want a really competent answer to your question, send it to the
kvm-devel list...they don't mind user questions like this, and as long
as you're asking a relevant question, there's a good chance of getting
a highly competent answer :)

Best regards
Kenni
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] SPICE Benchmark

2010-11-18 Thread Scott Dowdle
Greetings,

- Original Message -
 Google's NX implementation is called 'neatx':
 http://code.google.com/p/neatx/

Thanks.  I was looking for that.

 NX the protocol is open already.. :)

It is for all versions before 4.0.  4.0 will be completely closed.

TYL,
-- 
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] what scheduling algorithm does KVM use?

2010-11-18 Thread Nick
Thanks for the quick reply.

On 18/11/10 23:45, Kenni Lund wrote:
 The good thing about KVM compared to other virtualization solutions,
 is that KVM doesn't try to reinvent the wheel. It leaves scheduling to
 the Linux kernel, so whatever your Linux system is setup to use, KVM
 will use that. You can choose to run CFS (Completely Fair Scheduler),
 deadline, BFS, or whatever scheduler you prefer. As long as Linux uses
 it, KVM will use it.

Is this process scheduling we're talking about here?  Hmm, and I wonder how I
find out what scheduling algorithm my kernel is using.

So, this sounds feasible... except if virtual CPUs must have time shared equally
as the VMWare co-scheduling explanations imply. A scheduler for threads /
processes presumably wouldn't guarantee such a thing?

Maybe I'll go and investigate the KVM list

Thanks

N
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] What are KVM guest cores?

2010-11-18 Thread Kenni Lund
 Do you have a rule of thumb as to how many core to assign
 to a guest?  For instance, with an Intel x5650 with 6 real
 and 12 hyperthreaded cores, how many cores would you assign
 to the guest?

It fully depends on the load of your guests and how many guests you
want/need to run on a single server.

You need to perform some testing to know what will work the best in
your case. One thing to remember though: In your case, if you create
two guests with 12 virtual CPUs each, and one of them crashes and take
all its 12 virtual CPUs up to 100%, it will essentially take most of
the processing power away from the second guest, leaving the second
guest in a close-to-useless state (depending on your scheduler, but
you get the point). If you on the other hand had assigned 6 cores to
each of them, the second guest would have remained unaffected, since
it just uses the 6 cores with no load. So if your guest will not
utilize the extra CPUs anyway, then don't assign them.

Best regards
Kenni
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] what scheduling algorithm does KVM use?

2010-11-18 Thread Kenni Lund
2010/11/19 Nick oinksoc...@letterboxes.org:
 Thanks for the quick reply.

 On 18/11/10 23:45, Kenni Lund wrote:
 The good thing about KVM compared to other virtualization solutions,
 is that KVM doesn't try to reinvent the wheel. It leaves scheduling to
 the Linux kernel, so whatever your Linux system is setup to use, KVM
 will use that. You can choose to run CFS (Completely Fair Scheduler),
 deadline, BFS, or whatever scheduler you prefer. As long as Linux uses
 it, KVM will use it.

 Is this process scheduling we're talking about here?

Yep, a virtual CPU is just a process on the host Linux system.

 So, this sounds feasible... except if virtual CPUs must have time shared 
 equally
 as the VMWare co-scheduling explanations imply. A scheduler for threads /
 processes presumably wouldn't guarantee such a thing?

I think cgroups is the solution, if you want to guarantee resources to
some guests. I haven't tested it with KVM, but perhaps nice and
ionice can be useful as well...the guests are just Linux processes
after all.

 Maybe I'll go and investigate the KVM list

:)

Best regards
Kenni
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt