Fix misleading core warning for AMD processors with modules

Here you can provide suggestions on how to improve the product, website, etc.
yurtesen
Posts: 30
Joined: 29. Aug 2016, 09:14

Fix misleading core warning for AMD processors with modules

Post by yurtesen »

I realized that if I select 4 cores on my 4 core AMD processor on Windows host (yes it is a 2 module 4 core processor), I see the warning :
More virtual CPUs are assigned to the virtual machine than the number of physical CPUs on the host system (2). This is likely to degrade the performance of your virtual machine. Please consider reducing the number of virtual CPUs
Firstly while I understand that the error is because WIndows is reporting 2 cores, I do not understand why what windows says is a reason to not fix it. Because other products such as cpu-z, vmware etc. are reporting correct number of cores.

The second problem is the bold part of the message which is grossly misleading. Because it actually improves performance greatly if I select 4 cores instead of 2.

Numbers don't lie, I ran tests using sysbench and stress-ng and for simplicity I am putting results from sysbench only but I attached the script I used and full outputs to the thread:
1 Core VM
1 thread 158s
2 thread 159s
4 thread 154s

2 Core VM
1 thread 155s
2 thread 61s
4 thread 60s

4 Core VM
1 thread 152s
2 thread 64s
4 thread 27s
As you can clearly see, using 4 cores double the performance compared to 2 cores. The results are similar for stress-ng

This must be fixed, first VirtualBox detect wrong number of cores because it relies on Windows, secondly the message is misleading and causes people to have worse performance if they rely on VirtualBox recommendation.

Thanks,

Script:

Code: Select all

#!/bin/sh

echo 'Number of Cores :' `grep -c ^processor /proc/cpuinfo` >> tests.txt
cat /proc/cpuinfo >> tests.txt
sysbench --test=cpu --cpu-max-prime=50000 --num-threads=1 run >> tests.txt
sysbench --test=cpu --cpu-max-prime=50000 --num-threads=2 run >> tests.txt
sysbench --test=cpu --cpu-max-prime=50000 --num-threads=4 run >> tests.txt
stress-ng --cpu 1 --cpu-method matrixprod  --metrics-brief --perf -t 60 >> tests.txt
stress-ng --cpu 2 --cpu-method matrixprod  --metrics-brief --perf -t 60 >> tests.txt
stress-ng --cpu 4 --cpu-method matrixprod  --metrics-brief --perf -t 60 >> tests.txt
1 Core VM

Code: Select all

Number of Cores : 1
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 96
model name	: AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G
stepping	: 1
microcode	: 0x6000626
cpu MHz		: 1796.628
cache size	: 1024 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt rdtscp lm rep_good nopl extd_apicid pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm cr8_legacy abm sse4a misalignsse 3dnowprefetch vmmcall arat
bugs		: fxsave_leak sysret_ss_attrs
bogomips	: 3593.25
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management:

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 50000


Test execution summary:
    total time:                          158.0394s
    total number of events:              10000
    total time taken by event execution: 158.0258
    per-request statistics:
         min:                                  6.62ms
         avg:                                 15.80ms
         max:                                 32.76ms
         approx.  95 percentile:              18.62ms

Threads fairness:
    events (avg/stddev):           10000.0000/0.00
    execution time (avg/stddev):   158.0258/0.00

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 2

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 50000


Test execution summary:
    total time:                          159.5684s
    total number of events:              10000
    total time taken by event execution: 319.0803
    per-request statistics:
         min:                                 10.85ms
         avg:                                 31.91ms
         max:                                 79.67ms
         approx.  95 percentile:              39.30ms

Threads fairness:
    events (avg/stddev):           5000.0000/7.00
    execution time (avg/stddev):   159.5402/0.01

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 4

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 50000


Test execution summary:
    total time:                          154.9376s
    total number of events:              10000
    total time taken by event execution: 619.6446
    per-request statistics:
         min:                                 21.91ms
         avg:                                 61.96ms
         max:                                145.82ms
         approx.  95 percentile:              79.37ms

Threads fairness:
    events (avg/stddev):           2500.0000/2.55
    execution time (avg/stddev):   154.9111/0.02

