How can I emulate more virtual CPU processor cores than physically available on Windows?
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.
Related videos on Youtube
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, 2022Comments
-
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 about 12 yearsCan 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 about 12 yearswell actually my reason might be stupid/longshot but i wanted to check this out stackoverflow.com/questions/10877182/…
-
kobaltz about 12 yearsI'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 about 12 yearsmeaning that a virtual OS can be fooled in thinking that it can have a more CPUs than physically available
-
angeldev about 12 yearsVirtualBox only allows to double the actual number of CPUs, can we not increase ?
-
angeldev about 12 years@Diogo can you please paste the same comment in the answer section so i can mark it correct :)
-
Diogo about 12 years@KiNGPiN I had posted it but I deleted because someone had downvoted for some reason. Undeleted and edited.
-
-
Thalys about 12 yearsAhh yes, cause QEMU actually virtualises the entire CPU instead of doing passthrough. You lose out on performance, but its a LOT more flexible.
-
angeldev about 12 yearsGood descriptive answer. Thankyou :)