A KDE Plasma session performance comparison based on X11 and Wayland

Igor Ljubuncic, who until 2024 was responsible for high-performance computing products at Canonical, conducted a performance and energy consumption test of KDE Plasma 6.4 sessions based on X11 and Wayland. At the end of June, Igor published a review of KDE Plasma 6.4 capabilities, concluding that the Wayland session lags in performance and places a greater load on the CPU and GPU than the X11 session. In a series of new articles, Igor aimed to further test the performance of both sessions.

It was initially noted that when testing on a Lenovo IdeaPad 3 laptop with an integrated AMD GPU, the CPU in the Wayland session was constantly loaded at about 8% regardless of activity, with spikes occurring every 2-3 seconds that fully loaded the GPU. In the X11 session, the load on the CPU and GPU during idle was zero. Further checking with the radeontop utility showed greater resource consumption in the Wayland session, especially when the 'Color Accuracy' profile was enabled in the display settings. The table below lists the average GPU load percentages created with a similar set of running applications and data collection every second over a 60-second period.

Metric Wayland + power efficiency Wayland + color accuracy X11 Graphics pipe 3.31 4.03 2.47 Vertex Grouper + Tesselator 0.33 0.3 0.11 Texture Addresser 0.90 2.03 0.78 Shader Export 2.24 3.03 1.42 Sequencer Instruction Cache 0.06 0.08 0.03 Shader Interpolator 2.58 3.31 1.61 Scan Converter 2.54 3.18 1.54 Primitive Assembly 0.32 0.30 0.11 Depth Block 2.51 3.18 1.53 Color Block 2.51 3.18 1.54 VRAM 26.39 28.44 22.36 GTT 3.92 3.98 3.85 Memory Clock 33.33 54.90 54.81 Shader Clock 16.67 16.67 16.67

Power consumption tests using the powertop utility also showed an advantage for the X11 session: the energy consumption of the Wayland session during multiple samples was 6.09 watts, Wayland with the 'Color Accuracy' profile 6.05-6.08 watts, while X11 was 5.67-5.87 watts. Overall, it was concluded that the X11 session consumes 3-7% less battery charge than Wayland.

A CPU load test with the vmstat utility showed that during idle time, the X11 session consumed 1.83% of CPU, while Wayland used 1.97% (2.1% with the Color Accuracy profile). The utility was run on newly created sessions in the Konsole terminal, calculating the average value with a per-second sampling over 60 seconds. The CPU load when using Wayland was 7.6% higher (14% in Color Accuracy mode) than when using the X11 session. The Wayland session recorded 25% more interrupts and 48% more context switches.

Metrika Wayland + energiatakarékosság Wayland + színpontosság X11 Futási sor átlagos feladatainak száma 0.18 0.35 0.07 Futási sorban lévő összes feladat 11 21 4 Megszakítások (bemenő) 1188 1173 937 Kontextus váltások (cs) 1195 1208 803 Tartózkodás CPU % (id) 98.03 97.90 98.17

A továbbiakban a perf eszközzel elemzés készült az idle állapot alatti hívásokról. A KWin_wayland körülbelül 1% (1.5%) CPU időt használt, míg a KWin_X11 csak 0.44%-ot. Az amdgpu-ra vonatkozó hívások 0.77% (1%) voltak Wayland esetében és 0.65% X11 esetében. Az X11 session alatt körülbelül kétszer annyi CPU utasítást hajtottak végre, mint a Wayland alapú session alatt.

Metrika Wayland + energiatakarékosság Wayland + színpontosság X11 CPU órajel (ms) ~543,000 ~540,000 ~527,000 Kontextus váltások 14,415 | 26.547/s 16,120 | 29.864/s 6,021 | 11.436/s CPU migrációk 72 | 0.133/s 139 | 0.258/s 92 | 0.175/s Lap hibák 201 | 0.37/s 450 | 0.834/s 75 | 0.142/s Ciklusok 3.95B | 0.007 GHz 4.43B | 0.008 GHz 1.9B | 0.004 GHz Elakadások frontoldalon 452.5M | 11.47% 616.5M | 13.92% 213M | 11.13% Elakadások hátoldalon 1.42B | 36.04% 1.45B | 32.82% 618M | 32.28% Utasítások 780M | 0.2/ciklus 1.82 elakadás/ciklus 901M | 0.2/ciklus 1.61 elakadás/ciklus 483M | 0.25/ciklus 1.28 elakadás/ciklus Ágak 168M | 309K/s 193M | 358K/s 104M | 197K/s Ágak hibái 13.83% 13.36% 11.7%

A következő cikkben a teszteket megismételték a Kubuntu 24.04 konfigurációjában, KDE Plasma 5.27-tel és egy Lenovo Y50-70 laptopon Intel CPU-val és NVIDIA grafikus kártyával. Az eredmények körülbelül ugyanolyanok voltak - a Wayland session kevesebb hatékony volt, mint az X11. Az energiafogyasztás 22.42 watt Wayland esetén és 21.86 watt X11 esetén, a CPU terhelés idle állapotban 0.067 volt szemben a 0.050-nal, a kontextusváltások száma 43.835/s volt a 34.133/s ellenében, a 4K videó megtekintésének terhelése a VLC-ben 12.54% volt a 4.26%-kal szemben, a WebGL teljesítménye pedig 16 FPS volt a 29 FPS ellenében.

A hasonló teszteket a Lenovo IdeaPad 3 laptopon végezték, AMD CPU/GPU-val, a KDE Neon projekt friss kiadásának felhasználásával. A 4K video lejátszási teszt során az X11 használatával, kikapcsolt kompozitálással a CPU terhelés 3,72% volt, X11 kompozitálással 9,8%, Wayland színpontossággal (CA) 25,71%, Wayland energiahatékony üzemmódban (PE) pedig 31,51%. Így a Wayland használatával a CPU terhelés 8-10-szer magasabb volt, mint az X11 esetében.

Wayland használata során 5-16%-kal nagyobb megszakítási generálást is észleltek. A GPU terhelésében 2%-os különbségeket tapasztaltunk: Wayland (PE) – 56,33%, Wayland (CA) – 57,33%, X11 (Comp ON) – 57,98%, X11 (Comp OFF) – 56,81%. Energiafogyasztás szempontjából a Wayland 8-49%-kal több energiát használt: Wayland (PE) – 13,8-20,4 watt, Wayland (CA) – 13,8-14,1 watt, X11 (Comp ON) – 10,7-12,1 watt, X11 (Comp OFF) – 11,4-14,9 watt. A WebGL Aquarium teszt során Wayland és X11 eredményei körülbelül azonosak voltak: Wayland (PE) – 16-38 FPS, Wayland (CA) – 18-37 FPS, X11 (Comp ON) – 16-42 FPS, X11 (Comp OFF) – 21-42 FPS, de a Wayland használata során az energiafogyasztás körülbelül 8%-kal magasabb volt.

Végül egy újabb kísérletet végeztek, ezúttal a Fedora 42 GNOME és a KDE Plasma 6.4 vagy KDE neon összehasonlításával. A tesztet a Lenovo IdeaPad 3 laptopon végezték, AMD CPU/GPU-val.

  • CPU terhelés álló helyzetben: KDE X11 – 1,83%, KDE Wayland (PE) – 1,97%, KDE Wayland (CA) – 2,1%, GNOME Wayland – 2,2%.
  • Energiafogyasztás álló helyzetben egy terminál ablak használatával: KDE X11 – 5,67-5,87 watt, KDE Wayland (CA) – 6,05-6,08 watt, KDE Wayland (PE) – 6,09 watt, GNOME Wayland – 5,83-7,62 watt.
  • A GPU terhelés álló helyzetben a GNOME Wayland konfigurációban volt a legalacsonyabb, de a különbséget a futó alkalmazások között eltérő System Monitor és GNOME System Monitor magyarázza.
  • A perf segédprogram által gyűjtött statisztikák alapján a legkevesebb CPU időt a GNOME-alapú konfigurációban használták.
  • A 4K 60FPS video lejátszási teszt során a GNOME session Fedora alatt kicsit kevesebb CPU-t használt (29,6%), mint a színpontosság (CA) üzemmódban futó Wayland alapú KDE (31,51%), de többet, mint a X11 alapú KDE session (9,8%) és a Wayland energiahatékony üzemmód (25,71%).
  • A GPU resource consumption assessment in GNOME on Fedora showed that during 4K 60FPS video playback in VLC, GPU resources were more heavily used. For instance, the GPU pipeline load in GNOME on Fedora was 58.21%, on Wayland-based KDE it was 56.33% and 57.33%, while in KDE X11 it was 57.98%. Video memory consumption in GNOME on Fedora exceeded that of Wayland-based KDE by more than double (50.89) and was 15% higher than KDE X11 (44.36).
  • Energy consumption during video playback: KDE X11 — 11.4-14.9 watts, KDE Wayland (CA) — 13.8-14.1 watts, GNOME Wayland — 12.5-15.6 watts, KDE Wayland (PE) — 13.8-20.4 watts.

Metric Fedora 42 Wayland KDE neon Wayland (PE) KDE neon Wayland (CA) KDE neon X11 (Comp ON) Idle CPU % (id) 97.8 98.03 97.90 98.17 Context switches (cs) 536 1195 1208 803 Interrupts (in) 929 1188 1173 937 Energy consumption (watts) 5.83-7.62 6.09 6.05-6.08 5.67-5.87 CPU clock (ms) ~492,000 ~543,000 ~540,000 ~527,000 Context switches 9,468 | 19.244/s 14,415 | 26.547/s 16,120 | 29.864/s 6,021 | 11.436/s Idle CPU % while watching video 70.4 68.49 74.29 90.20 GPU pipeline load while watching video 58.21% 56.33% 57.33% 57.98% VRAM 50.89 23.29 24.60 44.36 Energy consumption in watts while watching video 12.5-15.6 13.8-20.4 13.8-14.1 11.4-14.9 FPS in the WebGL Aquarium test 26-29 16-38 18-37 16-42 Energy consumption in the WebGL Aquarium test 17-19 17-29 16-27 21-29

The testing concluded that it is too early to dismiss X11, while Wayland-based solutions require further optimization. X11 remains recognized as the most optimal solution in terms of performance. The Wayland implementation in KDE is presumably better than in GNOME — the GNOME Wayland session implemented in Fedora appears to be less efficient than the KDE Wayland session, which, in turn, lags behind KDE X11.

Forrás: opennet.ru

Megbízható hosting vásárlása weboldalak számára, DDoS védelemmel, VPS VDS szerverek. 🔥 Megbízható webtárhely vásárlása DDoS védelemmel, VPS VDS szerverek | ProHoster