stress-ng: info:  [2169] dispatching hogs: 1 cpu
stress-ng: info:  [2169] successful run completed in 60.02s (1 min, 0.02 secs)
stress-ng: info:  [2169] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [2169]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [2169] cpu               2896     60.02     59.96      0.00        48.25        48.30
stress-ng: info:  [2169] cpu:
stress-ng: info:  [2169]                        193 Page Faults Minor              3.22 sec  
stress-ng: info:  [2169]                          0 Page Faults Major              0.00 sec  
stress-ng: info:  [2169]                        475 Context Switches               7.91 sec  
stress-ng: info:  [2169]                          0 CPU Migrations                 0.00 sec  
stress-ng: info:  [2169]                          0 Alignment Faults               0.00 sec  
stress-ng: info:  [2169]                        193 Page Faults User               3.22 sec  
stress-ng: info:  [2169]                          0 Page Faults Kernel             0.00 sec  
stress-ng: info:  [2169]                         53 System Call Enter              0.88 sec  
stress-ng: info:  [2169]                         52 System Call Exit               0.87 sec  
stress-ng: info:  [2169]                          0 TLB Flushes                    0.00 sec  
stress-ng: info:  [2169]                          0 Kmalloc                        0.00 sec  
stress-ng: info:  [2169]                          0 Kmalloc Node                   0.00 sec  
stress-ng: info:  [2169]                         30 Kfree                          0.50 sec  
stress-ng: info:  [2169]                          8 Kmem Cache Alloc               0.13 sec  
stress-ng: info:  [2169]                          0 Kmem Cache Alloc Node          0.00 sec  
stress-ng: info:  [2169]                        130 Kmem Cache Free                2.17 sec  
stress-ng: info:  [2169]                        192 MM Page Alloc                  3.20 sec  
stress-ng: info:  [2169]                         29 MM Page Free                   0.48 sec  
stress-ng: info:  [2169]                     30,784 RCU Utilization              512.91 sec  
stress-ng: info:  [2169]                          0 Sched Migrate Task             0.00 sec  
stress-ng: info:  [2169]                          0 Sched Move NUMA                0.00 sec  
stress-ng: info:  [2169]                        480 Sched Wakeup                   8.00 sec  
stress-ng: info:  [2169]                          2 Signal Generate                0.03 sec  
stress-ng: info:  [2169]                          1 Signal Deliver                 0.02 sec  
stress-ng: info:  [2169]                         36 IRQ Entry                      0.60 sec  
stress-ng: info:  [2169]                         36 IRQ Exit                       0.60 sec  
stress-ng: info:  [2169]                     14,953 Soft IRQ Entry               249.14 sec  
stress-ng: info:  [2169]                     14,953 Soft IRQ Exit                249.14 sec  
stress-ng: info:  [2169]                          0 Writeback Dirty Inode          0.00 sec  
stress-ng: info:  [2169]                          0 Writeback Dirty Page           0.00 sec  
stress-ng: info:  [2171] dispatching hogs: 2 cpu
stress-ng: info:  [2171] successful run completed in 60.03s (1 min, 0.03 secs)
stress-ng: info:  [2171] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [2171]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [2171] cpu               2926     60.01     59.98      0.00        48.75        48.78
stress-ng: info:  [2171] cpu:
stress-ng: info:  [2171]                        384 Page Faults Minor              6.40 sec  
stress-ng: info:  [2171]                          0 Page Faults Major              0.00 sec  
stress-ng: info:  [2171]                     14,246 Context Switches             237.32 sec  
stress-ng: info:  [2171]                          0 CPU Migrations                 0.00 sec  
stress-ng: info:  [2171]                          0 Alignment Faults               0.00 sec  
stress-ng: info:  [2171]                        384 Page Faults User               6.40 sec  
stress-ng: info:  [2171]                          0 Page Faults Kernel             0.00 sec  
stress-ng: info:  [2171]                        106 System Call Enter              1.77 sec  
stress-ng: info:  [2171]                        104 System Call Exit               1.73 sec  
stress-ng: info:  [2171]                          0 TLB Flushes                    0.00 sec  
stress-ng: info:  [2171]                          0 Kmalloc                        0.00 sec  
stress-ng: info:  [2171]                          0 Kmalloc Node                   0.00 sec  
stress-ng: info:  [2171]                         50 Kfree                          0.83 sec  
stress-ng: info:  [2171]                          4 Kmem Cache Alloc               0.07 sec  
stress-ng: info:  [2171]                          0 Kmem Cache Alloc Node          0.00 sec  
stress-ng: info:  [2171]                        208 Kmem Cache Free                3.46 sec  
stress-ng: info:  [2171]                        382 MM Page Alloc                  6.36 sec  
stress-ng: info:  [2171]                         40 MM Page Free                   0.67 sec  
stress-ng: info:  [2171]                     59,712 RCU Utilization              994.71 sec  
stress-ng: info:  [2171]                          0 Sched Migrate Task             0.00 sec  
stress-ng: info:  [2171]                          0 Sched Move NUMA                0.00 sec  
stress-ng: info:  [2171]                        486 Sched Wakeup                   8.10 sec  
stress-ng: info:  [2171]                          0 Signal Generate                0.00 sec  
stress-ng: info:  [2171]                          2 Signal Deliver                 0.03 sec  
stress-ng: info:  [2171]                         48 IRQ Entry                      0.80 sec  
stress-ng: info:  [2171]                         48 IRQ Exit                       0.80 sec  
stress-ng: info:  [2171]                     15,028 Soft IRQ Entry               250.34 sec  
stress-ng: info:  [2171]                     15,028 Soft IRQ Exit                250.34 sec  
stress-ng: info:  [2171]                          0 Writeback Dirty Inode          0.00 sec  
stress-ng: info:  [2171]                          0 Writeback Dirty Page           0.00 sec  
stress-ng: info:  [2174] dispatching hogs: 4 cpu
stress-ng: info:  [2174] successful run completed in 60.07s (1 min, 0.07 secs)
stress-ng: info:  [2174] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [2174]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [2174] cpu               2869     60.06     60.00      0.00        47.77        47.82
stress-ng: info:  [2174] cpu:
stress-ng: info:  [2174]                        772 Page Faults Minor             12.85 sec  
stress-ng: info:  [2174]                          0 Page Faults Major              0.00 sec  
stress-ng: info:  [2174]                     15,040 Context Switches             250.35 sec  
stress-ng: info:  [2174]                          0 CPU Migrations                 0.00 sec  
stress-ng: info:  [2174]                          0 Alignment Faults               0.00 sec  
stress-ng: info:  [2174]                        772 Page Faults User              12.85 sec  
stress-ng: info:  [2174]                          0 Page Faults Kernel             0.00 sec  
stress-ng: info:  [2174]                        212 System Call Enter              3.53 sec  
stress-ng: info:  [2174]                        208 System Call Exit               3.46 sec  
stress-ng: info:  [2174]                          0 TLB Flushes                    0.00 sec  
stress-ng: info:  [2174]                          0 Kmalloc                        0.00 sec  
stress-ng: info:  [2174]                          0 Kmalloc Node                   0.00 sec  
stress-ng: info:  [2174]                         20 Kfree                          0.33 sec  
stress-ng: info:  [2174]                         16 Kmem Cache Alloc               0.27 sec  
stress-ng: info:  [2174]                          0 Kmem Cache Alloc Node          0.00 sec  
stress-ng: info:  [2174]                         80 Kmem Cache Free                1.33 sec  
stress-ng: info:  [2174]                        768 MM Page Alloc                 12.78 sec  
stress-ng: info:  [2174]                         20 MM Page Free                   0.33 sec  
stress-ng: info:  [2174]                     60,008 RCU Utilization              998.89 sec  
stress-ng: info:  [2174]                          0 Sched Migrate Task             0.00 sec  
stress-ng: info:  [2174]                          0 Sched Move NUMA                0.00 sec  
stress-ng: info:  [2174]                        452 Sched Wakeup                   7.52 sec  
stress-ng: info:  [2174]                          4 Signal Generate                0.07 sec  
stress-ng: info:  [2174]                          4 Signal Deliver                 0.07 sec  
stress-ng: info:  [2174]                         24 IRQ Entry                      0.40 sec  
stress-ng: info:  [2174]                         24 IRQ Exit                       0.40 sec  
stress-ng: info:  [2174]                     14,968 Soft IRQ Entry               249.16 sec  
stress-ng: info:  [2174]                     14,968 Soft IRQ Exit                249.16 sec  
stress-ng: info:  [2174]                          0 Writeback Dirty Inode          0.00 sec  
stress-ng: info:  [2174]                          0 Writeback Dirty Page           0.00 sec  
2 Core VM

