Integrated vs. dedicated GPU performace

Hello!
When I run glxgears with integrated video (Radeon Vega on Ryzen 5) I have 5700 frames. But when I launch glxgears with DRI_PRIME=1 (Radeon RX560X), I had only 1070 frames. Why so? I'm trying to play Albion Online with DRI_PRIME=1, and at the first I have 50-70 fps, but after 5-10 minutes it falls to 5-15 fps. Can someone help me?

$ env vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
5585 frames in 5.0 seconds = 1116.885 FPS
5763 frames in 5.0 seconds = 1152.574 FPS
5770 frames in 5.0 seconds = 1153.964 FPS
5739 frames in 5.0 seconds = 1147.705 FPS
5761 frames in 5.0 seconds = 1152.054 FPS
5735 frames in 5.0 seconds = 1146.976 FPS
$ env vblank_mode=0 DRI_PRIME=1 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
1034 frames in 5.0 seconds = 206.706 FPS
1071 frames in 5.0 seconds = 214.077 FPS
1070 frames in 5.0 seconds = 213.843 FPS
1070 frames in 5.0 seconds = 213.982 FPS
1069 frames in 5.0 seconds = 213.761 FPS
1068 frames in 5.0 seconds = 213.548 FPS
$ DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Radeon RX 560 Series (POLARIS11, DRM 3.35.0, 5.4.52-1-MANJARO, LLVM 10.0.0)
$ glxinfo | grep "OpenGL renderer"
OpenGL renderer string: AMD RAVEN (DRM 3.35.0, 5.4.52-1-MANJARO, LLVM 10.0.0)
$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x55 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 name:Unknown AMD Radeon GPU @ pci:0000:05:00.0
Provider 1: id: 0x84 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 5 outputs: 0 associated providers: 1 name:Radeon RX 560 Series @ pci:0000:01:00.0

I'm reinstalled manjaro with open video drivers and now got this:

$ env vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
26313 frames in 5.0 seconds = 5262.560 FPS
36266 frames in 5.0 seconds = 7253.196 FPS
33439 frames in 5.0 seconds = 6687.791 FPS
28340 frames in 5.0 seconds = 5667.981 FPS
26361 frames in 5.0 seconds = 5272.119 FPS
29532 frames in 5.0 seconds = 5906.286 FPS
25511 frames in 5.0 seconds = 5102.113 FPS
24526 frames in 5.0 seconds = 4905.064 FPS
26320 frames in 5.0 seconds = 5263.972 FPS
30264 frames in 5.0 seconds = 6052.690 FPS
$ DRI_PRIME=1 env vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
18874 frames in 5.0 seconds = 3773.235 FPS
19299 frames in 5.0 seconds = 3859.729 FPS
19366 frames in 5.0 seconds = 3873.185 FPS
19335 frames in 5.0 seconds = 3866.881 FPS
19398 frames in 5.0 seconds = 3879.583 FPS
19341 frames in 5.0 seconds = 3868.135 FPS
19387 frames in 5.0 seconds = 3877.364 FPS
19374 frames in 5.0 seconds = 3874.145 FPS
19405 frames in 5.0 seconds = 3880.906 FPS

Why dedicated GPU produced less frames than integrated?
The Albion Online still behaves the same way. With DRI_PRIME=1 at first I have 50-70 FPS in 5 minutes it felt to 10-15.

After some tests I find out that it is temperature issue. But as I got heating the integrated card. Why so?

Before I launch game:

$ sensors
amdgpu-pci-0500
Adapter: PCI adapter
vddgfx:           N/A  
vddnb:            N/A  
edge:         +42.0°C  (crit = +80.0°C, hyst =  +0.0°C)

asus-isa-0000
Adapter: ISA adapter
cpu_fan:     3400 RPM

BAT0-acpi-0
Adapter: ACPI interface
in0:          11.85 V  

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +43.0°C  (crit = +120.0°C)

amdgpu-pci-0100
Adapter: PCI adapter
vddgfx:           N/A  
edge:             N/A  (crit = +94.0°C, hyst = -273.1°C)
power1:           N/A  (cap =  48.00 W)

k10temp-pci-00c3
Adapter: PCI adapter
Tdie:         +42.5°C  (high = +70.0°C)
Tctl:         +42.5°C  

After 10 minutes and right before frame rate degraded:

$ sensors
amdgpu-pci-0500
Adapter: PCI adapter
vddgfx:           N/A  
vddnb:            N/A  
edge:         +82.0°C  (crit = +80.0°C, hyst =  +0.0°C)

asus-isa-0000
Adapter: ISA adapter
cpu_fan:     5200 RPM

BAT0-acpi-0
Adapter: ACPI interface
in0:          11.85 V  

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +84.0°C  (crit = +120.0°C)

amdgpu-pci-0100
Adapter: PCI adapter
vddgfx:        1.04 V  
edge:         +74.0°C  (crit = +94.0°C, hyst = -273.1°C)
power1:       24.16 W  (cap =  48.00 W)

k10temp-pci-00c3
Adapter: PCI adapter
Tdie:         +82.8°C  (high = +70.0°C)
Tctl:         +82.8°C

Because Glxgears is not a Benchmark, actuial gameplay should tell you that the discrete card is way faster than the integrated one.

I had an overheating issue. But when I had update my kernel to 5.7 and this solved the problem! After 40 minutes in game the temperature of GPU was about 60-70 °C and FPS in Dota Underlords was about 120.

Forum kindly sponsored by