[Twisted-Python] questions about large db queries and memory leak
Hey guys, I've been using twisted for a couple days, I like it very much. And there are some stuffs I 'm still not quite get: - I like the asyn way twisted provides, but when using RDBMS, I have to spawn other threads out of the main event loop. this seems weird and I 'm wondering how the performance would be when you've got a lot of concurrent db queries. - Did anyone come into memory leak on twisted server? 'cause when I tested our twisted server today ,the memory usage became 75% when idle. Any suggestion welcome. regards, Chen ____________________________________________________________________________________ No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail
Quoting slowtech chen <slowtech.chen@yahoo.com>:
Hey guys,
I've been using twisted for a couple days, I like it very much. And there are some stuffs I 'm still not quite get:
- I like the asyn way twisted provides, but when using RDBMS, I have to spawn other threads out of the main event loop. this seems weird and I 'm wondering how the performance would be when you've got a lot of concurrent db queries.
I guess you use adbapi ? The performance are generally not a problem with db queries because most of the job is done on the DB, not on the client. I've got servers that makes hundreds requests against Postgres/MySQL/sqlite without problems.
- Did anyone come into memory leak on twisted server? 'cause when I tested our twisted server today ,the memory usage became 75% when idle.
Until proved, it comes from your code :). -- Thomas
slowtech chen wrote:
- Did anyone come into memory leak on twisted server? 'cause when I tested our twisted server today ,the memory usage became 75% when idle.
If you're not running Python >= 2.5.0 this might be relevant: http://evanjones.ca/python-memory.html -Mark
participants (3)
-
Mark Leonard -
slowtech chen -
Thomas Hervé