Code: Select all

Number of Cores : 2
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 96
model name	: AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G
stepping	: 1
microcode	: 0x6000626
cpu MHz		: 1796.628
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm rep_good nopl extd_apicid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch vmmcall arat
bugs		: fxsave_leak sysret_ss_attrs
bogomips	: 3593.25
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 96
model name	: AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G
stepping	: 1
microcode	: 0x6000626
cpu MHz		: 1796.628
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm rep_good nopl extd_apicid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch vmmcall arat
bugs		: fxsave_leak sysret_ss_attrs
bogomips	: 3593.25
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management:

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 50000


Test execution summary:
    total time:                          155.2275s
    total number of events:              10000
    total time taken by event execution: 155.2148
    per-request statistics:
         min:                                  8.18ms
         avg:                                 15.52ms
         max:                                 43.78ms
         approx.  95 percentile:              18.12ms

Threads fairness:
    events (avg/stddev):           10000.0000/0.00
    execution time (avg/stddev):   155.2148/0.00

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 2

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 50000


Test execution summary:
    total time:                          61.9613s
    total number of events:              10000
    total time taken by event execution: 123.8932
    per-request statistics:
         min:                                  6.78ms
         avg:                                 12.39ms
         max:                                 32.60ms
         approx.  95 percentile:              17.14ms

Threads fairness:
    events (avg/stddev):           5000.0000/8.00
    execution time (avg/stddev):   61.9466/0.01

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 4

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 50000


Test execution summary:
    total time:                          60.6863s
    total number of events:              10000
    total time taken by event execution: 242.6529
    per-request statistics:
         min:                                  6.95ms
         avg:                                 24.27ms
         max:                                 75.39ms
         approx.  95 percentile:              34.75ms

Threads fairness:
    events (avg/stddev):           2500.0000/8.03
    execution time (avg/stddev):   60.6632/0.01

