[Twisted-Python] epoll reactor
Hi all I've implemented an epoll reactor using the level triggered mechanism. Please check it out and let me know if there's anything I've done wrong. This is the first time I've played with twisted reactor internals before. :) http://msn-transport.jabberstudio.org/tarballs/epoll-0.1.tar.gz There's a README file in the tarball with instructions on setting it up. Enjoy! :) --- James
Well, I got it to work properly now :) http://msn-transport.jabberstudio.org/tarballs/epoll-0.2.tar.gz It's now uses the epoll edge triggered flag, and doesn't chew 99% CPU like the first one accidentally did. --- James On 22/05/2005, at 12:37 PM, James Bunton wrote:
Hi all
I've implemented an epoll reactor using the level triggered mechanism. Please check it out and let me know if there's anything I've done wrong. This is the first time I've played with twisted reactor internals before. :)
http://msn-transport.jabberstudio.org/tarballs/epoll-0.1.tar.gz
There's a README file in the tarball with instructions on setting it up.
Enjoy! :)
---
James
On Mon, 23 May 2005 22:08:43 +1000, James Bunton
Well, I got it to work properly now :)
http://msn-transport.jabberstudio.org/tarballs/epoll-0.2.tar.gz
It's now uses the epoll edge triggered flag, and doesn't chew 99% CPU like the first one accidentally did.
Neat. There has been a level-triggered epoll reactor in my sandbox for some time, but I was never able to get the edge triggered version to work. Hmm, running the Twisted test suite with this version doesn't do too well either. A few tests fail here and there before it gets totally wedged on twisted.test.test_pb.ConnectionTestCase.testIdentityConnector. You can try this yourself by adding an entry for this reactor to the dictionary at the top of twisted.application.app, then running "trial -R -r epoll twisted", where "epoll" is the key you add to that dict. Jp
On 23/05/2005, at 11:23 PM, Jp Calderone wrote:
On Mon, 23 May 2005 22:08:43 +1000, James Bunton
wrote: Well, I got it to work properly now :)
http://msn-transport.jabberstudio.org/tarballs/epoll-0.2.tar.gz
It's now uses the epoll edge triggered flag, and doesn't chew 99% CPU like the first one accidentally did.
Neat. There has been a level-triggered epoll reactor in my sandbox for some time, but I was never able to get the edge triggered version to work.
Hmm, running the Twisted test suite with this version doesn't do too well either. A few tests fail here and there before it gets totally wedged on twisted.test.test_pb.ConnectionTestCase.testIdentityConnector.
You can try this yourself by adding an entry for this reactor to the dictionary at the top of twisted.application.app, then running "trial -R -r epoll twisted", where "epoll" is the key you add to that dict.
Jp
A lot of these seem to fail when using the 'poll' and reactor also. Broken tests or two broken reactors do you think? But there are a few there I can fix. Thanks for the pointer :) --- James
On Tue, 24 May 2005 23:13:51 +1000, James Bunton
On 23/05/2005, at 11:23 PM, Jp Calderone wrote:
On Mon, 23 May 2005 22:08:43 +1000, James Bunton
wrote: Well, I got it to work properly now :)
http://msn-transport.jabberstudio.org/tarballs/epoll-0.2.tar.gz
It's now uses the epoll edge triggered flag, and doesn't chew 99% CPU like the first one accidentally did.
Neat. There has been a level-triggered epoll reactor in my sandbox for some time, but I was never able to get the edge triggered version to work.
Hmm, running the Twisted test suite with this version doesn't do too well either. A few tests fail here and there before it gets totally wedged on twisted.test.test_pb.ConnectionTestCase.testIdentityConnector.
You can try this yourself by adding an entry for this reactor to the dictionary at the top of twisted.application.app, then running "trial -R -r epoll twisted", where "epoll" is the key you add to that dict.
Jp
A lot of these seem to fail when using the 'poll' and reactor also. Broken tests or two broken reactors do you think?
But there are a few there I can fix. Thanks for the pointer :)
The poll reactor seems to be doing okay on the buildslave: http://twistedmatrix.com/buildbot/ Maybe it's skipping some tests that are running on your machine? Jp
On 24/05/2005, at 11:48 PM, Jp Calderone wrote:
On Tue, 24 May 2005 23:13:51 +1000, James Bunton
wrote: On 23/05/2005, at 11:23 PM, Jp Calderone wrote:
On Mon, 23 May 2005 22:08:43 +1000, James Bunton
wrote: Well, I got it to work properly now :)
http://msn-transport.jabberstudio.org/tarballs/epoll-0.2.tar.gz
It's now uses the epoll edge triggered flag, and doesn't chew 99% CPU like the first one accidentally did.
Neat. There has been a level-triggered epoll reactor in my sandbox for some time, but I was never able to get the edge triggered version to work.
Hmm, running the Twisted test suite with this version doesn't do too well either. A few tests fail here and there before it gets totally wedged on twisted.test.test_pb.ConnectionTestCase.testIdentityConnector.
You can try this yourself by adding an entry for this reactor to the dictionary at the top of twisted.application.app, then running "trial -R -r epoll twisted", where "epoll" is the key you add to that dict.
Jp
A lot of these seem to fail when using the 'poll' and reactor also. Broken tests or two broken reactors do you think?
But there are a few there I can fix. Thanks for the pointer :)
The poll reactor seems to be doing okay on the buildslave:
http://twistedmatrix.com/buildbot/
Maybe it's skipping some tests that are running on your machine?
Jp
Do you know how I can tell which tests are ok to skip? And how to skip them? The buildbot page didn't seem to say what tests were actually run, only the warnings that occurred. http://msn-transport.jabberstudio.org/tarballs/epoll-0.3.tar.gz That should do a little better with the tests. It still fails some, but they seem to be the same ones that poll fails also. --- James
On Wed, 25 May 2005 23:30:52 +1000, James Bunton
On 24/05/2005, at 11:48 PM, Jp Calderone wrote:
On Tue, 24 May 2005 23:13:51 +1000, James Bunton
wrote: On 23/05/2005, at 11:23 PM, Jp Calderone wrote:
On Mon, 23 May 2005 22:08:43 +1000, James Bunton
wrote: Well, I got it to work properly now :)
http://msn-transport.jabberstudio.org/tarballs/epoll-0.2.tar.gz
It's now uses the epoll edge triggered flag, and doesn't chew 99% CPU like the first one accidentally did.
Neat. There has been a level-triggered epoll reactor in my sandbox for some time, but I was never able to get the edge triggered version to work.
Hmm, running the Twisted test suite with this version doesn't do too well either. A few tests fail here and there before it gets totally wedged on twisted.test.test_pb.ConnectionTestCase.testIdentityConnector.
You can try this yourself by adding an entry for this reactor to the dictionary at the top of twisted.application.app, then running "trial -R -r epoll twisted", where "epoll" is the key you add to that dict.
Jp
A lot of these seem to fail when using the 'poll' and reactor also. Broken tests or two broken reactors do you think?
But there are a few there I can fix. Thanks for the pointer :)
The poll reactor seems to be doing okay on the buildslave:
http://twistedmatrix.com/buildbot/
Maybe it's skipping some tests that are running on your machine?
Jp
Do you know how I can tell which tests are ok to skip? And how to skip them? The buildbot page didn't seem to say what tests were actually run, only the warnings that occurred.
If you check out the "problems" link, it lists which tests are being skipped. One such page is at http://twistedmatrix.com/buildbot/reactors/builds/389/poll/2.
http://msn-transport.jabberstudio.org/tarballs/epoll-0.3.tar.gz That should do a little better with the tests. It still fails some, but they seem to be the same ones that poll fails also.
Cool, I'll give it a try later today. Jp
On Wed, May 25, 2005 at 11:30:52PM +1000, James Bunton wrote: [...]
The buildbot page didn't seem to say what tests were actually run, only the warnings that occurred.
The buildbot page does give the full test output in the "log" links, as well as the full test.log file in the "test.log" links. The "problems" and "warnings" links are filtered versions of the "log" output. -Andrew.
On 25/05/2005, at 11:56 PM, Andrew Bennetts wrote:
On Wed, May 25, 2005 at 11:30:52PM +1000, James Bunton wrote: [...]
The buildbot page didn't seem to say what tests were actually run, only the warnings that occurred.
The buildbot page does give the full test output in the "log" links, as well as the full test.log file in the "test.log" links. The "problems" and "warnings" links are filtered versions of the "log" output.
-Andrew.
I thought they were all the same link :) Thanks --- James
On 26/05/2005, at 6:11 AM, James Bunton wrote:
On 25/05/2005, at 11:56 PM, Andrew Bennetts wrote:
On Wed, May 25, 2005 at 11:30:52PM +1000, James Bunton wrote: [...]
The buildbot page didn't seem to say what tests were actually run, only the warnings that occurred.
The buildbot page does give the full test output in the "log" links, as well as the full test.log file in the "test.log" links. The "problems" and "warnings" links are filtered versions of the "log" output.
-Andrew.
I thought they were all the same link :) Thanks
---
James
What's the correct behaviour for a reactor if it has addReader/Writer called with an invalid file descriptor? --- James
participants (3)
-
Andrew Bennetts
-
James Bunton
-
Jp Calderone