Yes, I don't use gevent now.

Just trying to improve from sqlalchemy and mysql server itself.

It takes 50 ms to commit one entry update. I don't know reason exactly now.

I'am trying to write mysql procedure and have a try to see the performace 
if calling procedure via python.

在 2014年3月13日星期四UTC+8下午11时55分49秒,Michael Bayer写道:
>
> OK well if you’re using gevent, then I really have very little experience 
> to help you on this.   I wasn’t aware of what integration gevent has with 
> the MySQL drivers, I assume you’re using a pure Python driver at least.   
>  It’s very likely there’s some interaction with gevent + MySQL drivers 
> getting in the way.     That’s a pretty advanced configuration so you sort 
> of need to figure out how to get a handle on what it’s doing if you want to 
> roll that way.   I love the idea of gevent but as far as real world use 
> cases, I’ve never had any.  If i need parallelism i just throw up 
> multiprocessing and I’m done.  But i know that’s just not exciting enough 
> for most people.
>
> you’d need to run what you’re doing under non-gevent, non-parallel 
> circumstances and get a baseline for how long a “commit” takes.    
>
> On Mar 13, 2014, at 9:30 AM, Ni Wesley <nis...@gmail.com <javascript:>> 
> wrote:
>
> I thought this before.
>
> But, actually, set to 0 is twice as fast as other settings, say, maybe 50, 
> really hard to understand.
>
> I tried to use gevent + sqlalchemy + mysqlconnector, but just a little 
> improve.
>
> Tomorrow I wanna write some mysql procedures and call the procedures , 
> instead of core sqls. 
>
> 在 2014年3月13日星期四UTC+8下午8时59分34秒,Michael Bayer写道:
>>
>>
>> On Mar 13, 2014, at 12:10 AM, Ni Wesley <nis...@gmail.com> wrote: 
>>
>> > 
>> > We can see that, from the start point to end point, it takes 50 ms, 
>> including 40ms for engine commit. 
>> > 
>> > For 1000 entries, it takes 40 seconds, here I have one question, when 
>> 1000 connections are on-going, I watch the connections between tcp server 
>> and db server, 
>> > 
>> > via command watch -n 1 "netstat -anpto|grep dbserver_ip|wc -l", I find 
>> the spike value is just 26, actually, I gave 0 to engine pool_size, why it 
>> takes only 26? 
>>
>> pool size as zero is a pretty bad setting here, it means for every 
>> connect/execute() it has to reconnect to the database from scratch, because 
>> connections aren’t pooled. 
>>
>> taking off that setting and leaving at the default would help. 
>>
>>
> -- 
> 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+...@googlegroups.com <javascript:>.
> To post to this group, send email to sqlal...@googlegroups.com<javascript:>
> .
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to