stress-ng: info:  [2181] dispatching hogs: 1 cpu
stress-ng: info:  [2181] successful run completed in 60.33s (1 min, 0.33 secs)
stress-ng: info:  [2181] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [2181]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [2181] cpu               3106     60.33     59.99      0.03        51.48        51.75
stress-ng: info:  [2181] cpu:
stress-ng: info:  [2181]                        193 Page Faults Minor              3.20 sec  
stress-ng: info:  [2181]                          0 Page Faults Major              0.00 sec  
stress-ng: info:  [2181]                         18 Context Switches               0.30 sec  
stress-ng: info:  [2181]                          0 CPU Migrations                 0.00 sec  
stress-ng: info:  [2181]                          0 Alignment Faults               0.00 sec  
stress-ng: info:  [2181]                        192 Page Faults User               3.18 sec  
stress-ng: info:  [2181]                          1 Page Faults Kernel             0.02 sec  
stress-ng: info:  [2181]                         53 System Call Enter              0.88 sec  
stress-ng: info:  [2181]                         52 System Call Exit               0.86 sec  
stress-ng: info:  [2181]                          0 TLB Flushes                    0.00 sec  
stress-ng: info:  [2181]                          0 Kmalloc                        0.00 sec  
stress-ng: info:  [2181]                          0 Kmalloc Node                   0.00 sec  
stress-ng: info:  [2181]                          0 Kfree                          0.00 sec  
stress-ng: info:  [2181]                          1 Kmem Cache Alloc               0.02 sec  
stress-ng: info:  [2181]                          0 Kmem Cache Alloc Node          0.00 sec  
stress-ng: info:  [2181]                          4 Kmem Cache Free                0.07 sec  
stress-ng: info:  [2181]                        193 MM Page Alloc                  3.20 sec  
stress-ng: info:  [2181]                          0 MM Page Free                   0.00 sec  
stress-ng: info:  [2181]                     29,902 RCU Utilization              495.62 sec  
stress-ng: info:  [2181]                          1 Sched Migrate Task             0.02 sec  
stress-ng: info:  [2181]                          0 Sched Move NUMA                0.00 sec  
stress-ng: info:  [2181]                         41 Sched Wakeup                   0.68 sec  
stress-ng: info:  [2181]                          1 Signal Generate                0.02 sec  
stress-ng: info:  [2181]                          1 Signal Deliver                 0.02 sec  
stress-ng: info:  [2181]                          0 IRQ Entry                      0.00 sec  
stress-ng: info:  [2181]                          0 IRQ Exit                       0.00 sec  
stress-ng: info:  [2181]                     15,402 Soft IRQ Entry               255.28 sec  
stress-ng: info:  [2181]                     15,402 Soft IRQ Exit                255.28 sec  
stress-ng: info:  [2181]                          0 Writeback Dirty Inode          0.00 sec  
stress-ng: info:  [2181]                          0 Writeback Dirty Page           0.00 sec  
stress-ng: info:  [2183] dispatching hogs: 2 cpu
stress-ng: info:  [2183] successful run completed in 60.34s (1 min, 0.34 secs)
stress-ng: info:  [2183] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [2183]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [2183] cpu               6972     60.17    119.93      0.05       115.87        58.11
stress-ng: info:  [2183] cpu:
stress-ng: info:  [2183]                        386 Page Faults Minor              6.40 sec  
stress-ng: info:  [2183]                          0 Page Faults Major              0.00 sec  
stress-ng: info:  [2183]                        964 Context Switches              15.98 sec  
stress-ng: info:  [2183]                          0 CPU Migrations                 0.00 sec  
stress-ng: info:  [2183]                          0 Alignment Faults               0.00 sec  
stress-ng: info:  [2183]                        386 Page Faults User               6.40 sec  
stress-ng: info:  [2183]                          0 Page Faults Kernel             0.00 sec  
stress-ng: info:  [2183]                        106 System Call Enter              1.76 sec  
stress-ng: info:  [2183]                        104 System Call Exit               1.72 sec  
stress-ng: info:  [2183]                          0 TLB Flushes                    0.00 sec  
stress-ng: info:  [2183]                          0 Kmalloc                        0.00 sec  
stress-ng: info:  [2183]                          0 Kmalloc Node                   0.00 sec  
stress-ng: info:  [2183]                         70 Kfree                          1.16 sec  
stress-ng: info:  [2183]                         22 Kmem Cache Alloc               0.36 sec  
stress-ng: info:  [2183]                          0 Kmem Cache Alloc Node          0.00 sec  
stress-ng: info:  [2183]                        292 Kmem Cache Free                4.84 sec  
stress-ng: info:  [2183]                        382 MM Page Alloc                  6.33 sec  
stress-ng: info:  [2183]                         62 MM Page Free                   1.03 sec  
stress-ng: info:  [2183]                     61,596 RCU Utilization                1.02 K/sec
stress-ng: info:  [2183]                          0 Sched Migrate Task             0.00 sec  
stress-ng: info:  [2183]                          0 Sched Move NUMA                0.00 sec  
stress-ng: info:  [2183]                        966 Sched Wakeup                  16.01 sec  
stress-ng: info:  [2183]                          2 Signal Generate                0.03 sec  
stress-ng: info:  [2183]                          2 Signal Deliver                 0.03 sec  
stress-ng: info:  [2183]                         78 IRQ Entry                      1.29 sec  
stress-ng: info:  [2183]                         78 IRQ Exit                       1.29 sec  
stress-ng: info:  [2183]                     30,844 Soft IRQ Entry               511.17 sec  
stress-ng: info:  [2183]                     30,844 Soft IRQ Exit                511.17 sec  
stress-ng: info:  [2183]                          0 Writeback Dirty Inode          0.00 sec  
stress-ng: info:  [2183]                          0 Writeback Dirty Page           0.00 sec  
stress-ng: info:  [2186] dispatching hogs: 4 cpu
stress-ng: info:  [2186] successful run completed in 60.37s (1 min, 0.37 secs)
stress-ng: info:  [2186] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [2186]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [2186] cpu               7892     60.10    119.92      0.07       131.32        65.77
stress-ng: info:  [2186] cpu:
stress-ng: info:  [2186]                        772 Page Faults Minor             12.79 sec  
stress-ng: info:  [2186]                          0 Page Faults Major              0.00 sec  
stress-ng: info:  [2186]                     14,932 Context Switches             247.34 sec  
stress-ng: info:  [2186]                          0 CPU Migrations                 0.00 sec  
stress-ng: info:  [2186]                          0 Alignment Faults               0.00 sec  
stress-ng: info:  [2186]                        772 Page Faults User              12.79 sec  
stress-ng: info:  [2186]                          0 Page Faults Kernel             0.00 sec  
stress-ng: info:  [2186]                        212 System Call Enter              3.51 sec  
stress-ng: info:  [2186]                        208 System Call Exit               3.45 sec  
stress-ng: info:  [2186]                          0 TLB Flushes                    0.00 sec  
stress-ng: info:  [2186]                          0 Kmalloc                        0.00 sec  
stress-ng: info:  [2186]                          0 Kmalloc Node                   0.00 sec  
stress-ng: info:  [2186]                        116 Kfree                          1.92 sec  
stress-ng: info:  [2186]                         16 Kmem Cache Alloc               0.27 sec  
stress-ng: info:  [2186]                          0 Kmem Cache Alloc Node          0.00 sec  
stress-ng: info:  [2186]                        600 Kmem Cache Free                9.94 sec  
stress-ng: info:  [2186]                        768 MM Page Alloc                 12.72 sec  
stress-ng: info:  [2186]                         60 MM Page Free                   0.99 sec  
stress-ng: info:  [2186]                     91,232 RCU Utilization                1.51 K/sec
stress-ng: info:  [2186]                         16 Sched Migrate Task             0.27 sec  
stress-ng: info:  [2186]                          0 Sched Move NUMA                0.00 sec  
stress-ng: info:  [2186]                        980 Sched Wakeup                  16.23 sec  
stress-ng: info:  [2186]                          4 Signal Generate                0.07 sec  
stress-ng: info:  [2186]                          4 Signal Deliver                 0.07 sec  
stress-ng: info:  [2186]                         76 IRQ Entry                      1.26 sec  
stress-ng: info:  [2186]                         76 IRQ Exit                       1.26 sec  
stress-ng: info:  [2186]                     31,008 Soft IRQ Entry               513.63 sec  
stress-ng: info:  [2186]                     31,008 Soft IRQ Exit                513.63 sec  
stress-ng: info:  [2186]                          0 Writeback Dirty Inode          0.00 sec  
stress-ng: info:  [2186]                          0 Writeback Dirty Page           0.00 sec  
4 Core VM

Code: Select all

Number of Cores : 4
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 96
model name	: AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G
stepping	: 1
microcode	: 0x6000626
cpu MHz		: 1796.628
cache size	: 1024 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 4
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm rep_good nopl extd_apicid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch vmmcall arat
bugs		: fxsave_leak sysret_ss_attrs
bogomips	: 3593.25
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 96
model name	: AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G
stepping	: 1
microcode	: 0x6000626
cpu MHz		: 1796.628
cache size	: 1024 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 4
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm rep_good nopl extd_apicid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch vmmcall arat
bugs		: fxsave_leak sysret_ss_attrs
bogomips	: 3593.25
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management:

processor	: 2
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 96
model name	: AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G
stepping	: 1
microcode	: 0x6000626
cpu MHz		: 1796.628
cache size	: 1024 KB
physical id	: 0
siblings	: 4
core id		: 2
cpu cores	: 4
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm rep_good nopl extd_apicid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch vmmcall arat
bugs		: fxsave_leak sysret_ss_attrs
bogomips	: 3593.25
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management:

processor	: 3
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 96
model name	: AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G
stepping	: 1
microcode	: 0x6000626
cpu MHz		: 1796.628
cache size	: 1024 KB
physical id	: 0
siblings	: 4
core id		: 3
cpu cores	: 4
apicid		: 3
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm rep_good nopl extd_apicid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch vmmcall arat
bugs		: fxsave_leak sysret_ss_attrs
bogomips	: 3593.25
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management:

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 50000


Test execution summary:
    total time:                          152.1391s
    total number of events:              10000
    total time taken by event execution: 152.1269
    per-request statistics:
         min:                                  6.62ms
         avg:                                 15.21ms
         max:                                 32.50ms
         approx.  95 percentile:              17.36ms

Threads fairness:
    events (avg/stddev):           10000.0000/0.00
    execution time (avg/stddev):   152.1269/0.00

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 2

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 50000


Test execution summary:
    total time:                          64.4331s
    total number of events:              10000
    total time taken by event execution: 128.8472
    per-request statistics:
         min:                                  8.49ms
         avg:                                 12.88ms
         max:                                 32.36ms
         approx.  95 percentile:              17.05ms

Threads fairness:
    events (avg/stddev):           5000.0000/0.00
    execution time (avg/stddev):   64.4236/0.00

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 4

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 50000


Test execution summary:
    total time:                          27.7625s
    total number of events:              10000
    total time taken by event execution: 111.0013
    per-request statistics:
         min:                                 10.15ms
         avg:                                 11.10ms
         max:                                 45.04ms
         approx.  95 percentile:              12.68ms

Threads fairness:
    events (avg/stddev):           2500.0000/8.09
    execution time (avg/stddev):   27.7503/0.01

stress-ng: info:  [2203] dispatching hogs: 1 cpu
stress-ng: info:  [2203] successful run completed in 60.45s (1 min, 0.45 secs)
stress-ng: info:  [2203] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [2203]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [2203] cpu               2997     60.45     59.75      0.32        49.58        49.89
stress-ng: info:  [2203] cpu:
stress-ng: info:  [2203]                        193 Page Faults Minor              3.19 sec  
stress-ng: info:  [2203]                          0 Page Faults Major              0.00 sec  
stress-ng: info:  [2203]                         19 Context Switches               0.31 sec  
stress-ng: info:  [2203]                          0 CPU Migrations                 0.00 sec  
stress-ng: info:  [2203]                          0 Alignment Faults               0.00 sec  
stress-ng: info:  [2203]                        192 Page Faults User               3.18 sec  
stress-ng: info:  [2203]                          1 Page Faults Kernel             0.02 sec  
stress-ng: info:  [2203]                         53 System Call Enter              0.88 sec  
stress-ng: info:  [2203]                         52 System Call Exit               0.86 sec  
stress-ng: info:  [2203]                          0 TLB Flushes                    0.00 sec  
stress-ng: info:  [2203]                          0 Kmalloc                        0.00 sec  
stress-ng: info:  [2203]                          0 Kmalloc Node                   0.00 sec  
stress-ng: info:  [2203]                          0 Kfree                          0.00 sec  
stress-ng: info:  [2203]                          1 Kmem Cache Alloc               0.02 sec  
stress-ng: info:  [2203]                          0 Kmem Cache Alloc Node          0.00 sec  
stress-ng: info:  [2203]                          3 Kmem Cache Free                0.05 sec  
stress-ng: info:  [2203]                        192 MM Page Alloc                  3.18 sec  
stress-ng: info:  [2203]                          0 MM Page Free                   0.00 sec  
stress-ng: info:  [2203]                      5,510 RCU Utilization               91.15 sec  
stress-ng: info:  [2203]                          0 Sched Migrate Task             0.00 sec  
stress-ng: info:  [2203]                          0 Sched Move NUMA                0.00 sec  
stress-ng: info:  [2203]                         39 Sched Wakeup                   0.65 sec  
stress-ng: info:  [2203]                          1 Signal Generate                0.02 sec  
stress-ng: info:  [2203]                          1 Signal Deliver                 0.02 sec  
stress-ng: info:  [2203]                          0 IRQ Entry                      0.00 sec  
stress-ng: info:  [2203]                          0 IRQ Exit                       0.00 sec  
stress-ng: info:  [2203]                      2,945 Soft IRQ Entry                48.72 sec  
stress-ng: info:  [2203]                      2,945 Soft IRQ Exit                 48.72 sec  
stress-ng: info:  [2203]                          0 Writeback Dirty Inode          0.00 sec  
stress-ng: info:  [2203]                          0 Writeback Dirty Page           0.00 sec  
stress-ng: info:  [2205] dispatching hogs: 2 cpu
stress-ng: info:  [2205] successful run completed in 60.53s (1 min, 0.53 secs)
stress-ng: info:  [2205] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [2205]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [2205] cpu               6741     60.27    119.94      0.09       111.85        56.16
stress-ng: info:  [2205] cpu:
stress-ng: info:  [2205]                        386 Page Faults Minor              6.38 sec  
stress-ng: info:  [2205]                          0 Page Faults Major              0.00 sec  
stress-ng: info:  [2205]                        152 Context Switches               2.51 sec  
stress-ng: info:  [2205]                          0 CPU Migrations                 0.00 sec  
stress-ng: info:  [2205]                          0 Alignment Faults               0.00 sec  
stress-ng: info:  [2205]                        386 Page Faults User               6.38 sec  
stress-ng: info:  [2205]                          0 Page Faults Kernel             0.00 sec  
stress-ng: info:  [2205]                        106 System Call Enter              1.75 sec  
stress-ng: info:  [2205]                        104 System Call Exit               1.72 sec  
stress-ng: info:  [2205]                          0 TLB Flushes                    0.00 sec  
stress-ng: info:  [2205]                          0 Kmalloc                        0.00 sec  
stress-ng: info:  [2205]                          0 Kmalloc Node                   0.00 sec  
stress-ng: info:  [2205]                          0 Kfree                          0.00 sec  
stress-ng: info:  [2205]                          2 Kmem Cache Alloc               0.03 sec  
stress-ng: info:  [2205]                          0 Kmem Cache Alloc Node          0.00 sec  
stress-ng: info:  [2205]                          6 Kmem Cache Free                0.10 sec  
stress-ng: info:  [2205]                        384 MM Page Alloc                  6.34 sec  
stress-ng: info:  [2205]                          0 MM Page Free                   0.00 sec  
stress-ng: info:  [2205]                     59,944 RCU Utilization              990.35 sec  
stress-ng: info:  [2205]                          2 Sched Migrate Task             0.03 sec  
stress-ng: info:  [2205]                          0 Sched Move NUMA                0.00 sec  
stress-ng: info:  [2205]                        154 Sched Wakeup                   2.54 sec  
stress-ng: info:  [2205]                          2 Signal Generate                0.03 sec  
stress-ng: info:  [2205]                          2 Signal Deliver                 0.03 sec  
stress-ng: info:  [2205]                          0 IRQ Entry                      0.00 sec  
stress-ng: info:  [2205]                          0 IRQ Exit                       0.00 sec  
stress-ng: info:  [2205]                     30,288 Soft IRQ Entry               500.40 sec  
stress-ng: info:  [2205]                     30,288 Soft IRQ Exit                500.40 sec  
stress-ng: info:  [2205]                          0 Writeback Dirty Inode          0.00 sec  
stress-ng: info:  [2205]                          0 Writeback Dirty Page           0.00 sec  
stress-ng: info:  [2208] dispatching hogs: 4 cpu
stress-ng: info:  [2208] successful run completed in 60.45s (1 min, 0.45 secs)
stress-ng: info:  [2208] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [2208]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [2208] cpu              12929     60.11    239.80      0.12       215.08        53.89
stress-ng: info:  [2208] cpu:
stress-ng: info:  [2208]                        772 Page Faults Minor             12.77 sec  
stress-ng: info:  [2208]                          0 Page Faults Major              0.00 sec  
stress-ng: info:  [2208]                        304 Context Switches               5.03 sec  
stress-ng: info:  [2208]                          0 CPU Migrations                 0.00 sec  
stress-ng: info:  [2208]                          0 Alignment Faults               0.00 sec  
stress-ng: info:  [2208]                        772 Page Faults User              12.77 sec  
stress-ng: info:  [2208]                          0 Page Faults Kernel             0.00 sec  
stress-ng: info:  [2208]                        212 System Call Enter              3.51 sec  
stress-ng: info:  [2208]                        208 System Call Exit               3.44 sec  
stress-ng: info:  [2208]                          0 TLB Flushes                    0.00 sec  
stress-ng: info:  [2208]                          0 Kmalloc                        0.00 sec  
stress-ng: info:  [2208]                          0 Kmalloc Node                   0.00 sec  
stress-ng: info:  [2208]                         12 Kfree                          0.20 sec  
stress-ng: info:  [2208]                          4 Kmem Cache Alloc               0.07 sec  
stress-ng: info:  [2208]                          0 Kmem Cache Alloc Node          0.00 sec  
stress-ng: info:  [2208]                         60 Kmem Cache Free                0.99 sec  
stress-ng: info:  [2208]                        768 MM Page Alloc                 12.70 sec  
stress-ng: info:  [2208]                          4 MM Page Free                   0.07 sec  
stress-ng: info:  [2208]                    118,160 RCU Utilization                1.95 K/sec
stress-ng: info:  [2208]                          0 Sched Migrate Task             0.00 sec  
stress-ng: info:  [2208]                          0 Sched Move NUMA                0.00 sec  
stress-ng: info:  [2208]                        304 Sched Wakeup                   5.03 sec  
stress-ng: info:  [2208]                          4 Signal Generate                0.07 sec  
stress-ng: info:  [2208]                          4 Signal Deliver                 0.07 sec  
stress-ng: info:  [2208]                          0 IRQ Entry                      0.00 sec  
stress-ng: info:  [2208]                          0 IRQ Exit                       0.00 sec  
stress-ng: info:  [2208]                     59,708 Soft IRQ Entry               987.73 sec  
stress-ng: info:  [2208]                     59,708 Soft IRQ Exit                987.73 sec  
stress-ng: info:  [2208]                          0 Writeback Dirty Inode          0.00 sec  
stress-ng: info:  [2208]                          0 Writeback Dirty Page           0.00 sec  
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Fix misleading core warning for AMD processors with modules

