KVM Virtualization SMP (symmetric multi-processor) Introduction and configuration

Source: Internet
Author: User

One, SMP (symmetric multiprocessor) Introduction

1) Introduction to SMP

In computer technology is very popular and increasingly developed today, with Intel, IBM as a representative of some large companies to promote the rapid development of Central processing Unit (CPU) technology and upgrading, in today's computer systems, multi-processor, multicore, Hyper-Threading technology has been widely used. The SMP (symmetric multi-processor symmetric multiprocessor) system is ubiquitous in both enterprise and research applications, as well as desktops, notebooks and even mobile phones for individual consumers. In SMP systems, multiple programs (processes) can be executed in real parallel, and multiple threads of a single process can be executed in parallel, which greatly improves the parallel processing capability and overall performance of the computer system.

2) SMP Hardware support

On the hardware side, the older computer systems were more likely to have multiple physical CPU sockets on one motherboard to implement the SMP system, and then, with the advent of multicore technology, Hyper-Threading (hyper-threading) technology, SMP systems used one or more of the technologies of multiprocessor, multicore, Hyper-threading, and so on. Most modern CPUs support multicore or Hyper-threading technology, such as Intel's Xeon (strong), Pentium D (Pentium D), Core Duo (core™), Core 2 Duo (core™ II) series processors and AMD's Athlon64 X2, Quad F X, Opteron 200, Opteron 2000 and other series of processors.

3) SMP Software support

On the operating system side, most modern operating systems provide support for SMP systems, such as the mainstream Linux operating system (the kernel 2.6 and above for SMP support), Microsoft's Windows NT series (including: Windows 2000, Windows XP, Wind OWS 7, Windows 8, Windows 10, etc.), Mac OS Systems, BSD Systems, HP-UX systems, IBM AIX systems, and more.

Second, view the number of CPUs, multicore and Hyper-threading

For information on viewing CPU physical, processor, core, etc., please see my previous blog:

Linux View CPU information: http://blog.csdn.net/wanglei_storage/article/details/48326791

Ii. Creating a KVM virtual machine

1. Installing a KVM virtual machine
Before configuring the client's SMP, it is necessary to have a virtual machine, here is a brief description of how to create a virtual machine (to prepare a system image, for example: Centos-6.5-x86_64-bin-dvd1.iso):

1) First, you need to create a mirror file, you can use the DD tool, create a 8GB size system disk File centos.img:

2) Second, start the KVM virtual machine and install the system

Parameter description:
-SMP: The next thing to illustrate, the SMP (symmetric multiprocessor) system
-M: Memory allocated to the client
-boot ORDER=CD: Specifies the boot order, a, b means the floppy drive, C for the first drive, and D for the first optical drive device, and the N-P for the network adapter
-hda: The IDE hard disk assigned to the client (that is, the image file that was previously prepared)
-CDROM: The optical drive assigned to the client

By default, QEMU launches a VNC Server port (as above:: 1:5,900), and you can use the Vncviewer tool in the KDE desktop environment to connect to the QEMU VNC port to view the client machine and install the operating system.

Get ready to finish the job here.

Iii. QEMU-KVM Configuring the client's SMP system

QEMU-KVM parameter Description:

In the QEMU-KVM command, the "-SMP" parameter is configured to configure the client's SMP system, with the following parameters:

-SMP N[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets]
which

    • n is used to set the number of logical CPUs used in the client (the default value is 1)
    • Maxcpus is used to set the maximum number of CPUs that may be used in the client, including the number of CPUs that are in the offline offline state at startup
    • Cores is used to set the number of cores on each CPU socket (default value is 1)
    • Threads is used to set the number of threads on each CPU core (the default value is 1)
    • The sockets is used to set the total number of CPU sockets seen in the client.

Here's a few examples of QEMU commands in KVM to see how to apply SMP to a client (view process and thread via command: PS-EFL):

1) Example 1 (SMP specified as 4 means 4 virtual CPUs assigned to the client):

We saw 4 processor and cpu0, CPU1, CPU2, CPU3 in the client, and we saw QEMU-KVM processes and threads in the host.

2) Example 2 (SMP specified as 2 means 2 virtual CPUs assigned to the client)

We saw 2 processor and cpu0, CPU1 in the client, and saw QEMU-KVM processes and threads in the host

3) Example 3 (without SMP parameter, use its default value of 1 to view CPU in the client)

We saw 1 processor and cpu0 in the client, and we saw QEMU-KVM processes and threads in the host.

KVM Virtualization SMP (symmetric multi-processor) Introduction and configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.