{
  "date": "2018-01-14T20:12:07",
  "slug": "spectre-and-meltdown-on-oracle-public-cloud-uek",
  "link": "https://www.dbi-services.com/blog/spectre-and-meltdown-on-oracle-public-cloud-uek/",
  "title": {
    "rendered": "Spectre and Meltdown on Oracle Public Cloud UEK &#8211; LIO"
  },
  "content": {
    "rendered": "<h2>By Franck Pachot</h2>\n<p>.<br />\nIn the <a href=\"https://www.dbi-services.com/blog/spectremeltdown-on-oracle-public-cloud-uek-pio/\" target=\"_blank\" rel=\"noopener noreferrer\">last post</a> I published the strange results I had when testing physical I/O with the latest Spectre and Meltdown patches. There is the logical I/O with <a href=\"https://kevinclosson.net/slob/\" target=\"_blank\" rel=\"noopener noreferrer\">SLOB</a> cached reads.<br />\n<!--more--></p>\n<h3>Logical reads</h3>\n<p>I&#8217;ve run some <a href=\"https://kevinclosson.net/slob/\" target=\"_blank\" rel=\"noopener noreferrer\">SLOB</a> cache reads with the latest patches, as well as with only KPTI disabled, and with KPTI, IBRS and IBPB disabled.<br />\nI am on the Oracle Public Cloud DBaaS with 4 OCPU </p>\n<pre><code>\nDB Time(s) :  1.0    DB CPU(s) :  1.0    Logical read (blocks) :    670,001.2\nDB Time(s) :  1.0    DB CPU(s) :  1.0    Logical read (blocks) :    671,145.4\nDB Time(s) :  1.0    DB CPU(s) :  1.0    Logical read (blocks) :    672,464.0\nDB Time(s) :  1.0    DB CPU(s) :  1.0    Logical read (blocks) :    685,706.7     nopti\nDB Time(s) :  1.0    DB CPU(s) :  1.0    Logical read (blocks) :    689,291.3     nopti\nDB Time(s) :  1.0    DB CPU(s) :  1.0    Logical read (blocks) :    689,386.4     nopti\nDB Time(s) :  1.0    DB CPU(s) :  1.0    Logical read (blocks) :    699,301.3     nopti noibrs noibpb\nDB Time(s) :  1.0    DB CPU(s) :  1.0    Logical read (blocks) :    704,773.3     nopti noibrs noibpb\nDB Time(s) :  1.0    DB CPU(s) :  1.0    Logical read (blocks) :    704,908.2     nopti noibrs noibpb\n</code></pre>\n<p>This is what I expected: when disabling the mitigation for Meltdown (PTI), and for some of the Spectre (IBRS and IBPB), I have a slightly better performance &#8211; about 5%. This is with only one SLOB session.</p>\n<p>However, with 2 sessions I have something completely different:</p>\n<pre><code>\nDB Time(s) :  2.0    DB CPU(s) :  2.0    Logical read (blocks) :  1,235,637.8     nopti noibrs noibpb\nDB Time(s) :  2.0    DB CPU(s) :  2.0    Logical read (blocks) :  1,237,689.6     nopti\nDB Time(s) :  2.0    DB CPU(s) :  2.0    Logical read (blocks) :  1,243,464.3     nopti noibrs noibpb\nDB Time(s) :  2.0    DB CPU(s) :  2.0    Logical read (blocks) :  1,247,257.4     nopti\nDB Time(s) :  2.0    DB CPU(s) :  2.0    Logical read (blocks) :  1,247,257.4     nopti noibrs noibpb\nDB Time(s) :  2.0    DB CPU(s) :  2.0    Logical read (blocks) :  1,251,485.1\nDB Time(s) :  2.0    DB CPU(s) :  2.0    Logical read (blocks) :  1,253,477.0\nDB Time(s) :  2.0    DB CPU(s) :  2.0    Logical read (blocks) :  1,271,986.7\n</code></pre>\n<p>This is not a saturation situation here. My VM shape is 4 OCPUs, which is supposed to be the equivalent of 4 hyperthreaded cores. </p>\n<p>And this figure is even worse with 4 sessions (all cores used) and more:</p>\n<pre><code>\nDB Time(s) :  4.0    DB CPU(s) :  4.0    Logical read (blocks) :  2,268,272.3     nopti noibrs noibpb\nDB Time(s) :  4.0    DB CPU(s) :  4.0    Logical read (blocks):   2,415,044.8\n</code></pre>\n<pre><code>\nDB Time(s) :  6.0    DB CPU(s) :  6.0    Logical read (blocks) :  3,353,985.7     nopti noibrs noibpb\nDB Time(s) :  6.0    DB CPU(s) :  6.0    Logical read (blocks):   3,540,736.5\n</code></pre>\n<pre><code>\nDB Time(s) :  8.0    DB CPU(s) :  7.9    Logical read (blocks) :  4,365,752.3     nopti noibrs noibpb\nDB Time(s) :  8.0    DB CPU(s) :  7.9    Logical read (blocks):   4,519,340.7\n</code></pre>\n<p>The graph from those is here:<br />\n<a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureOPCLIO001.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureOPCLIO001.png\" alt=\"CaptureOPCLIO001\" width=\"745\" height=\"467\" class=\"aligncenter size-full wp-image-20641\" /></a></p>\n<p>If I compare with the Oracle PaaS I tested last year (<a href=\"https://www.dbi-services.com/blog/oracle-public-cloud-liops-with-4-ocpu-in-paas/\" target=\"_blank\" rel=\"noopener noreferrer\">https://www.dbi-services.com/blog/oracle-public-cloud-liops-with-4-ocpu-in-paas/</a>) which was on Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz you can also see a nice improvement here on Intel(R) Xeon(R) CPU E5-2699C v4 @ 2.20GHz.</p>\n<p>This test was on 4.1.12-112.14.10.el7uek.x86_64 and Oracle Linux has now released a new update: 4.1.12-112.14.11.el7uek</p>\n",
    "protected": false
  }
}