Post by scottgus1 »

It has been reported on the forums that benchmarks don't report properly when run inside a guest. The timers and such they use aren't reliably checked so the results can be off. The only way to accurately test a guest's performance is to run an intensive calculation, like a billion digits of pi or video transcoding or some such, and time it with a stopwatch. (Run the same calculation on the host without a guest running, for a baseline. Run the same test multiple times to average results.)

Virtualbox does not count hyperthreads as cores. It has been found that hyperthreads don't help the running of the guest OS. (What other hypervisors do is of course not known or monitored by Virtualbox.)

If these changes to your testing don't help you understand the results, then maybe there is a bug? After accounting for the above testing restrictions, if you still see the same results, try posting the results on the Bugtracker.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Fix misleading core warning for AMD processors with modules

Post by mpack »

yurtesen wrote:(yes it is a 2 module 4 core processor)
No, it isn't.

A core is a standalone processor. If you put two standalone processors in one package we say it has two cores. Hyperthreads are not cores. The distingushing feature of a core is that it doesn't have to share anything with another core unless it needs to access an external peripheral.

"Module" is meaningless. Marketing gibberish.

http://www.theregister.co.uk/2015/11/06/amd_sued_cores/
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Fix misleading core warning for AMD processors with modules

Post by socratis »

I'd like to see some tests where each of the 4 threads in your guest performs intensive I//O. Independently of course so that each one runs at the maximum I/O capabilities.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Fix misleading core warning for AMD processors with modules

Post by Perryg »

Not to mention that if you have an AMD that says quad ( 4 core ) it more than likely is a duo core with hyperthreading. Look it up "amd being sued over core count". AMD is being sued for this as we speak.

Look in the log file and you will see that VBox does not use what the OS says it reads the CPU and runs a test to see.

Simple issue with running more cores is they require more overhead and must be taken into account.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Fix misleading core warning for AMD processors with modules

Post by mpack »

Actually, I/O would be a poor choice for benchmarking, since that involves off chip accesses to bulk memory, which mandates arbitration even if it was two completely independant CPU packages.

A better choice would be, say, FPU benchmarks, though I'd have to know more about the architecture of an AMD core (a real one, not the obfuscated faux feature).
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Fix misleading core warning for AMD processors with modules

Post by socratis »

Perryg wrote:Look it up "amd being sued over core count". AMD is being sued for this as we speak.
Don't say things like that, or you're going to hear it too: https://www.virtualbox.org/ticket/15774#comment:3
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Fix misleading core warning for AMD processors with modules

Post by socratis »

