<div dir="ltr">Sean, <div><br></div><div><br></div><div>Absolutely agree with you.</div><div>It's not the same to execute query and get plain text, and execute query and get hierarchy of python objects. </div><div><br>
</div><div>Plus I disagree when I hear that SQLAlchemy is slow. It's slow when you are using it wrong.</div><div><br></div><div>Like in Nova Scheduler [1] we were fetching full 3 tables with JOIN. Which produce much more results from DB (in bytes and rows) then just make 3 separated selects and then join it by hand. </div>
<div><br></div><div>We should stop using next phrases: </div><div>1) python is slow</div><div>2) mysql is slow</div><div>3) sqlalchemy is slow</div><div>4) hardware is slow [2]</div><div><br></div><div>And start using these phrase: </div>
<div>1) Algorithms that we are using are bad</div><div>2) Architecture solutions that we are using are bad</div><div><br></div><div>And start thinking about how to improve them. </div><div><br></div><div><br></div><div>[1] <a href="https://review.openstack.org/#/c/43151/">https://review.openstack.org/#/c/43151/</a></div>
<div>[2] <a href="http://en.wikipedia.org/wiki/Buran_(spacecraft)">http://en.wikipedia.org/wiki/Buran_(spacecraft)</a></div><div><br></div><div>Best regards,</div><div>Boris Pavlovic </div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Mar 21, 2014 at 3:04 PM, Sean Dague <span dir="ltr"><<a href="mailto:sean@dague.net" target="_blank">sean@dague.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On 03/20/2014 06:18 PM, Joe Gordon wrote:<br>
><br>
><br>
><br>
> On Thu, Mar 20, 2014 at 3:03 PM, Alexei Kornienko<br>
</div><div class="">> <<a href="mailto:alexei.kornienko@gmail.com">alexei.kornienko@gmail.com</a> <mailto:<a href="mailto:alexei.kornienko@gmail.com">alexei.kornienko@gmail.com</a>>> wrote:<br>
><br>
> Hello,<br>
><br>
> We've done some profiling and results are quite interesting:<br>
> during 1,5 hour ceilometer inserted 59755 events (59755 calls to<br>
> record_metering_data)<br>
> this calls resulted in total 2591573 SQL queries.<br>
><br>
> And the most interesting part is that 291569 queries were ROLLBACK<br>
> queries.<br>
> We do around 5 rollbacks to record a single event!<br>
><br>
> I guess it means that MySQL backend is currently totally unusable in<br>
> production environment.<br>
><br>
><br>
> It should be noticed that SQLAlchemy is horrible for performance, in<br>
> nova we usually see sqlalchemy overheads of well over 10x (time<br>
> nova.db.api call vs the time MySQL measures when slow log is recording<br>
> everything).<br>
<br>
</div>That's not really a fair assessment. Python object inflation takes time.<br>
I do get that there is SQLA overhead here, but even if you trimmed it<br>
out you would not get the the mysql query time.<br>
<br>
That being said, having Ceilometer's write path be highly tuned and not<br>
use SQLA (and written for every back end natively) is probably appropriate.<br>
<div class="HOEnZb"><div class="h5"><br>
-Sean<br>
<br>
--<br>
Sean Dague<br>
Samsung Research America<br>
<a href="mailto:sean@dague.net">sean@dague.net</a> / <a href="mailto:sean.dague@samsung.com">sean.dague@samsung.com</a><br>
<a href="http://dague.net" target="_blank">http://dague.net</a><br>
<br>
</div></div><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>