Quad Core Host -- should I assign 2 cores to a VM


  1. Posts : 11,211
    Windows / Linux : Arch Linux
       #1

    Quad Core Host -- should I assign 2 cores to a VM


    Hi there

    I can't quite work out whether I should assign 2 cores out of a 4 core processor (AMD OPTERON X3421 APU} to a VM running a fairly intensive DB system (MiniSAP or SAP ABAP 7.50 minisap) which has to run on a Linux machine - so I've got it on a Centos VM.

    This application is accessed via a front end GUI on a Windows Host which doesn't do much apart from some email, and EXCEL so the VM actually needs in theory to have the resources.

    I 'm using Physical HDD's for the SAP DB in the VM. I can't run the VM basically as HOST on this machine as I can't get hold of any AHCI / SATA Linux drivers (yet) for this machine and the standard drivers use a HIDEOUS "Fake RAID" system with lousy performance so I've skipped that.

    The windows host simply boots the boot loader from an INTERNAL USB 2 device (/boot on the USB card) which then loads the rest of the OS on to an SSD which works fine.

    I assume that when the VM is idle the cpu cores are available to the Host but I don't know. As far as RAM is concerned -- I have plenty in the machine but new VM software only reserves RAM in use and releases it when not required so the RAM setting is for MAX that the VM can reserve.

    so VM has for physical devices 1 SSD for the OS and 1 2.7 TB for databases etc.


    appreciate any input from gurus here --I can muck about with VM's but things like cpu cores etc is where my knowledge is light.

    Here's the CPU data the VM sees

    Quad Core Host -- should I assign 2 cores to a  VM-snapshot1.png


    Cheers
    jimbo
    Last edited by jimbo45; 13 Dec 2017 at 06:19.
      My Computer


  2. Posts : 4,224
    Windows 10
       #2

    @Kari has exercised Hyper-V as much as anybody else I know here. Maybe he'd like to weigh in. My somewhat more slipshod take on this is that your workload more or less demands as much I/O capability as you can give that VM. More cycles couldn't hurt, either. If you don't get an answer here (or one you like) you can always try the experimental method.
    HTH,
    --Ed--
      My Computers


  3. Posts : 17,642
    Windows 10 Pro
       #3

    Assign 2 cores, then on CentOS guest use command top in terminal to check how well / badly those cores are doing when your application is idle / not running and then the same when application is up and running. Repeat with just a single core assigned and see the difference.
      My Computer


  4. Posts : 11,211
    Windows / Linux : Arch Linux
    Thread Starter
       #4

    Hi there

    Thanks to you both
    @Kari
    I've found on testing the VM seems to work best with the following settings

    CPU - nr of processors : 1
    nr of Cores : 2

    for HDD for my main Database : Raw HDD --- not SCSI but as SATA and formatted in the VM with native file system -- chose XFS rather than EXT4 and HDD size 2.7 TB (3 TB RED WD NAS Disk), RAM alloc 4GB.

    Although the VM advised using SCSI the I/O worked far better when I set it up as a physical HDD using SATA - probably because I could use the physical SATA driver from the Host rather than a Virtualized SCSI driver. The SAP system has a DB server and an Application server so the whole software is quite intensive and is accessed from the HOST (or other remote clients) by a standard GUI.

    When upping processor or core count to more than 2 I found the VM would hang sometimes -- and a few minutes later so would the Host (W10 X 64 Pro).

    1 Processor with 2 Cores performed the best. Was quite an improvement from using 1 processor and 1 core in the VM config. This might be for the particular CPU I've got -- AMP Opteron X3421. Other ones such as Intel I5/7 might yield totally different results.

    I'm not sure whether that was a problem with how the SAP software handled the multi processing - I suspect it was the underlying VM system.

    Unfortunately the only other server machines I can test this on have a Celeron which doesn't have enough poke to drive this software at any decent sort of response. I can't test this stuff on your average laptop - of course I can log on from a laptop (front end GUI) but the DB server and application server is on the VM.


    I'm happy with the system now as it works fine -- although the SAP DB system causes a huge amount of I/O at VM Power on time -- it settles down after around 2 - 3 mins and as I'm the only user that's OK for me. After this period response time is fine and the Host system barely seems to notice there's this VM running.

    It's very difficult to find decent documentation on optimising processor usage for VM's -- there's plenty on I/O and RAM but virtually nothing on processor usage - probably because most people tend to do "Office" type stuff on VM's or fairly easy things like file / print serving and multi-media streaming - none of which require a lot of CPU processing. Multi-media for example is just sending data like any other file sharing - all the decoding is done on the RECEIVING devices whether phone / TV / Amazon TV / Apple TV / Roku TV / PC etc etc.

    Cheers
    jimbo
      My Computer


  5. Posts : 17,642
    Windows 10 Pro
       #5

    jimbo45 said:
    When upping processor or core count to more than 2 I found the VM would hang sometimes -- and a few minutes later so would the Host (W10 X 64 Pro).
    The thing with VM and how many cores it's using is that however strange it sounds, adding more cores can actually do just that, slow down the system. The VM can only use cores assigned to it when they are all free to be used, this forces VM occasionally just to wait that host frees the cores.
      My Computer


  6. Posts : 1,416
    Windows 10 Pro x64
       #6

    Kari said:
    The VM can only use cores assigned to it when they are all free to be used, this forces VM occasionally just to wait that host frees the cores.
    This is something i wasn't aware of, very interesting to know.

    Thank you Kari
      My Computer


  7. Posts : 11,211
    Windows / Linux : Arch Linux
    Thread Starter
       #7

    Hi folks

    Thanks kari

    Cheers
    jimbo
      My Computer


  8. Posts : 4,224
    Windows 10
       #8

    Great info from all. I'm going to talk to Kari about writing an article, or series of articles, on optimizing VMs for specific or various workloads in Hyper-V. You've helped to shed light on some interesting possibilities! Thanks,
    --Ed--
      My Computers


  9. Posts : 11,211
    Windows / Linux : Arch Linux
    Thread Starter
       #9

    Hi folks

    and to @Kari

    If you like the sort of refreshment suggested in the text of your avatar

    "Liquid Lobotomy " in Belgium -- i.e great Beer always worth while

    " Vökvi Lobotomy" in Icelandic or I think in Finnish as follows

    "Neste Lobotomia"

    Beer though is Universal !!!!.

    Cheers
    jimbo
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:30.
Find Us




Windows 10 Forums