Proton icon indicating copy to clipboard operation
Proton copied to clipboard

NTSync for bleeding-edge

Open UbuntuGaming opened this issue 1 year ago • 8 comments

Feature Request (Bleeding-Edge)

NTSYNC (Current version is 5)

I confirm:

  • [x] that I haven't found another request for this feature.
  • [x] that I have checked whether there are updates for my system available that contain this feature already.

Description

NTSYNC NTSync

Files

NTsync (Wine) https://repo.or.cz/wine/zf.git/shortlog/refs/heads/ntsync5

NTSync (Kernel) > To be sent to the Deck kernel team if you choose to implement the feature https://repo.or.cz/linux/zf.git/shortlog/refs/heads/ntsync5

Thanks for reading :)

UbuntuGaming avatar Feb 17 '24 12:02 UbuntuGaming

That chart is misleading as it compares against wineserver which you normally do not use but use esync and fsync ( if available always fsync is used , which is since some 5.x kernel, other than some app workarounds that disables fsync ).

Ntsync vs fsync is barely an improvement in many cases.

Leopard1907 avatar Feb 17 '24 19:02 Leopard1907

The primary objective of NTsync is not merely to enhance speed but rather to prioritize compatibility, ensuring seamless operation at the same speed or even surpassing it.

DekosAnjo avatar Feb 19 '24 02:02 DekosAnjo

My apologies. I uploaded the image as i saw it on my hard drive & i wanted to put in a request for the feature, before i forgot about it again. I was sure the proton devs would of done testing of their own to determine if it was worth it or not. From what I've seen it does very slightly improve performance over fsync. I tested it for a single application under wine & saw a 3-7fps stable increase not much comparing i was already at 900-1000+ fps but still an measurable improvement. I will do more testing with it in the next week or the week after & i will attach my findings here in this comment. It also might work with the few games that don't play nice with fsync.

Next time i won't rush the request & i will either write a more proper description or leave the description field blank. Thanks for the comments 🙂

UbuntuGaming avatar Feb 19 '24 16:02 UbuntuGaming

I tested NTsync vs Fsync on proton-cachyos and performance improvements in terms of fps aren't high, is just around 5 fps, but I noticed much more stable frametimes and less latency, games feels more responsive than on fsync.

SoongVilda avatar Feb 24 '24 09:02 SoongVilda

I'd also argue that every boost to performance and stability in games should be a priority for Valve since this will be a step that would get some games from almost playable to be playable. And getting a little more stability for a ton of games means that it's also a small boost to the general user experience. So I hope this will get implemented.

Cederick avatar Feb 25 '24 23:02 Cederick

it should be noted that this also requires kernel support and the patchset isn't upstream yet so very few people would be able to make use of this at this time

simifor avatar Feb 26 '24 14:02 simifor

It looks like ntsync is going upstream, Greg KH already added the first 3 patches of 30 for this feature: https://lore.kernel.org/lkml/2024041141-renter-boring-9ff2@gregkh/. Would be nice to get some support in Proton Experimental to test out, should improve compatibility with games too where fsync/esync fall short.

damentz avatar Apr 14 '24 17:04 damentz

I tested NTsync vs Fsync on proton-cachyos and performance improvements in terms of fps aren't high, is just around 5 fps, but I noticed much more stable frametimes and less latency, games feels more responsive than on fsync.

This comment got me curious and my testing agrees with this. I tried to keep this reasonable by running the games at settings that don't cause the rendering to become primarily CPU-bound, since that's usually how people actually run them.

Quick specs:

  • Ryzen 5800X3D
  • RTX 4070Ti
  • winesync-dkms 5.16-5
  • proton-cachyos 9.0-11

Screenshot_20240509_160356

Any significant improvement to game smoothness is a big win in my book, because it's currently in a terrible state. This and a more appropriate scheduler currently seem to be where those improvements can be made.

frozen-sea avatar May 09 '24 13:05 frozen-sea

Its not just the performance either. Its a less "hacky" implementation or at least thats closer to how Windows really behaves or at least thats my understanding of it anyway.

Not sure if its still the case, but a while ago Battle.NET used to crash constantly under fsync and esync but was 100% fine under winesync - again a while ago when ntsync was winesync.

rlees85 avatar Sep 04 '24 10:09 rlees85

I want to add my two cents regarding this topic. Games like Guild Wars 2 feel weird in WvW when using Fsync or Winesync, however Ntsync5 make it feel like there isn't any server lag or delay between you and the server. Don't get me wrong its not like its a big time difference, but its a fraction of a second in WvW. Casting skills, interacting with the game you won't see much difference with Ntsync and Fsync, but when taking objectives it feels like you are playing with a ping of 80ms rather than 20ms before things register for you. Also I believe winesync and ntsync5 aren't the same thing. Winesync for me felt buggy, and a bit worse than Fsync in terms of server latency where Ntsync feels like Fsync with better communication with the server if that makes sense? Really hard to put in words sorry.

OneWiseKnight avatar Nov 23 '24 23:11 OneWiseKnight

No one seems to be addressing the elephant in the room which is the fact that fsync has a habit of absolutely raping your CPU. I don't play recent games and rarely run Windows games nowadays, preferring old console classics, bit in all few cases that I did, all 12 cores / 24 threads of my CPU were loaded at ~30-70% just doing fsync work. With ntsync the CPU load is barely anything. This is probably the reason for bad latency spikes / stuttering and why numbers may vary wildly depending on how much your CPU can take and how badly fsync dishes out punishment depending on the game.

For example, it absolutely obliterated my CPU and turned everything into slideshow in Freedom Planet 2, almost entirely CPU-dependent game that renders perfectly fine in pure-software renderer (dxvk->llvmpipe) but bottlenecked by fsync. Another example is Cyberpunk 2077 which also constantly loading all CPU cores to ~30-50% and shows little of fps difference (it's all ~25-35 fps, just like in FP2 when it doesn't decide on 5-15; yes, FP2 works slower at 240p than CP2077 on high settings with supersampling 1080p-to-1440p via xrandr --fb 2560x1440 --output HDMI-1 --scale 1.33333333 --dpi 128) in low-to-high graphical quality (effects and LOD distances) at native 1080p (or super-1440p/downscaled), suggesting some kind of CPU bottleneck. Unfortunately, it does not launch on pure wine (patched or otherwise) so we all are stuck with unpatched proton.

Pretty sure, regardless of fps count, wasting 30-70% of your CPU time while straining thread-juggling responsiveness of kernel's task scheduler is not a good idea ever. You can probably get some kind of enterprise >64-core/256MB-cache Epyc CPU and it still will get obliterated.

v-fox avatar Jan 21 '25 00:01 v-fox

This just landed in the upstream 6.14 kernel. I'd love to see this revisited to consider enabling ntsync in proton for future SteamOS/other Linux releases

dylanmtaylor avatar Jan 28 '25 02:01 dylanmtaylor

Rebased on top of Wine 10.0-rc1 ntsync7: https://repo.or.cz/wine/zf.git/shortlog/refs/heads/ntsync7

Mixaill avatar Jan 29 '25 14:01 Mixaill

Merge request for wine: https://gitlab.winehq.org/wine/wine/-/merge_requests/7226

Headcrabed avatar Jan 30 '25 03:01 Headcrabed