一直覺得virt-manager (KVM/QEMU)跑Linux桌面有夠慢(尤其是 render),今天工作需要、在裡面灌 fedora 時因為實在慢到難以忍受所以花了點時間調校了一下效能,現在終於連跑KDE6 Plasma + Wayland都很順,分享一下設定:

-----

# CPU
- host-passthrough 要打開
- 手動分配為單一 socket,每個 core 有 2 threads。

# Memory
- Shared memory 要打開才能用 Virtio-GPU 3D 加速。(雖然會增加記憶體攻擊面...)

# Disk (VirtIO)
- discard='unmap' 。
- cache='none' 。直接由虛擬機與硬體溝通(透過 `O_DIRECT` 開檔、跳過 OS cache)。

# Video (Virtio)
- 3D Accelerate 記得勾選。

# Graphics
- Type: Spice Server
- Listen type: none
- OpenGL 打開,選Intel的,懶得再跟NVIDIA打架了。

0

If you have a fediverse account, you can quote this note from your own instance. Search https://g0v.social/users/tar/statuses/116125430253911410 on your instance and quote it. (Note that quoting is not supported in Mastodon.)