How can I emulate more virtual CPU processor cores than physically available on Windows?

5,893

Yes, there is a way, actually there is also a open-source processor emulator called QEMU, you can use it with the -smp X argument:

QEMU is a generic and open source machine emulator and virtualizer.

When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.

When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU. QEMU supports virtualization when executing under the Xen hypervisor or using the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, server and embedded PowerPC, and S390 guests.

Also, if you want to know more about core emulation, read this article on section 2 - "the CPU Emulation Core" or even on this post on ServerFault.

Share:
5,893

Related videos on Youtube

angeldev
Author by

angeldev

Generally, less code is easier to understand than more code; however, there is a point at which code is so dense that it becomes hard to read. Code is read much more often than it is written. Code frequently lives longer than we want it to. The person who tests or maintains a piece of code is frequently not the original author. At scale, the skill level of developers reading/writing/maintaining/testing code is going to be a normal distribution around the mean of "not expert." Nick Snyder

Updated on September 18, 2022

Comments

  • angeldev
    angeldev almost 2 years

    Is there a way that I could emulate the number of logical/physical processors for Windows like virtualization (VM) ?

    I need to simulate processors of about more than 64 and see some minor functionality of some C++ calls in Windows Server 2008 R2


    Edit: I just need the system to tell that it has more cores, performance and accuracy is of no concern

    • David Schwartz
      David Schwartz about 12 years
      Can you be more precise about what you want? Do you want to see the system tell you it has more processors? Or do you want the system to execute code the way it would if it had more processors? Do you need accuracy? Do you need performance?
    • angeldev
      angeldev about 12 years
      well actually my reason might be stupid/longshot but i wanted to check this out stackoverflow.com/questions/10877182/…
    • kobaltz
      kobaltz about 12 years
      I've experimented with VirtualBox, QEMU, KVM and OpenVZ. Whenever I selected more cores that the server actually had available (Including HTT), the virtual machines would come to a crawl. They did not like being 'fooled' that there were 64 Processors available when in fact there were only 32.
    • angeldev
      angeldev about 12 years
      meaning that a virtual OS can be fooled in thinking that it can have a more CPUs than physically available
    • angeldev
      angeldev about 12 years
      VirtualBox only allows to double the actual number of CPUs, can we not increase ?
    • angeldev
      angeldev about 12 years
      @Diogo can you please paste the same comment in the answer section so i can mark it correct :)
    • Diogo
      Diogo about 12 years
      @KiNGPiN I had posted it but I deleted because someone had downvoted for some reason. Undeleted and edited.
  • Thalys
    Thalys about 12 years
    Ahh yes, cause QEMU actually virtualises the entire CPU instead of doing passthrough. You lose out on performance, but its a LOT more flexible.
  • angeldev
    angeldev about 12 years
    Good descriptive answer. Thankyou :)