* [Qemu-devel] QEMU -smp paramater: Will multiplue threads and cores improve performance?
@ 2016-12-21 8:44 Bob Chen
2016-12-21 11:23 ` Stefan Hajnoczi
0 siblings, 1 reply; 3+ messages in thread
From: Bob Chen @ 2016-12-21 8:44 UTC (permalink / raw)
To: qemu-devel
Hi,
-smp 16
-smp cores=4,threads=4,sockets=1
Which one has better performance? The scenario is guest VMs running on
cloud server.
-Bob
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] QEMU -smp paramater: Will multiplue threads and cores improve performance?
2016-12-21 8:44 [Qemu-devel] QEMU -smp paramater: Will multiplue threads and cores improve performance? Bob Chen
@ 2016-12-21 11:23 ` Stefan Hajnoczi
2016-12-21 11:33 ` Daniel P. Berrange
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2016-12-21 11:23 UTC (permalink / raw)
To: Bob Chen; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 649 bytes --]
On Wed, Dec 21, 2016 at 04:44:08PM +0800, Bob Chen wrote:
> -smp 16
>
> -smp cores=4,threads=4,sockets=1
>
>
> Which one has better performance? The scenario is guest VMs running on
> cloud server.
It's more complicated than that.
The CPU topology (cores, threads, sockets) can be used by guest kernels
to make scheduling decisions.
If you pin vcpu threads to host cpus and configure the guest with
an accurate CPU topology then you can expect the guest kernel to make
the best decisions.
If you do not pin vcpu threads then you cannot expect any consistent
performance advantage by specifying the CPU topology.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] QEMU -smp paramater: Will multiplue threads and cores improve performance?
2016-12-21 11:23 ` Stefan Hajnoczi
@ 2016-12-21 11:33 ` Daniel P. Berrange
0 siblings, 0 replies; 3+ messages in thread
From: Daniel P. Berrange @ 2016-12-21 11:33 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Bob Chen, qemu-devel
On Wed, Dec 21, 2016 at 11:23:42AM +0000, Stefan Hajnoczi wrote:
> On Wed, Dec 21, 2016 at 04:44:08PM +0800, Bob Chen wrote:
> > -smp 16
> >
> > -smp cores=4,threads=4,sockets=1
> >
> >
> > Which one has better performance? The scenario is guest VMs running on
> > cloud server.
>
> It's more complicated than that.
>
> The CPU topology (cores, threads, sockets) can be used by guest kernels
> to make scheduling decisions.
cores vs sockets will have little difference, but cores or sockets
vs threads will definitely affect guest schedular.
> If you pin vcpu threads to host cpus and configure the guest with
> an accurate CPU topology then you can expect the guest kernel to make
> the best decisions.
>
> If you do not pin vcpu threads then you cannot expect any consistent
> performance advantage by specifying the CPU topology.
In fact if you do not pin threads and you specify a CPU topology that
has > 1 hyperthread, you may well make performance of the guest worse.
Essentially you never want to use threads>1, unless pinning guest CPUs
to host CPUs 1:1
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-21 11:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-21 8:44 [Qemu-devel] QEMU -smp paramater: Will multiplue threads and cores improve performance? Bob Chen
2016-12-21 11:23 ` Stefan Hajnoczi
2016-12-21 11:33 ` Daniel P. Berrange
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).