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

[Feature Request] Folia support #198

Closed
Netherwhal opened this issue Oct 22, 2023 · 8 comments
Closed

[Feature Request] Folia support #198

Netherwhal opened this issue Oct 22, 2023 · 8 comments
Assignees
Labels
enhancement folia good-first-issue Good for first-time contributors help wanted Contributions are welcome
Milestone

Comments

@Netherwhal
Copy link

Would be great if Folia could be supported with this plugin.

@sladkoff
Copy link
Owner

Notes for further development:

@sladkoff
Copy link
Owner

sladkoff commented Jan 3, 2024

As of right now the documentation on Folia Plugin development is rather limited and the whole subject is not quite stable. Let's keep this open for the near future.

@sladkoff sladkoff added enhancement help wanted Contributions are welcome good-first-issue Good for first-time contributors labels Jan 3, 2024
@sladkoff
Copy link
Owner

sladkoff commented Feb 29, 2024

I had a more in-depth look at this as it seems to be a requested topic.

Open questions and challenges for implementing Folia support

  • ⚒️ Metrics mc_entities_total, mc_villagers_total will need to be re-implemented to use the new RegionScheduler class. It is no longer possible to call World#getEntities from the main thread.
    • If we use the regionised scheduling, we can add the label region to the metric and the total entity counts can be aggregated by Prometheus/Grafana.
    • It should also be possible to use an event-based approach (see Improve performance of chunk loaded metric and offline player count  #226). Basically, we can subscribe to entity load/unload events and count entities that way.
  • ⚠️ Metrics mc_tps and mc_tick_duration_* will not be supported because there is no Folia API to get the TPS for a given region/thread (see API: Location Tick Times PaperMC/Folia#31)
    • Edit: see comments below on how this could be implemented manually.
  • ⚒️ Any changes should be backward compatible with Paper/Spigot

@PedroMPagani
Copy link

You can get that information with thread-access in folia-dev. Look at spark implementation of Folia.

@sladkoff
Copy link
Owner

You can get that information with thread-access in folia-dev. Look at spark implementation of Folia.

I think I found the relevant commit. @PedroMPagani That's a nice source, thank you.

@sladkoff
Copy link
Owner

The current plan is to release a new version soon which will include rudimentary support for Folia - only a small set of metrics will be provided.

I will create additional tasks for making the Folia implementation more feature-complete.

@sladkoff sladkoff self-assigned this Feb 29, 2024
@sladkoff sladkoff added this to the 3.0.0 milestone Feb 29, 2024
@sladkoff
Copy link
Owner

@Netherwhal Rudimentary Folia support is now available in v3.0.0. Lots of metrics are still missing though, it will require some more work to get those to work.

The open tasks are tracked here:

@Netherwhal
Copy link
Author

thanks so much - this is great! I think TPS is most important now because with JMX also not showing TPS with Folia its currently not possible to measure that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement folia good-first-issue Good for first-time contributors help wanted Contributions are welcome
Projects
None yet
Development

No branches or pull requests

3 participants