<?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>10695</bug_id>
          
          <creation_ts>2016-11-21 12:53:57 +0000</creation_ts>
          <short_desc>sqlite: upstream performance problem</short_desc>
          <delta_ts>2017-01-26 16:39:24 +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>OE-Core</product>
          <component>core</component>
          <version>2.3</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>2.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Maxin B. John">maxin.john</assigned_to>
          <cc>maxin.john</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68456</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-11-21 12:53:57 +0000</bug_when>
    <thetext>Patch https://patchwork.openembedded.org/patch/132885/ reverted an upstream patch in sqlite which caused a performance regression (see bug #10367).

As discussed in response to that patch, upstream needs to be notified about that problem and either also needs to revert the patch or find some other solution for whatever they were trying to achieve in the first place.

If we don&apos;t do that, updating to future versions of sqlite will be hard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69465</commentid>
    <comment_count>1</comment_count>
    <who name="Jianxun Zhang">jianxun.zhang</who>
    <bug_when>2017-01-04 01:51:04 +0000</bug_when>
    <thetext>I have sent an email to sqlite user mailing list, CCing Patrick, pseudo maintainer and Saul.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69549</commentid>
    <comment_count>2</comment_count>
      <attachid>3588</attachid>
    <who name="Jianxun Zhang">jianxun.zhang</who>
    <bug_when>2017-01-05 19:31:32 +0000</bug_when>
    <thetext>Created attachment 3588
Correspondence with Sqlite3 team</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69550</commentid>
    <comment_count>3</comment_count>
    <who name="Jianxun Zhang">jianxun.zhang</who>
    <bug_when>2017-01-05 19:39:03 +0000</bug_when>
    <thetext>Refer to the attached correspondence between us and Sqlite3 team. Although the fix is in 3.16.0 but we are suggested to wait for 3.16.2 release which should come out very soon.

I think once the Sqlite 3 component in YP is updated to 3.16.2 or any newer versions than it we can re-benchmark without the reverting patch then decide the next to do.

Add maxin.john@intel.com the maintainer of sqlite 3 in watch list.

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69702</commentid>
    <comment_count>4</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2017-01-11 10:03:24 +0000</bug_when>
    <thetext>(In reply to comment #3)
...
&gt; I think once the Sqlite 3 component in YP is updated to 3.16.2 or any newer
&gt; versions than it we can re-benchmark without the reverting patch then decide
&gt; the next to do.
&gt; 
&gt; Add maxin.john@intel.com the maintainer of sqlite 3 in watch list.
&gt; 

Patch for sqlite3 version upgrade to 3.16.2 sent to oe-core mailing list: 

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/mut&amp;id=41b9dd7ddc0b270638ccfb57429d355b1eea5276</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69731</commentid>
    <comment_count>5</comment_count>
    <who name="Jianxun Zhang">jianxun.zhang</who>
    <bug_when>2017-01-11 20:32:39 +0000</bug_when>
    <thetext>Maxin.
Thanks lot!
BTW, did you have any chance to verify no performance regression with the new version in the patch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69740</commentid>
    <comment_count>6</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2017-01-12 09:38:03 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Maxin.
&gt; Thanks lot!
&gt; BTW, did you have any chance to verify no performance regression with the
&gt; new version in the patch?

# /usr/bin/time -v bitbake core-image-minimal

Without the upgrade:

Summary: There were 2 WARNING messages shown.
	Command being timed: &quot;bitbake core-image-minimal&quot;
	User time (seconds): 11889.38
	System time (seconds): 3087.18
	Percent of CPU this job got: 300%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 1:23:08
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 802816
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 7888
	Minor (reclaiming a frame) page faults: 721841293
	Voluntary context switches: 19513415
	Involuntary context switches: 5332647
	Swaps: 0
	File system inputs: 5243800
	File system outputs: 54152904
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

After upgrade:

Summary: There were 2 WARNING messages shown.
	Command being timed: &quot;bitbake core-image-minimal&quot;
	User time (seconds): 12026.36
	System time (seconds): 3064.97
	Percent of CPU this job got: 341%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 1:13:40
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 802860
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 7551
	Minor (reclaiming a frame) page faults: 721237606
	Voluntary context switches: 17455269
	Involuntary context switches: 7620493
	Swaps: 0
	File system inputs: 5461224
	File system outputs: 53941600
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

In addition to this, Ross mentioned that this upgrade will be tested on performance cluster before pushing to master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69764</commentid>
    <comment_count>7</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-01-12 16:45:59 +0000</bug_when>
    <thetext>Can this patch be tested also with the Ostro failing issue, I know it&apos;s not being supported, but it did show the worst performance regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70189</commentid>
    <comment_count>8</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-01-26 16:39:24 +0000</bug_when>
    <thetext>Upstream fixed this in 3.16.2, merged in oe-core 05317fe9f11565d40b84ad71300b39c990a53f6d.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3588</attachid>
            <date>2017-01-05 19:31:32 +0000</date>
            <delta_ts>2017-01-05 19:31:32 +0000</delta_ts>
            <desc>Correspondence with Sqlite3 team</desc>
            <filename>Re_ [sqlite] Commit ad601c7962 degrade performance in a client program.eml</filename>
            <type>message/rfc822</type>
            <size>1659</size>
            <attacher name="Jianxun Zhang">jianxun.zhang</attacher>
            
              <data encoding="base64">Q29udGVudC1UeXBlOiB0ZXh0L3BsYWluOw0KCWNoYXJzZXQ9dXMtYXNjaWkNCk1pbWUtVmVyc2lv
bjogMS4wIChNYWMgT1MgWCBNYWlsIDEwLjIgXCgzMjU5XCkpDQpTdWJqZWN0OiBSZTogW3NxbGl0
ZV0gQ29tbWl0IGFkNjAxYzc5NjIgZGVncmFkZSBwZXJmb3JtYW5jZSBpbiBhIGNsaWVudA0KIHBy
b2dyYW0NClgtVW5pdmVyc2FsbHktVW5pcXVlLUlkZW50aWZpZXI6IDE2NkMwOUIyLTlENjUtNDEz
NS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