damentz / liquorix-package

Liquorix Debian Package
https://liquorix.net
GNU General Public License v2.0
285 stars 23 forks source link

Is there any gain in installing Liquorix kernel for a game server? #163

Closed lostsoul6 closed 6 months ago

lostsoul6 commented 6 months ago

Hi @damentz ,

I'm hosting a Counter-Strike 2 server with Ubuntu 22 server and I'm currently using the default generic kernel . Although I have 8 CPU cores (3.2Ghz each) on my VPS , the performance is not great and I get warnings in my game console regarding Thread Starvation . I just wanted to know if installing Liquorix will have any benefits in my setup . What are the CPU related differences between Liquorix kernel and the default generic one?

EDIT : BTW , I will include inxi -b output . It's a vmware VPS

System:
  Host: steam Kernel: 5.15.0-97-generic x86_64 bits: 64 Console: pty pts/6
    Distro: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
Machine:
  Type: Vmware System: VMware product: VMware Virtual Platform v: N/A
    serial: VMware-42 00 e8 8d f0 d1 7b f0-a8 c2 75 c4 76 84 50 58
  Mobo: Intel model: 440BX Desktop Reference Platform serial: N/A
    BIOS: Phoenix v: 6.00 date: 11/12/2020
CPU:
  Info: 2x 4-core Intel Xeon E5-2667 v4 [MCP SMP] speed (MHz): avg: 3196
Graphics:
  Device-1: VMware SVGA II Adapter driver: vmwgfx v: 2.19.0.0
  Display: server: No display server data found. Headless machine?
    tty: 80x24
  Message: GL data unavailable in console for root.
Network:
  Device-1: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge driver: N/A
  Device-2: VMware VMXNET3 Ethernet driver: vmxnet3
Drives:
  Local Storage: total: 90 GiB used: 44.09 GiB (49.0%)
Info:
  Processes: 283 Uptime: 11h 20m Memory: 15.61 GiB used: 3.76 GiB (24.1%)
  Init: systemd runlevel: 5 Shell: Bash inxi: 3.3.13
damentz commented 6 months ago

Hey @lostsoul6, I think you can get some benefit, but you may need to do a bit more work aside from installing the kernel.

For example, maybe there's a way to set core affinity so that your server(s) stay in their NUMA cluster? Also, it's worth monitoring your CPU usage finely to detect if you're fully saturated. No scheduler can help if you're out of capacity and the game logic is falling behind.

Even if that's the case, you may be able to set nice levels per process or thread to get the correct things running first. Also consider running with mitigations=off to disable performance killing mitigations.

lostsoul6 commented 6 months ago

Hi @damentz ,

Thank you for your response . Installing the Kernel alone has solved my problem . No more lags in game . One thing I noticed right away is that the cpu cores usage in top command is spread evenly among all cores . With my previous Kernel , Some cores showed more usage than the others . Don't know if that's related or not . Anyway , you can mark this as solved .

damentz commented 6 months ago

Ah that makes sense, the mainline scheduler likes to pack tasks to cores for efficiency and to max out clock speeds. Unfortunately, this causes latency variations and queuing as tasks have to wait for their chance to run despite idle cores being available.

Even with EEVDF in mainline, I believe this logic still exists since core migration code still exists. PDS on the other hand is very aggressive utilizing free cores, leading to better behavior for many programs like the CS2 server software.

Thanks for the feedback, I'll close this out.