On Thursday, April 25, 2013 7:06:31 PM UTC-3, Michael Bayer wrote: > > > On Apr 25, 2013, at 2:15 PM, Pedro Werneck <pjwe...@gmail.com<javascript:>> > wrote: > > > > I'm using SQLAlchemy with MySQLdb for processing dozen million daily tasks > with Celery. Most of my queries are very quick and the tasks don't wait for > I/O for too long, so I had great results using the eventlet pool for > Celery. However, whenever I hit a chunk of data which is expected to lead > to slower queries, the overall performance suffers a lot, so I guess I > can't just let it block like that. > > I found the eventlet.db_pool, and there's this Nova example using it with > SQLAlchemy and MySQLdb: > > > http://bazaar.launchpad.net/~rackspace-titan/nova/sqlalchemy-eventlet/view/head:/nova/db/sqlalchemy/session.py > > However, in an old topic here asking the same about psycopg someone > mentions that this isn't a good example and the guys probably don't know SA > very well. > > https://groups.google.com/d/msg/sqlalchemy/CU_kknlnksQ/wI1Xw21vcLgJ > > > > the recipe seems to make use of a connection pool provided by eventlet, > the rest of what's there isn't very interesting (or necessary). > > I haven't used eventlet but seems fine to me ? I wouldn't say > connection pooling is even very critical. If slow queries are the issue, > eventlet would just need to make sure that network requests don't block. > > It's possible that gevent is more popular, I've had more experience > playing with that. >
So, basically it's just passing the eventlet pool as the creator for the create_engine call? Good. Right, it isn't critical at all. My system is working perfectly fine and much faster than without eventlets most of the time, but since I went over the trouble of changing it to using eventlets, I'd like to try getting the database connection right too and see if there's any significant improvemente. Thanks! -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.