Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

What is synchronization in Wine?

+2
−0

Wine has options for "Synchronization", like "Esync" or "Fsync".

What do these actually do? What is the purpose of such an option? What is the impact to normal usage of a Windows program in Wine?

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+1
−0

I'm not an expert on this at all, but so far there are no answers, so I'll try one.

"Synchronization" is in the context of multithreading.

For those who don't know how multithreading works: Multithreading is like having multiple CPUs run parts of the program in parallel. This runs into a problem with common data. Usually, it is difficult for multiple threads to write to the same variable, memory address, file, etc. at the same time. The program must arrange that when accessing such objects, every thread first reserves ("locks") the resource, does its work, then frees it again. The other threads basically get in line and wait for the resource to be freed, this prevents concurrent access.

Esync, Fsync, etc refer to different algorithms/implementations of the resource locking mechanism, based on https://github.com/lutris/docs/blob/master/HowToEsync.md. You can see how a program that relies on multithreading will do a lot of locking/unlocking so there's interest in optimizing it. However, in practice, the most performance intensive Windows applications are games, and games almost always have much bigger bottlenecks (3D rendering, inefficient algorithms) than synchronization.

Esync appears to be an older and simpler approach. Newer ones like Fsync probably provide a slight performance boost, but also are more likely to cause crashes. All of these algorithms work as far as synchronization, but the APIs they use (how the windows program will ask the OS to synchronize) may be incompatible for some reason, which may lead to a program failing to work with a newer synchronization method. You may also discover implementation bugs that the OS developers accidentally introduced.

For normal users who are not interested in helping test experimental features, the reasonable approach is probably:

  • Use Esync for everything
  • If the program crashes with Esync, try Fsync just in case, but don't expect much. There should be very few programs that break with Esync but not others, while there's probably more that break with Fsync but work on Esync.
  • Give up on the performance boost of Fsync. It's a very small increase (unless a particular, exquisitely badly developed program presents a pathological case) and will not be worth the extra troubleshooting when it breaks.

This advice is opinion more than anything, but the interaction between Windows compatibility, performance and multithreading is a very complex topic and it's hard to say anything concrete beyond this.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »