this post was submitted on 12 Dec 2023
686 points (83.2% liked)

Technology

59666 readers
2913 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] egeres@lemmy.world 4 points 11 months ago (1 children)

I'm not deep on how the core of an OS works, but to my understanding, the kernel of linux should be more robust and reliable, shouldn't it always be performing better than windows on the same hardware?

Where could I read information on the things that hinder performance on linux, does anybody have any educational resources?

[–] singron@lemmy.world 13 points 11 months ago (1 children)

On Linux, you run windows programs through wine, which is an additional layer that can theoretically slow down the program.

Also, windows supports certain constructs like io completion ports or WaitForMultipleObjects that historically haven't been emulated efficiently on Linux since it lacked comparable primitives, although those specific ones have been greatly improved in recent years with io_uring and FUTEX_WAIT_MULTIPLE.

There have been similar issues with direct3D since wine used to have to emulate it in OpenGL, but with vkd3d, wine has more opportunities to efficiently implement the d3d apis.

Basically wine being slower was the norm until quite recently.

[–] ItsGatorSeason@lemm.ee 5 points 11 months ago

Thanks to the one crazy guy valve contracts making proton... It's crazy how his work basically made gaming on Linux a thing. But yeah the other major thing, which you mentioned, is games/game engines using directX9, directX10 and directX11 (the windows 3d graphics libraries) have their API/rendering calls mapped directly to Vulkan. Those APIs were easier to use but from my understanding (I'm no graphics expert) didn't have the ability to use the full potential of the hardware, and basically had a single channel/thread to the GPU. DirectX12 and Vulkan are much more difficult to use, and some games have used them horribly such that DX11 performs better than DX12, but a good implementation can take advantage of multichannel/multithreaded communication to the GPU allowing much faster and efficient data transfer. They allow the engine programmer to have much more control of the hardware. So vkd3d/proton gives that massive performance impact by mapping the graphics calls from an older API to a newer one. I have not looked into how it's implemented but it's basically magic. This was the main reason why wine kinda sucked for gaming before proton.

The Windows scheduler is actually pretty decent, it's been a few years since I looked into it but I think Windows soft-real time scheduling was better than the one Linux used, though idk if games even use that.

The thing holding Linux back, mostly just for online games with anticheat, is anticheat developers reluctance to port to Linux. I believe do to the differences between users pace and kernel space on Windows VS Linux makes bypassing the anticheat on Linux much easier, or the anticheat can use the same tricks that it does on windows.