fbelavenuto / arpl

Automated Redpill Loader
GNU General Public License v3.0
7.17k stars 1.54k forks source link

Slow virtual machines in VMM #260

Open upais opened 1 year ago

upais commented 1 year ago

The problem was described on the forum: https://xpenology.com/forum/topic/63486-automated-redpill-loader-arpl/?do=findComment&comment=339801 https://xpenology.com/forum/topic/63486-automated-redpill-loader-arpl/?do=findComment&comment=340076 https://xpenology.com/forum/topic/63486-automated-redpill-loader-arpl/?do=findComment&comment=344327

The important thing here is that there is no problem through TCRP.

I checked it on my hardware, made two bootloaders: 1) ARPL v0.5-alpha1 - DVA3221 (7.1.1-42962) All modules, but network driver only R8125 2) tinycore-redpill.v0.9.2.7 - DVA3221 (7.1.1-42962) Additions only: ext denverton-7.1.1-42962 add https://raw.githubusercontent.com/pocopico/rp-ext/master/redpill-acpid/rpext-index.json ext denverton-7.1.1-42962 add https://raw.githubusercontent.com/pocopico/rp-ext/main/r8125/rpext-index.json

Hardware configuration: ASUS TUF GAMING B560-PLUS Core i5 11400 r8125

Installed virtual machine Windows 10, 2 cpu, 4GB of memory, storage on HDD.

In the case of TCRP, the virtual machine starts up and runs quickly, it is comfortable to work. RDP and console. Crystal Disk Mark test result: TCRL_1

In the case of ARPL, the virtual machine starts up for a very long time, the GUI slows down, it is impossible to work. Crystal Disk Mark test result: APRL_1

Between the tests, no changes, I just changed the USB flash drive with the bootloader. The problem is not only with Windows, but slow work is also noticeable with other OS. Ready to conduct any tests on both bootloaders.

Brian099 commented 1 year ago

I have take a whole morning to install a Windows 11 in the VMM, with arpl loader..., But it finished soon with simplified Windows 7

upais commented 1 year ago

Yes, Windows installation took a long time too, about an hour.

SanKen commented 1 year ago

Not only windows but tested on TrueNAS and the same problem. Very Slow install and response. It is not known why LOADAVG jumps to 5-6.

CPU usage 1-4% but load 1min 1.6 very strange CPU i5-6500T

fbelavenuto commented 1 year ago

@Blayven , is possible to execute a command via SSH into your DSM? The command is: lspci -nnk

upais commented 1 year ago

@fbelavenuto Yes, sure. I am ready to test to the best of my knowledge.

TCRP:

NAS:~$ lspci -nnk
00:00.0 Class [0600]: Device [8086:4c53] (rev 01)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:01.0 Class [0604]: Device [8086:4c01] (rev 01)
        Kernel driver in use: pcieport
00:14.0 Class [0c03]: Device [8086:43ed] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
        Kernel driver in use: xhci_hcd
00:14.2 Class [0500]: Device [8086:43ef] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:14.3 Class [0280]: Device [8086:43f0] (rev 11)
        DeviceName: Onboard - Ethernet
        Subsystem: Device [8086:0074]
00:15.0 Class [0c80]: Device [8086:43e8] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:16.0 Class [0780]: Device [8086:43e0] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:17.0 Class [0106]: Device [8086:43d2] (rev 11)
        DeviceName: Onboard - SATA
        Subsystem: Device [1043:8694]
        Kernel driver in use: ahci
00:1b.0 Class [0604]: Device [8086:43c4] (rev 11)
        Kernel driver in use: pcieport
00:1c.0 Class [0604]: Device [8086:43bc] (rev 11)
        Kernel driver in use: pcieport
00:1d.0 Class [0604]: Device [8086:43b0] (rev 11)
        Kernel driver in use: pcieport
00:1d.3 Class [0604]: Device [8086:43b3] (rev 11)
        Kernel driver in use: pcieport
00:1f.0 Class [0601]: Device [8086:4387] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:1f.3 Class [0403]: Device [8086:43c8] (rev 11)
        DeviceName: Onboard - Sound
        Subsystem: Device [1043:881a]
00:1f.4 Class [0c05]: Device [8086:43a3] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:1f.5 Class [0c80]: Device [8086:43a4] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
01:00.0 Class [0300]: Device [10de:1f82] (rev a1)
        Subsystem: Device [10de:1f82]
        Kernel driver in use: nvidia
01:00.1 Class [0403]: Device [10de:10fa] (rev a1)
        Subsystem: Device [10de:1f82]
02:00.0 Class [0108]: Device [126f:2263] (rev 03)
        Subsystem: Device [126f:2263]
        Kernel driver in use: nvme
05:00.0 Class [0200]: Device [10ec:8125] (rev 04)
        Subsystem: Device [1043:87d7]
        Kernel driver in use: r8125

ARPL beta 2, from Realtek network drivers only r8125

@NAS:~$ lspci -nnk
00:00.0 Class [0600]: Device [8086:4c53] (rev 01)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:01.0 Class [0604]: Device [8086:4c01] (rev 01)
        Kernel driver in use: pcieport
