Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for using Server GC #1716

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rreminy
Copy link
Contributor

@rreminy rreminy commented Mar 14, 2024

This PR Attempts to add support for using the Server GC instead of the default Workstation GC.

Server GC is another variant of Garbage Collector designed heavier workloads, optimized for throughput.

It tends to provide a smoother experience in my case however I have read that in some cases it may cause memory usage to grow drastically. While I have not seen it happen on my limited testing, YMMV.

Related launcher PR: goatcorp/FFXIVQuickLauncher#1447

@KazWolfe
Copy link
Member

KazWolfe commented Jun 3, 2024

Is this still desired/ready for review for API 10?

@goaaats
Copy link
Member

goaaats commented Jun 3, 2024

I would be extremely surprised if server GC would be advantageous for the type of work we do. Do you have some benchmarks or numbers?

@rreminy
Copy link
Contributor Author

rreminy commented Jun 4, 2024

Its difficult to actually make a benchmark whenever it comes to GC due to the YMMV nature, however I still did make a benchmark some time back then showing an allocation heavy workload where Server GC is excellent at:

In general while testing experiences been the following:

  • On allocation-heavy workloads, Server GC perform way much better, eliminating most (but not all) hitches, however the remaining hitches tend to be much smaller, if any, and may be unnoticeable.
  • On allocation-light workload however, while it performs as good or better than Workstation GC (the default), it tends to accumulate a big collection every few minutes or so, which are harder to predict and may cause a hitch lasting about 200-400ms. This does not tend to happen during allocation heavy workloads.
  • I read Server GC uses more memory, however during my testing the difference wasn't that big. This is likely another YMMV variable.

So Server GC mostly works as a work-around whenever you have plugins that are heavily allocating object, which can improve performance greatly where Workstation GC suffers. It still would be nice to have the option to enable it but this would be at most experimental and would need further testing.

This PR is technically ready but untested, however my other PR I got stuck because I couldn't get it to compile. I been testing using environment variables instead. You can monitor and change some GC parameters using my GC plugin:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants