utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.4k stars 1.32k forks source link

Stop put the -accel options in the global preferences #2631

Closed YLinXin closed 3 years ago

YLinXin commented 3 years ago
Screenshot 2021-06-23 at 12 24 49 AM

the acceleration preference which defaults add option '-accel hvf' in the front of '-accel tcg,tb-size=2560' to use native hypervisor framework. but it causes issue EFI stub: ERROR: This 64 KB granular kernel is not supported by your CPU

I have multi guest OS, the most can normally boot into system powered by the native hypervisor but only one.

so if i want the only one can normally boot i must only check the global disable acceleration preference.

then the most guest OS run just 10x slower:
Mac native QEMU -accel hvf -accel tcg,tb-size=2560 +/-
34893 29002 83%
Mac native QEMU -accel tcg,tb-size=2560 +/-
34893 3188 9%
QEMU -accel hvf -accel tcg,tb-size=2560 QEMU -accel tcg,tb-size=2560 +/-
29002 3188 11%
macOS native:
7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,8 CPUs LE)

LE
CPU Freq:  1420  2264  2803  3120  3196  3183  3190  3189  3190

RAM size:   16384 MB,  # CPU hardware threads:   8
RAM usage:   1765 MB,  # Benchmark threads:      8

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:      41972   753   5425  40831  |     338644   779   3707  28885
23:      39073   743   5359  39811  |     334176   780   3708  28919
24:      37823   749   5430  40668  |     328762   780   3699  28855
25:      37137   770   5507  42402  |     323305   779   3693  28773
----------------------------------  | ------------------------------
Avr:             754   5430  40928  |              780   3702  28858
Tot:             767   4566  34893

========================================================================================================================

QEMU Ubuntu 21.04 arm64 -accel tcg,tb-size=2560: 
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs LE)

LE
CPU Freq: 1361702 32000000 32000000 64000000 64000000 128000000 512000000 1024000000 1024000000

RAM size:    9928 MB,  # CPU hardware threads:   8
RAM usage:   1765 MB,  # Benchmark threads:      8

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:       2672   556    468   2600  |      46720   567    703   3985
23:       2272   559    414   2315  |      46297   572    701   4006
24:       2229   572    419   2397  |      44927   569    693   3943
25:       2142   578    423   2446  |      42850   573    666   3814
----------------------------------  | ------------------------------
Avr:             566    431   2439  |              570    691   3937
Tot:             568    561   3188

========================================================================================================================

QEMU Ubuntu 21.04 arm64 -accel hvf -accel tcg,tb-size=2560:
7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs LE)

LE
CPU Freq: - - - - - - 512000000 - -

RAM size:    9928 MB,  # CPU hardware threads:   8
RAM usage:   1765 MB,  # Benchmark threads:      8

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:      34094   753   4403  33167  |     298911   768   3320  25496
23:      32140   760   4310  32748  |     297351   780   3301  25732
24:      30135   755   4289  32401  |     285997   766   3277  25102
25:      28230   760   4239  32232  |     282432   773   3252  25135
----------------------------------  | ------------------------------
Avr:             757   4310  32637  |              772   3287  25366
Tot:             764   3799  29002

I think '-accel hvf' can be put into guest instance preferences and make it effective default.

conath commented 3 years ago

I agree! Duplicate of #2493