On 08:54 am, zipx...@hotmail.com wrote:
A simple TCP echo server using epoll reactor:this server process take 60% cpu on 4000 request/s. If use self.transport.getHandle().send instead of self.transport.write,it take 30% cpu on 4000 request/s.
Why transport.write take more user cpu?Why twisted performance so poor?

`transport.write` will actually try to deliver your data. `send` will as likely drop it on the floor as deliver it. Correctness sometimes costs a little more CPU time.

Jean-Paul

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to