yurtesen wrote:Numbers don't lie, I ran tests
So did I, long time ago. I have 4 cores, 8 threads. The results are below (watch that I went up to 12 virtual cores). I STILL don't use (nor do I suggest) any more than 2 cores in ANY of my VMs. Numbers don't lie. Real use is not theory nor numbers.

Image
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Fix misleading core warning for AMD processors with modules

Post by scottgus1 »

Socratis, As I look at that graph it does look like pushing up into the hyperthreads provides improvement in processing. Am I seeing something wrong?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Fix misleading core warning for AMD processors with modules

Post by socratis »

scottgus1 wrote:Am I seeing something wrong?
No, you're not. It was a guest that did nothing but number crunching. The host was idle. You'll notice that it peaks at 8, the maximum number of threads available. Now, push it above that and the host cannot communicate with the guest process. Or itself. Even the mouse wouldn't move. Lots of context switching.

So, yes, up to a point the OP maybe correct, if you're doing nothing but number crunching. The VM can take advantage of all the threads.

BUT, in real life forget it. We've seen people's failures hundreds and hundreds of times over the years. That's why it's always recommended to use half your cores, or up to a Max-1 if you're adventurous.

The other thing is I'm not 100% sure that the number crunching program wasn't lying after all...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Fix misleading core warning for AMD processors with modules

Post by scottgus1 »

Thanks, Socratis! I might run a DVD-to-AVI transcode in a guest one day with increasing processors and see what happens.
yurtesen
Posts: 30
Joined: 29. Aug 2016, 09:14

Re: Fix misleading core warning for AMD processors with modules

Post by yurtesen »

@scottgus1 You don't need to run a benchmark which runs for hours to get results for processor performance. The test I run with sysbench finds 50000 prime numbers which is intensive enough because the runtime varies between 150seconds in 1 core to 27 seconds in 4 cores. If I run it longer, the times will simply multiply but the ratio will remain similar. It is irrelevant if the host/guest timers are off by milliseconds even by seconds. It will not make several seconds of mistake per minute. If the timer was off by 1 seconds per 30 seconds, it would only make a tiny difference in results. But you know it is not, otherwise you would have clock skew of several seconds per minute in vm and you know it that you dont have it.

Also the stress-ng does a bunch of things. Here is a list of operations it iterated over 60 seconds, and if it will make you believe, I can run it for longer period but as I mentioned the results will have the same ratios. So you think these operations are not CPU intensive enough?

Code: Select all

              Method           Description
              all              iterate over all the below cpu stress methods
              ackermann        Ackermann function: compute A(3, 10), where:
                                A(m, n) = n + 1 if m = 0;
                                A(m - 1, 1) if m > 0 and n = 0;
                                A(m - 1, A(m, n - 1)) if m > 0 and n > 0
              bitops           various bit operations from bithack, namely: reverse bits, parity check, bit count, round to nearest power of 2
              callfunc         recursively call 8 argument C function to a depth of 1024 calls and unwind
              cfloat           1000 iterations of a mix of floating point complex operations
              cdouble          1000 iterations of a mix of double floating point complex operations
              clongdouble      1000 iterations of a mix of long double floating point complex operations
              correlate        perform a 16384 × 1024 correlation of random doubles
              crc16            compute 1024 rounds of CCITT CRC16 on random data
              decimal32        1000 iterations of a mix of 32 bit decimal floating point operations (GCC only)
              decimal64        1000 iterations of a mix of 64 bit decimal floating point operations (GCC only)
              decimal128       1000 iterations of a mix of 128 bit decimal floating point operations (GCC only)
              dither           Floyd–Steinberg dithering of a 1024 × 768 random image from 8 bits down to 1 bit of depth.
              djb2a            128 rounds of hash DJB2a (Dan Bernstein hash using the xor variant) on 128 to 1 bytes of random strings
              double           1000 iterations of a mix of double precision floating point operations
              euler            compute e using n = (1 + (1 ÷ n)) ↑ n
              explog           iterate on n = exp(log(n) ÷ 1.00002)
              fibonacci        compute Fibonacci sequence of 0, 1, 1, 2, 5, 8...
              fft              4096 sample Fast Fourier Transform
              float            1000 iterations of a mix of floating point operations
              fnv1a            128 rounds of hash FNV-1a (Fowler–Noll–Vo hash using the xor then multiply variant) on 128 to 1 bytes of random strings
              gamma            calculate the Euler-Mascheroni constant γ using the limiting difference between the harmonic series (1 + 1/2 + 1/3 + 1/4 + 1/5 ... + 1/n) and the natural logarithm ln(n), for n = 80000.
              gcd              compute GCD of integers
              gray             calculate binary to gray code and gray code back to binary for integers from 0 to 65535
              hamming          compute Hamming H(8,4) codes on 262144 lots of 4 bit data. This turns 4 bit data into 8 bit Hamming code containing 4 parity bits. For data bits d1..d4, parity bits are computed as:
                                 p1 = d2 + d3 + d4
                                 p2 = d1 + d3 + d4
                                 p3 = d1 + d2 + d4
                                 p4 = d1 + d2 + d3
              hanoi            solve a 21 disc Towers of Hanoi stack using the recursive solution
              hyperbolic       compute sinh(θ) × cosh(θ) + sinh(2θ) + cosh(3θ) for float, double and long double hyperbolic sine and cosine functions where θ = 0 to 2π in 1500 steps
              idct             8 × 8 IDCT (Inverse Discrete Cosine Transform)
              int8             1000 iterations of a mix of 8 bit integer operations
              int16            1000 iterations of a mix of 16 bit integer operations
              int32            1000 iterations of a mix of 32 bit integer operations
              int64            1000 iterations of a mix of 64 bit integer operations
              int128           1000 iterations of a mix of 128 bit integer operations (GCC only)
              int32float       1000 iterations of a mix of 32 bit integer and floating point operations
              int32double      1000 iterations of a mix of 32 bit integer and double precision floating point operations
              int32longdouble  1000 iterations of a mix of 32 bit integer and long double precision floating point operations
              int64float       1000 iterations of a mix of 64 bit integer and floating point operations
              int64double      1000 iterations of a mix of 64 bit integer and double precision floating point operations
              int64longdouble  1000 iterations of a mix of 64 bit integer and long double precision floating point operations
              int128float      1000 iterations of a mix of 128 bit integer and floating point operations (GCC only)
              int128double     1000 iterations of a mix of 128 bit integer and double precision floating point operations (GCC only)
              int128longdouble 1000 iterations of a mix of 128 bit integer and long double precision floating point operations (GCC only)
              int128decimal32  1000 iterations of a mix of 128 bit integer and 32 bit decimal floating point operations (GCC only)
              int128decimal64  1000 iterations of a mix of 128 bit integer and 64 bit decimal floating point operations (GCC only)
              int128decimal128 1000 iterations of a mix of 128 bit integer and 128 bit decimal floating point operations (GCC only)
              jenkin           Jenkin's integer hash on 128 rounds of 128..1 bytes of random data
              jmp              Simple unoptimised compare >, <, == and jmp branching
              ln2              compute ln(2) based on series:
                                1 - 1/2 + 1/3 - 1/4 + 1/5 - 1/6 ...
              longdouble       1000 iterations of a mix of long double precision floating point operations
              loop             simple empty loop
              matrixprod       matrix product of two 128 × 128 matrices of double floats. Testing on 64 bit x86 hardware shows that this is provides a good mix of memory, cache and floating point operations and is probably the best
                               CPU method to use to make a CPU run hot.
              nsqrt            compute sqrt() of long doubles using Newton-Raphson
              omega            compute the omega constant defined by Ωe↑Ω = 1 using efficient iteration of Ωn+1 = (1 + Ωn) / (1 + e↑Ωn)
              parity           compute  parity  using  various methods from the Standford Bit Twiddling Hacks.  Methods employed are: the naïve way, the naïve way with the Brian Kernigan bit counting optimisation, the multiply way,
                               the parallel way, and the lookup table ways (2 variations).
              phi              compute the Golden Ratio ϕ using series
              pi               compute π using the Srinivasa Ramanujan fast convergence algorithm
              pjw              128 rounds of hash pjw function on 128 to 1 bytes of random strings
              prime            find all the primes in the range  1..1000000 using a slightly optimised brute force naïve trial division search
              psi              compute ψ (the reciprocal Fibonacci constant) using the sum of the reciprocals of the Fibonacci numbers

              queens           compute all the solutions of the classic 8 queens problem for board sizes 1..12
              rand             16384 iterations of rand(), where rand is the MWC pseudo random number generator.  The MWC random function concatenates two 16 bit multiply-with-carry generators:
                                x(n) = 36969 × x(n - 1) + carry,
                                y(n) = 18000 × y(n - 1) + carry mod 2 ↑ 16

                               and has period of around 2 ↑ 60
              rand48           16384 iterations of drand48(3) and lrand48(3)
              rgb              convert RGB to YUV and back to RGB (CCIR 601)
              sdbm             128 rounds of hash sdbm (as used in the SDBM database and GNU awk) on 128 to 1 bytes of random strings
              sieve            find the primes in the range 1..10000000 using the sieve of Eratosthenes
              sqrt             compute sqrt(rand()), where rand is the MWC pseudo random number generator
              trig             compute sin(θ) × cos(θ) + sin(2θ) + cos(3θ) for float, double and long double sine and cosine functions where θ = 0 to 2π in 1500 steps
              union            perform integer arithmetic on a mix of bit fields in a C union.  This exercises how well the compiler and CPU can perform integer bit field loads and stores.
              zeta             compute the Riemann Zeta function ζ(s) for s = 2.0..10.0

