<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7140</bug_id>
          
          <creation_ts>2015-01-14 14:11:46 +0000</creation_ts>
          <short_desc>Performance issue when using MySQL with innodb on Toaster</short_desc>
          <delta_ts>2015-02-25 14:03:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Magnus D">magnustoaster</reporter>
          <assigned_to name="Alexandru Damian">alexandru.damian</assigned_to>
          <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>cristiana.voicu</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47904</commentid>
    <comment_count>0</comment_count>
    <who name="Magnus D">magnustoaster</who>
    <bug_when>2015-01-14 14:11:46 +0000</bug_when>
    <thetext>This problem applies to Toaster using commit 876370419a50264a28feb4278f8c465b0019e709 from the master branch.

MySQL 5.5.40 on Ubuntu uses InnoDB as the default engine. When running Toaster it takes about 20 minutes to save the results to the database. A brief analysis shows that every single query is wrapped in explicit set autocommit commands. Example from the MySQL log:

Query     set autocommit=0
Query     INSERT INTO `orm_package_file` (`package_id`, `path`, `size`) VALUES (7, &apos;/etc/init.d/modutils.sh&apos;, 1223)
Query     commit
Query     set autocommit=1

For a normal build there are more than 50000 such explicit commands, resulting in poor performance. The same wrapping of queries appears when using MyISAM, but overall performance is better.

A possible solution would be to disable the autocommit in Django.MySQL, and add explicit commits.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48906</commentid>
    <comment_count>1</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2015-02-18 15:12:46 +0000</bug_when>
    <thetext>Pushed for review on 

poky-contrib: adamian/20150217_bug_7004

Basically moving all build data in a single transaction, data insertion time using InnoDB over TCP/IP dropped from 5 minutes to 3 seconds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49036</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2015-02-25 14:03:33 +0000</bug_when>
    <thetext>Merged to master.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>