-
Notifications
You must be signed in to change notification settings - Fork 2
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
Interested in creating epoll patch? #2
Comments
@mspanc |
Hello @mzabaluev I want to run streaming service based on gst-rtsp-server and it can easily hit 10-50k simultaneous connections in a peak so I think that's already range in which regular poll will be a bottleneck (correct me if I am wrong). So yes, I am basically interested in having a fork of GLib that has enabled epoll. Have you tried to merge this into main GLib code base? If yes what was the reason it is not a part of GLib? Are there any reasons why GLib should stick to poll? (i don't see any) |
It has been submitted as GNOME bug 699132, but nobody has seen it necessary to review the patch. I guess there is no mainstream need for it, as GLib is mostly used in application stacks.
If it ain't broken, don't fix it :) |
After rebasing to recent master, a few regression tests fail. Will investigate. |
A regression test added since the branch was last submitted exposes an API break: if multiple polls were added on one descriptor with different priorities and different event masks, the priority in Fixing this would require more work than I'm ready to do on my own time currently, I'm afraid. Pity that such a corner case gets in the way, because |
Well I don't mind if this fork won't be 100% compatible. |
I work on Valum, a web micro-framework based on libsoup-2.4 and gio-2.0 and I would really like to see epoll eventually powering GLib. @mzabaluev What kind of issues have you encountered when you tried to rewrite In the meantime, it is still possible to plug a polling function into |
I have pushed branches:
It should be doable: the members of
There's expectation that a |
@mzabaluev Does this glib use epoll by default? I have successfully built the glib source modified here, and my glib application runs successfully, not modifying any code. Does my glib application use epoll already? |
@Akagi201 use |
@arteymix It is poll ....... :(, so how can I switch to epoll. |
The easiest way is to point the
|
@arteymix I already complile and build my source code with this glib, but I want to know how can I modified the application code to use epoll. |
I've just compiled the whole thing and it's effectively not using epoll at this moment. Maybe ping @mzabaluev ? |
@arteymix I found the problem. You must run |
How can I do some benchmark tests between poll and epoll implementations? Does anyone have some ideas? |
I made a PR to merge this patch to the latest glib. When I run |
Would this version work with recent version of glib? Am playing with janus-gateway, a glib-based WebRTC gateway. Profiling shows a lot of overhead lies in glib. Am hoping to see if glib + epoll can help reduce CPU consumption. |
Hello, seniors, I have encountered the same problem as you now. I am using janus-gateway, and the cpu overhead of glib is too high. I would like to ask you how to solve it in the end. |
@xunlujiehuo I suggest you report your observations to the GLib project. The ideas on how to support epoll in GLib have probably evolved, but I have not followed up on the development. |
Hello,
I am building a network app that strongly relies on GLib/GStreamer stack. However, I would like to give it a boost by switching to epoll. I've noticed abandoned epoll branch in your repo.
Would you have been interested in finalizing this project and making working, stable version of GLib with epoll? I can sponsor this somehow.
The text was updated successfully, but these errors were encountered: