[Twisted-Python] twisted and performance

Alvin Delagon adelagon at gmail.com
Thu Jun 14 04:21:02 MDT 2007


Hi! This is my first advice for twisted-python list I hope I get this right.

I don't know much about adbapi but you might to check if your database is
causing the bottleneck. Also, what reactor are you using? You might want to
configure your twisted application to use the epoll reactor. We have a
server here using epoll and believe me this thing is wonderful. ^_^


On 6/13/07, weiwei weiwei <waterinfire at hotmail.com> wrote:
>
> Hi,all!
>
>
>
>          Thanks for the python twisted,it is a great software.
>
>
>
>          I am from china. This days we use twisted to develop a
> middleware.
>
>
>
>          Requirement is:
>
> 1)       Receive:  receive 100~200 different client¡¯s message(they all
> connect to our listen socket) and insert it into database(oracle)
>
> 2)       Send: application insert message into db,then our middleware
> select
> message from database and send this message to its destination through
> socket.
>
>
>
> Our design is : reactor + adbapi.ConnectionPool
>
> 1)       reactor is used in receiveing and sending message from and to
> socket.
>
> 2)       when we received a message,we use adbapi to insert it to db
>
> 3)       we use adbapi to select message from db,and use a Deferred to
> notify us when we got a message from db,and send it to peer,after
> receiving
> the peer¡¯s acknowledge message ,we update the databse.
>
>
>
> After testing many times,we found when the connection number is less than
> 20,its performance is very good.But if the connection number is more than
> 30
> or 50, it is performance is worse and worse.
>
>
>
> DO you give me some advice about the design?
>
>
>
>
>
> Thanks in advance.
>
>
>
>
>
> Wei wei
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20070614/a71e73d5/attachment.html>


More information about the Twisted-Python mailing list