00:14.0 Class [0c03]: Device [8086:43ed] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
        Kernel driver in use: xhci_hcd
00:14.2 Class [0500]: Device [8086:43ef] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:14.3 Class [0280]: Device [8086:43f0] (rev 11)
        DeviceName: Onboard - Ethernet
        Subsystem: Device [8086:0074]
00:15.0 Class [0c80]: Device [8086:43e8] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:16.0 Class [0780]: Device [8086:43e0] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:17.0 Class [0106]: Device [8086:43d2] (rev 11)
        DeviceName: Onboard - SATA
        Subsystem: Device [1043:8694]
        Kernel driver in use: ahci
00:1b.0 Class [0604]: Device [8086:43c4] (rev 11)
        Kernel driver in use: pcieport
00:1c.0 Class [0604]: Device [8086:43bc] (rev 11)
        Kernel driver in use: pcieport
00:1d.0 Class [0604]: Device [8086:43b0] (rev 11)
        Kernel driver in use: pcieport
00:1d.3 Class [0604]: Device [8086:43b3] (rev 11)
        Kernel driver in use: pcieport
00:1f.0 Class [0601]: Device [8086:4387] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:1f.3 Class [0403]: Device [8086:43c8] (rev 11)
        DeviceName: Onboard - Sound
        Subsystem: Device [1043:881a]
00:1f.4 Class [0c05]: Device [8086:43a3] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
00:1f.5 Class [0c80]: Device [8086:43a4] (rev 11)
        DeviceName: Onboard - Other
        Subsystem: Device [1043:8694]
01:00.0 Class [0300]: Device [10de:1f82] (rev a1)
        Subsystem: Device [10de:1f82]
        Kernel driver in use: nvidia
01:00.1 Class [0403]: Device [10de:10fa] (rev a1)
        Subsystem: Device [10de:1f82]
02:00.0 Class [0108]: Device [126f:2263] (rev 03)
        Subsystem: Device [126f:2263]
        Kernel driver in use: nvme
05:00.0 Class [0200]: Device [10ec:8125] (rev 04)
        Subsystem: Device [1043:87d7]
        Kernel driver in use: r8125
SanKen commented 1 year ago

I have one more add-on to fix the problem. I don't know what the connection is, but ARPL. Does not use freq scalling only basic frequency. Tested J3455 and 6500T. The processor is not used to its full power. That's why the loadavg jumps so fast.

Brian099 commented 1 year ago

I have one more add-on to fix the problem. I don't know what the connection is, but ARPL. Does not use freq scalling only basic frequency. Tested J3455 and 6500T. The processor is not used to its full power. That's why the loadavg jumps so fast.

ASrock J3455 do not support linux loading, one feature should be added to bios, then it will bootup quickly. here is the soluation: https://xpenology.com/forum/topic/63876-j3455-xpenology-slow-boot-solution/

if you can read Chinese, this will be help. https://wp.gxnas.com/12338.html

fbelavenuto commented 1 year ago

Closing, if the problem persists please reopen.

upais commented 1 year ago

Closing, if the problem persists please reopen.

The problem is actual. But I haven't tested on the latest ARPL version

fbelavenuto commented 1 year ago

Okay, did you try Brian099's suggestion?

upais commented 1 year ago

Okay, did you try Brian099's suggestion?

But there we are talking about ASrock J3455, and I have a Core i5 11400.

I plan to try the latest version of ARPL this week.

upais commented 1 year ago

I had to install DSM again on a blank disk. Installed via beta9. Installing Windows 10 took about 1 hour. Works very slowly. Tried to install debian 11, waited 30+ minutes and canceled, no more time to experiment.

Installing Debian 11 on DSM via TCRP took approximately 15 minutes. And it works fast. Same thing with Windows 10.

The problem is relevant.

upais commented 1 year ago

@fbelavenuto Found out an interesting point. I built the TCRP bootloader with the withfriend option (./rploader.sh build dva3221-7.1.1-42962 withfriend) and got exactly the same problem - the virtual machines are very slow. If I load without this option, then everything works fine. Checked several times, TCRP allows you to simply reboot with and without this option.

It looks like ARPL and the withfriend option have something in common.

fbelavenuto commented 1 year ago

Hi, please test ARPL direct boot (advanced menu). Enable this and try again.

upais commented 1 year ago

Right?

1. Build the loader
2. Advanced menu -> Switch direct boot: true
3. Boot the loader

The problem remains.

nemesis122 commented 1 year ago

Hi The issue is releated to the LOW cpu frequencies Acpid Module and this issue persist with ARPL and TCRP Friends. and is also present with direct-boot you can check this with .

1) create 3615 and check the performance in your VMM 2) or creeate en other 918 3622 etc and open ssh with putty connect to your DSM as root and putt this line and check again

modprobe acpi-cpufreq && echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

let me know your result BR Michael

nemesis122 commented 1 year ago

Have a look

Consumption in this case go every time with this High Freq enabled because Idle is the same consumption and much more power

xeon 1240v2 gen8 Microserver 4x6tb raid 0 16Gb RAM with high freq idle 52 watt full 94 watt score 784 Single-Core Score 3238 Multi-Core Score