@mpack and @perryG If you use the word hyperthreading for AMD's modules then you clearly do not know the difference. They function totally differently.

Intel's hyperthreading depends on exactly same single core executing multiple operations in parallel using unused units. For example if you are doing integer and floating point operations simultaneously in 2 threads, you can benefit.
AMD's modules duplicate units which are used most often and it has nothing to do with hyperthreading. It shares floating point unit (even then both cores can access at simultaneously) but cores have their own integer, load store units etc. and a completely different design than hyperthreading. This is based on the fact that most of the time you are not doing floating point operations so you can save transistors.

https://en.wikipedia.org/wiki/Steamroll ... hitecture)
vs
https://en.wikipedia.org/wiki/Hyper-threading

I am not exactly sure how you seem to claim that you know what setting is better if you don't know the difference?

@socratis, what do you mean by I/O intensive? We are talking about performance setting of CPU cores not writing to hard drive or memory accesses etc. Suggest a test and we can discuss its relevance and I can run it.

@socratis, you put a graph but you don't show exactly how you obtained the values or what processor you were using? or what was this test exactly? what software did you use? Can you clarify? It is a random graph otherwise which is pointing to nothing.

In addition, you don't seem to grasp that even in ideal conditions with so called 'real cores' the test you run probably does not scale linearly and usually it does not because of other bottlenecks totally unrelated to cores themselves. For example you may be running a task which reads data from a drive or memory and you may saturate the total bandwidth. Which has nothing to do with per/core performance. So, in a normal situation while you may get better performance by simply increasing the number of cores, your test will tell you no this is not good, albeit incorrectly.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Fix misleading core warning for AMD processors with modules

Post by Perryg »

Very well. I do know something about this but in your case I will keep my comments to myself. Oh and there will be no corrections to the code on this matter because it is not wrong and nothing to fix unless you can actually prove it is. Speculations aside it must be hard proof.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Fix misleading core warning for AMD processors with modules

Post by socratis »

@yurtesen
Instead of trying to understand the logic behind those fine points of the inner workings of VirtualBox from us, simple users, please see the following: https://www.virtualbox.org/mailman/listinfo/vbox-dev
Have a nice day.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
yurtesen
Posts: 30
Joined: 29. Aug 2016, 09:14

Re: Fix misleading core warning for AMD processors with modules

Post by yurtesen »

I gave you results of cpu intensive benchmarks, you refuse them and your response is you know it better but you wont tell? And you keep talking about hyperthreading while this whole thing has nothing to do with it.

You put an image of some benchmark but you can't even tell how you made the benchmark or on which processor so nobody can verify your results. If you can't even answer a simple question, I don't know what to say....

You claim this is not a good way to benchmark, but you can't tell what is better way to test this. I was open to accept proposals and even use my time to run them.

Instead you are making a blank refusal claiming you are correct just because you are saying so. Very respectable...
Post Reply