Virtualized CPU cores vs. threads
        Posted  
        
            by nedm
        on Server Fault
        
        See other posts from Server Fault
        
            or by nedm
        
        
        
        Published on 2010-04-14T19:45:39Z
        Indexed on 
            2010/04/14
            19:53 UTC
        
        
        Read the original article
        Hit count: 483
        
We've got a KVM host system on Ubuntu 9.10 with a newer Quad-core Xeon CPU with hyperthreading. As detailed on Intel's product page, the processor has 4 cores but 8 threads. /proc/cpuinfo and htop both list 8 processors, though each one states 4 cores in cpuinfo. KVM/QEMU also reports 8 VCPUs available to assign to guests.
My question is when I'm allocating VCPUs to VM guests, should I allocate per-core or per-thread? Since KVM/QEMU reports the server has 8 VCPUs to allocate, should I go ahead and set a guest to use 4 CPUs where I previously would have set it to use 2 (assuming 4 total VCPUs available)? I'd like to get the most possible out of the host hardware without over-allocating.
© Server Fault or respective owner