xeon 1240v2 without freq idle 54 watt full 68 watt score 373 Single-Core Score 1659 Multi-Core Score

Edited December 31, 2022 by nemesis122

https://xpenology.com/forum/topic/65408-automated-redpill-loader-arpl/?do=findComment&comment=418927

upais commented 1 year ago

Didn't have a chance to test in detail. But the solution is: https://xpenology.com/forum/topic/65408-automated-redpill-loader-arpl/?do=findComment&comment=415282 It didn’t solve my problem, perhaps the DVA3221 has some kind of feature in this regard. 2023-01-08_21-37-47

fbelavenuto commented 1 year ago

Please test one more time, update the addons, rebuild the loader and test it.

upais commented 1 year ago

New flash drive, new beta9 the loader, all updates from the menu. Could not start DSM, appears on the network for 1 second, then disappears. Restarted 3 times. This problem is reported on the forum and beta3 is recommended without updating modules. My previous test is also a new build of the beta9 the loader, but without updates, DSM loaded the first time.

I tried TCRP Friends and run the command - it didn’t help either, the virtual machine is running slowly, and the CPU usage is 1-2%.

They also write that there is no problem on DVA3221+ i5-11400 (I have the same thing). But no details here: https://xpenology.com/forum/topic/65408-automated-redpill-loader-arpl/?do=findComment&comment=418040

Brian099 commented 1 year ago

Try Windows 7 32bit, please. I built a simpled Windows 7, in sata ssd, test 400M+ read and write. Is it possible because MBR OR GPT? All I guess,^-^

upais commented 1 year ago

Try Windows 7 32bit, please. I built a simpled Windows 7, in sata ssd, test 400M+ read and write. Is it possible because MBR OR GPT? All I guess,^-^

What does it solve? I don't need win7. And the problem is not in the OS.

Brian099 commented 1 year ago

Try Windows 7 32bit, please. I built a simpled Windows 7, in sata ssd, test 400M+ read and write. Is it possible because MBR OR GPT? All I guess,^-^

What does it solve? I don't need win7. And the problem is not in the OS.

Win10 slow, win7 not on my Nas, J4105 with 8G DDR4

upais commented 1 year ago

Try Windows 7 32bit, please. I built a simpled Windows 7, in sata ssd, test 400M+ read and write. Is it possible because MBR OR GPT? All I guess,^-^

What does it solve? I don't need win7. And the problem is not in the OS.

Win10 slow, win7 not on my Nas, J4105 with 8G DDR4

She hardly works at all. Everything opens very slowly (explorer opens about 1 minute!!!). Above, I wrote that the installation of Debian was very long and I never waited for it.

fbelavenuto commented 1 year ago

Hi, please go to loader, update addons and modules, go to advanced and select all modules (necessary because a bug), rebuild the loader and test it.

upais commented 1 year ago

Hi, please go to loader, update addons and modules, go to advanced and select all modules (necessary because a bug), rebuild the loader and test it.

Does not work. DSM won't load. And here's the thing, the driver for the r8125 disappeared. 2023-01-10_19-01-45

fbelavenuto commented 1 year ago

Oh, I'm sorry, I added the r8125, you can update the modules again and select it.

upais commented 1 year ago

Helped, thanks! Checked on Beta10 still works slowly. The forum asked for some checks, so as not to duplicate, look: https://xpenology.com/forum/topic/65408-automated-redpill-loader-arpl/?do=findComment&comment=432207

As a result, the difference is not big. But reading and writing to HDD are very different.

fbelavenuto commented 1 year ago

Please update ARPL, reboot, update modules, addons and lkm, rebuild the loader and test it.

upais commented 1 year ago

DSM does not start, appears on the network for 1-2 seconds and disappears. Built the loader 2 times, all updates are done, all modules are selected, r8125 is present.

fbelavenuto commented 1 year ago

Ok, is possible to burn a stick with the latest image?

upais commented 1 year ago

In both cases, I burned new flash drives with the beta11 the loader. Or did I misunderstand the question?

fbelavenuto commented 1 year ago

Sorry for the language difficult. Please, burn your usb stick with the arpl.img.

upais commented 1 year ago

I did it. For convenience, I always record a new image.
Or have you already fixed something?

upais commented 1 year ago

Sorry, didn't notice the update to beta11a. Recorded a new image beta11a. The same thing, DSM does not load, does not appear on the network.

fbelavenuto commented 1 year ago

I did it. For convenience, I always record a new image. Or have you already fixed something?

Reburn is the best option. Some people prefer to upgrade so they don't have to redo everything, so there's that option too.

fbelavenuto commented 1 year ago

The same thing, DSM does not load, does not appear on the network.

The slowness problem is solved, now let's investigate the r8125 module problem. I recompiled the module using the latest version from Realtek.

upais commented 1 year ago

Does not work :( I recorded two images (all updates), in the last of the Realtek I left only r8125

upais commented 1 year ago

I found the monitor, I can send some diagnostics, if relevant. The IP address receives, 4-5 packets pass and that's it. IMG_0115