[openstack-dev] Re: [oslo] eventlet 0.17.3 is now fully Python 3 compatible

2015-04-22 Thread Mike Bayer



On 4/22/15 7:19 AM, Victor Sergeyev wrote:

Hi, All,

My 2c are:

- yes, oslo.db supports python 3 (unittests passes, at least :) )
- MySQL-python still default MySQL DB driver in OpenStack, but at the 
moment the only DB driver for MySQL in python3 environment is PyMySQL, 
so I think, it's ok to use it with python 3.


the same maintainer of PyMySQL has also ported MySQL-Python to Python 3, 
and this driver works pretty well also: 
https://github.com/PyMySQL/mysqlclient-python



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] Re: [oslo] eventlet 0.17.3 is now fully Python 3 compatible

2015-04-13 Thread Mike Bayer



On 4/13/15 8:54 AM, Jeremy Stanley wrote:

On 2015-04-13 04:03:49 -0400 (-0400), Victor Stinner wrote:

Great. Did you notice a performance regression?

Nope. Worth noting, we implemented it primarily for its lack of
compiled extensions, and to a lesser because it supports Python 3.x.
I suspect if we do later run into any unexpected performance
issues... well, it's pure Python. We have lots of people who can
help.


Mike wrote that PyMySQL is much slower than MySQL-Python.


right so it's all a question of proportionality. First off, some 
major performance improvements have been merged into PyMySQL since I 
wrote my wiki entry on it.   Secondly, one thing I didn't do in that 
wiki (the one here https://wiki.openstack.org/wiki/PyMySQL_evaluation) 
do a performance test of MySQL-Python and PyMySQL talking to a 
non-localhost database; as you can see in the RunSnake profiles I have 
at 
http://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/ 
the proportion of network takes up a lot more over the wire, and when 
you compare MySQL-Python to PyMySQL in that sense the differences in 
Python overhead vs. not become much less a proportion of the overhead 
already.


Take both drivers and put them way deep into the very elaborate 
operations we see Openstack DB backends doing and it's quite difficult 
to observe differences qualitatively; unless you really did speed tests 
for many thousands of identical operations on both.   It's usually in 
the we tested how long it would take to do 10K or 100K rows / 
operations / etc space that differences like these add up. Which is 
why, as is in my blog post, I take the stance that using things like 
eventlet / gevent / async for database code in the first place is not 
really worth the extra headaches at all, even if they did prove to be 
faster than traditional threads, which also I show that they are in fact 
not, for CRUD-style database code as we do in Openstack apps.



I don't recall him saying that specifically. Also last I recall he
admitted he hadn't actually tested under the sorts of load we would
drive in a production OpenStack service--merely performed some
fairly artificial benchmarks looping known-expensive operations that
may not ultimately reflect places in our codebase where introducing
any sort of slowdown would be noticeable compared to other
operations being performed.

Chances are the Project Infrastructure systems will continue
incrementally switching to PyMySQL mainly because it's easier to
install and works on a broader variety of platforms.



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev