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

JRuby/TruffleRuby Support #4098

Open
Garfield96 opened this issue Mar 15, 2023 · 2 comments
Open

JRuby/TruffleRuby Support #4098

Garfield96 opened this issue Mar 15, 2023 · 2 comments
Labels
enhancement Feature request or improve operations

Comments

@Garfield96
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Follow-up issue for #317

The default Ruby interpreter MRI makes use of a GIL, which limits parallel execution to only a single thread. Especially in high-load scenarios, e.g. when FluentD is used as a log aggregator, the single-threaded execution becomes a bottleneck. To circumvent this issue, it is possible to either use multiple FluentD instances or to use the multi-worker feature of Fluentd. Using multiple instances of Fluentd often even is desired to allow horizontal scalability, but requires an effective load-balancing solution and results in higher costs, since each instance must be managed. The multi-worker feature solves these issues, but has a number of other problems: It was reported that the workload is unevenly distributed between workers, resulting in poor resource utilization (#3346). In addition, the multi-worker feature makes use of processes and interprocess communication, which is much slower compared to multiple kernel threads in the same process.

Therefore, it would be great to use a interpreter without GIL, to boost performance and lower cost. Unfortunately, JRuby and TruffleRuby are currently not able to run Fluentd. In case of JRuby, the FluentD dependency yajl-ruby is not supported, since it doesn't provide a native Java extension. Truffleruby on the other hand is missing some functions (e.g. IO#send_io, IO#recv_io).

Describe the solution you'd like

Adapt Fluentd to allow usage of JRuby/TruffleRuby or contribute the missing functions to the other projects.

Describe alternatives you've considered

Implement Ractor based parallelism in serverengine (treasure-data/serverengine#107), which should also result in a performance improvement.

Additional context

No response

@daipom
Copy link
Contributor

daipom commented Mar 15, 2023

I'm interested in Fluentd with Ractor.

@daipom daipom added the feature request *Deprecated Label* Use enhancement label in general label Mar 15, 2023
@kbens
Copy link

kbens commented Sep 21, 2023

I'm interested in Fluentd and truffleruby.

@kenhys kenhys added enhancement Feature request or improve operations and removed feature request *Deprecated Label* Use enhancement label in general labels Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request or improve operations
Projects
None yet
Development

No branches or pull requests

4 participants