{"id":8930,"date":"2023-01-25T19:57:55","date_gmt":"2023-01-25T22:57:55","guid":{"rendered":"https:\/\/swiv.com.br\/?p=8930"},"modified":"2023-01-25T19:57:55","modified_gmt":"2023-01-25T22:57:55","slug":"how-to-identify-i-o-bottlenecks-on-oracle-linux","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2023\/01\/25\/how-to-identify-i-o-bottlenecks-on-oracle-linux\/","title":{"rendered":"How to identify I\/O-Bottlenecks on Oracle Linux"},"content":{"rendered":"\n<p>Parecido com o artigo sobre consumo de CPU e Mem\u00f3ria, hoje escreverei sobre I\/O, contemplando parte te\u00f3rica e pr\u00e1tica. Antes de ir para \u00e0s ferramentas em efetivo, s\u00f3 gostaria de compartilhar a imagem abaixo, retirada da obra &#8220;Linux and Solaris Recipes for Oracle DBAs&#8221;. Achei muito interessante, para vermos as diversas camadas que precisamos saber que existem e podem nos gerar problemas:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2023\/01\/image-32.png\" alt=\"\" class=\"wp-image-8941\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Vmstat<\/h2>\n\n\n\n<p>Uma forma simples de acompanhar se h\u00e1 um grande fluxo de I\/O no servidor \u00e9 atrav\u00e9s do comando &#8220;vmstat&#8221;, especificamente nas colunas bi e bo, conforme diz o man abaixo:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2023\/01\/image-31.png\" alt=\"\" class=\"wp-image-8932\"\/><\/figure>\n\n\n\n<p>Este \u00e9 um exemplo do comando executado em uma VM que n\u00e3o est\u00e1 experimentando muitos eventos de I\/O:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ vmstat 1 10 -S m\nprocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st\n 1  0      0  10566     12   4691    0    0    21     0  471  545  4  2 89  5  0\n 0  0      0  10566     12   4691    0    0     0     0 2101 2953  1  1 99  0  0\n 0  0      0  10566     12   4691    0    0    48     0 2316 3052  2  1 97  0  0\n 0  0      0  10566     12   4691    0    0     0     0 2011 2664  1  1 99  0  0\n 0  0      0  10565     12   4691    0    0    20     0 2072 2842  1  1 99  0  0\n 0  0      0  10566     12   4691    0    0    48     0 2166 3028  1  1 99  0  0\n 1  0      0  10565     12   4691    0    0     0     0 2020 2679  1  1 99  0  0\n 0  0      0  10561     12   4691    0    0    25     0 3265 3729  4  5 91  0  0\n 1  0      0  10561     12   4691    0    0    48     0 1883 2446  2  2 97  0  0\n 0  0      0  10564     12   4691    0    0     0     0 2556 3201  2  2 96  0  0\n&#x5B;oracle@oel7 ~]$\n<\/pre><\/div>\n\n\n<p>Com o comando abaixo, vamos simular a cria\u00e7\u00e3o de um arquivo de 2GB e acompanhar o vmstat:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ cd \/oracle\n&#x5B;oracle@oel7 oracle]$ dd if=\/dev\/urandom of=GIGtestfile bs=1M count=2048 oflag=direct &amp;amp;\n&#x5B;1] 18568\n&#x5B;oracle@oel7 oracle]$\n<\/pre><\/div>\n\n\n<p>Vemos um n\u00famero acima da m\u00e9dia na coluna bi:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ vmstat 1 15 -S m\nprocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st\n 1  0      0  10590     14   4715    0    0   196     0  384  503  2  2 95  1  0\n 1  0      0  10590     14   4715    0    0 74784     0 5601 5230  1 17 82  1  0\n 1  0      0  10591     14   4715    0    0 75832     0 5082 5209  0 16 83  1  0\n 1  0      0  10590     14   4715    0    0 75836     0 5293 5119  0 16 83  1  0\n 1  0      0  10591     14   4715    0    0 75808     0 4799 5033  1 16 82  1  0\n 0  1      0  10590     14   4715    0    0 76908     0 4928 4990  0 16 83  1  0\n 0  1      0  10590     14   4715    0    0 75776     0 4790 4921  1 16 82  1  0\n 1  0      0  10590     14   4715    0    0 75852     0 4819 4937  0 16 83  1  0\n 0  0      0  10591     14   4715    0    0 50192     0 3987 4312  0 11 88  1  0\n 0  0      0  10591     14   4715    0    0     0     0 2165 2804  1  1 99  0  0\n 0  0      0  10591     14   4715    0    0    60     0 2064 2771  1  1 99  0  0\n 1  0      0  10591     14   4715    0    0    24     0 1820 2444  1  1 99  0  0\n 1  0      0  10592     14   4715    0    0     0     0 1871 2609  1  1 99  0  0\n 0  0      0  10591     14   4715    0    0    72     0 2158 2945  2  1 97  0  0\n 0  0      0  10591     14   4715    0    0    16     0 1871 2509  1  1 99  0  0\n&#x5B;oracle@oel7 ~]$\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 oracle]$ 2048+0 records in\n2048+0 records out\n2147483648 bytes (2.1 GB) copied, 28.0244 s, 76.6 MB\/s\n\n&#x5B;1]+  Done                    dd if=\/dev\/urandom of=GIGtestfile bs=1M count=2048 oflag=direct\n&#x5B;oracle@oel7 oracle]$\n<\/pre><\/div>\n\n\n<p>Executando o utilit\u00e1rio stress para provocar eventos de I\/O e acompanhar o ambiente:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 oracle]$ stress --cpu 1 --io 2 --hdd 2 --hdd-bytes 1GB --timeout 20s\nstress: info: &#x5B;22128] dispatching hogs: 1 cpu, 2 io, 0 vm, 2 hdd\nstress: info: &#x5B;22128] successful run completed in 20s\n&#x5B;oracle@oel7 oracle]$\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ vmstat 1 15 -S m\nprocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st\n 2  3      0  10524     81   4719    0    0   243     0  386  505  2  2 96  1  0\n 6  0      0  10514     91   4719    0    0 68928     0 27215 39741 19 21 50 10  0\n 2  3      0  10500     99   4719    0    0 54452     0 25345 35242 24 29 39  9  0\n 3  3      0  10495    106   4720    0    0 65578     0 27136 39320 19 22 46 12  0\n 4  0      0  10489    113   4720    0    0 65651     0 23326 38991 19 22 48 11  0\n 5  0      0  10485    118   4720    0    0 68290     0 23503 40173 19 22 48 10  0\n 3  0      0  10480    123   4720    0    0 71564     0 24071 41831 19 20 50 10  0\n 4  0      0  10477    126   4720    0    0 63325     0 21934 37358 19 20 48 13  0\n 4  0      0  10473    130   4720    0    0 69096     0 23402 40640 19 20 50 11  0\n 3  0      0  10470    133   4720    0    0 70816     0 23801 41330 19 21 50 11  0\n 5  0      0  10468    135   4720    0    0 71528     0 23943 41790 19 20 50 10  0\n 4  0      0  10465    138   4721    0    0 70617     0 23636 41026 19 19 51 11  0\n 4  0      0  10464    140   4721    0    0 68601     0 23729 40119 19 22 49  9  0\n 0  0      0  10464    140   4721    0    0 46584     0 16904 28403 13 15 66  7  0\n 0  0      0  10465    140   4721    0    0     0     0 1847 2518  0  0 99  0  0\n&#x5B;oracle@oel7 ~]$\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">IOtop<\/h2>\n\n\n\n<p>Caso o iotop n\u00e3o esteja instalado, basta fazer o seguinte:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ iotop\nbash: iotop: command not found...\n\n...\n\n&#x5B;root@oel7 ~]# yum install iotop\nLoaded plugins: langpacks, ulninfo\nol7_UEKR5                                                                                                                                    | 3.0 kB  00:00:00\nol7_latest                                                                                                                                   | 3.6 kB  00:00:00\n(1\/4): ol7_UEKR5\/x86_64\/updateinfo                                                                                                           | 345 kB  00:00:06\n(2\/4): ol7_latest\/x86_64\/updateinfo                                                                                                          | 3.5 MB  00:01:03\n(3\/4): ol7_latest\/x86_64\/primary_db                                                                                                          |  44 MB  00:05:08\n(4\/4): ol7_UEKR5\/x86_64\/primary_db                                                                                                           |  62 MB  00:07:03\nResolving Dependencies\n--&gt; Running transaction check\n---&gt; Package iotop.noarch 0:0.6-4.el7 will be installed\n--&gt; Finished Dependency Resolution\n\nDependencies Resolved\n\n====================================================================================================================================================================\n Package                             Arch                                 Version                                    Repository                                Size\n====================================================================================================================================================================\nInstalling:\n iotop                               noarch                               0.6-4.el7                                  ol7_latest                                52 k\n\nTransaction Summary\n====================================================================================================================================================================\nInstall  1 Package\n\nTotal download size: 52 k\nInstalled size: 156 k\nIs this ok &#x5B;y\/d\/N]: y\nDownloading packages:\niotop-0.6-4.el7.noarch.rpm                                                                                                                   |  52 kB  00:00:03\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n  Installing : iotop-0.6-4.el7.noarch                                                                                                                           1\/1\n  Verifying  : iotop-0.6-4.el7.noarch                                                                                                                           1\/1\n\nInstalled:\n  iotop.noarch 0:0.6-4.el7\n\nComplete!\n&#x5B;root@oel7 ~]#\n\n..\n\n&#x5B;root@oel7 ~]# cat \/etc\/sudoers | grep oracle\noracle  ALL=\/usr\/sbin\/iotop\n&#x5B;root@oel7 ~]#\n<\/pre><\/div>\n\n\n<p>O IOTOP \u00e9 basicamento o comando TOP, mas focado nos eventos de I\/O. Uma vez que identificamos uma anormalidade na camada de I\/O do servidor (que provavelmente tamb\u00e9m provocou aumento de Load), podemos tentar identificar mais detalhes por ele. No exemplo abaixo, vemos as informa\u00e7\u00f5es exibidas, como o PID,  leitura e escrita, etc:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ sudo iotop\n&#x5B;sudo] password for oracle:\n\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nTotal DISK READ :      54.96 K\/s | Total DISK WRITE :      27.36 M\/s\nActual DISK READ:      69.67 M\/s | Actual DISK WRITE:       0.00 B\/s\n  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO&gt;    COMMAND\n 1319 be\/3 root        0.00 B\/s    2.54 M\/s  0.00 % 46.45 % &#x5B;jbd2\/sdg1-8]\n16192 be\/4 oracle      0.00 B\/s  257.64 K\/s  0.00 % 29.56 % stress --cpu 1 --io 2 --hdd 2 --hdd-bytes 1GB --timeout 30s\n16190 be\/4 oracle      0.00 B\/s  216.42 K\/s  0.00 % 22.21 % stress --cpu 1 --io 2 --hdd 2 --hdd-bytes 1GB --timeout 30s\n16189 be\/4 oracle      0.00 B\/s    0.00 B\/s  0.00 %  7.21 % stress --cpu 1 --io 2 --hdd 2 --hdd-bytes 1GB --timeout 30s\n16191 be\/4 oracle      0.00 B\/s    0.00 B\/s  0.00 %  2.97 % stress --cpu 1 --io 2 --hdd 2 --hdd-bytes 1GB --timeout 30s\n 4568 be\/4 oracle     54.96 K\/s   27.48 K\/s  0.00 %  0.08 % ora_ckpt_cortex\n 1318 be\/3 root        0.00 B\/s   10.31 K\/s  0.00 %  0.07 % &#x5B;jbd2\/sdf1-8]\n15159 be\/4 root        0.00 B\/s    0.00 B\/s  0.00 %  0.01 % &#x5B;kworker\/u12:3]\n 3761 be\/4 grid        0.00 B\/s   13.74 K\/s  0.00 %  0.00 % oraagent.bin\n 3803 be\/4 grid        0.00 B\/s    6.87 K\/s  0.00 %  0.00 % ocssd.bin\n    1 be\/4 root        0.00 B\/s    0.00 B\/s  0.00 %  0.00 % systemd --switched\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">IOstat<\/h2>\n\n\n\n<p>Gosto bastante desta ferramenta, pois ela j\u00e1 exibe os devices, e com os par\u00e2metros &#8220;xd&#8221;, \u00e9 poss\u00edvel avaliar a % de uso, facilitando a investiga\u00e7\u00e3o. O &#8220;10&#8221; significa o tempo em segundos que as informa\u00e7\u00f5es ser\u00e3o atualizadas:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ iostat -xd 10\nLinux 4.14.35-1902.3.2.el7uek.x86_64 (oel7.localdomain)         01\/19\/2023      _x86_64_        (6 CPU)\n\nDevice:         rrqm\/s   wrqm\/s     r\/s     w\/s    rkB\/s    wkB\/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util\nsda               0.01     0.19    2.52    1.47   101.64   163.59   133.00     0.15   36.73    9.75   82.92   0.82   0.33\ndm-0              0.00     0.00    2.36    1.58    94.81   164.17   131.43     0.11   27.42    9.98   53.44   0.79   0.31\ndm-1              0.00     0.00    0.02    0.00     0.45     0.00    49.54     0.00   11.85   11.85    0.00   0.81   0.00\nsdc               0.00     0.00    0.26    0.96     3.20     9.63    21.11     0.00    1.24    3.28    0.70   0.99   0.12\nsdb               0.00     0.00    0.22    0.32     3.54     1.29    17.72     0.00    1.35    2.93    0.26   1.02   0.06\nsdd               0.00     0.00    0.22    0.34     1.86     2.82    16.69     0.00    2.31    2.61    2.11   0.98   0.05\nsde               0.00     0.00    3.94    1.23    63.06    13.44    29.58     0.01    2.50    3.08    0.64   0.68   0.35\nsdf               0.01     0.83    1.06    1.11   128.72     8.34   126.43     0.01    6.72   12.88    0.81   0.53   0.11\nsdg               0.02   358.70    7.98  134.50   954.20  2809.42    52.83     0.08    0.58    5.60    0.28   0.22   3.13\n\nDevice:         rrqm\/s   wrqm\/s     r\/s     w\/s    rkB\/s    wkB\/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util\nsda               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00\ndm-0              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00\ndm-1              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00\nsdc               0.00     0.00    0.00    0.60     0.00     6.00    20.00     0.00    0.50    0.00    0.50   1.50   0.09\nsdb               0.00     0.00    0.00    0.30     0.00     1.20     8.00     0.00    0.00    0.00    0.00   1.00   0.03\nsdd               0.00     0.00    0.00    0.30     0.00     1.20     8.00     0.00    0.00    0.00    0.00   1.00   0.03\nsde               0.00     0.00    1.60    0.60    25.60     6.00    28.73     0.00    0.91    1.19    0.17   0.59   0.13\nsdf               0.00     1.50    0.00    8.60     0.00    40.40     9.40     0.01    1.09    0.00    1.09   0.38   0.33\nsdg               0.00 13688.40    0.10 4814.20     0.40 74010.40    30.75     0.73    0.15    7.00    0.15   0.19  89.59\n\nDevice:         rrqm\/s   wrqm\/s     r\/s     w\/s    rkB\/s    wkB\/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util\nsda               0.00     1.10    0.00    1.90     0.00    16.25    17.11     0.00    1.84    0.00    1.84   0.21   0.04\ndm-0              0.00     0.00    0.00    3.00     0.00    16.25    10.83     0.01    1.83    0.00    1.83   0.13   0.04\ndm-1              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00\nsdc               0.00     0.00    0.00    0.60     0.00     6.00    20.00     0.00    0.17    0.00    0.17   1.17   0.07\nsdb               0.00     0.00    0.00    0.30     0.00     1.20     8.00     0.00    0.00    0.00    0.00   1.00   0.03\nsdd               0.00     0.00    0.00    0.30     0.00     1.20     8.00     0.00    0.00    0.00    0.00   1.00   0.03\nsde               0.00     0.00    1.60    0.60    25.60     6.00    28.73     0.00    1.23    1.56    0.33   0.73   0.16\nsdf               0.00     1.90    0.00    8.90     0.00    43.20     9.71     0.01    0.99    0.00    0.99   0.35   0.31\nsdg               0.00 14524.90    0.00 5012.90     0.00 78151.20    31.18     0.68    0.14    0.00    0.14   0.19  94.47\n\n^C\n<\/pre><\/div>\n\n\n<p>Observa\u00e7\u00e3o: o iostat trabalha na camada dos devices l\u00f3gicos. Ou seja, caso o problema seja em um disco f\u00edsisco de Storage, apresentado como uma LUN, esse n\u00edvel de detalhe n\u00e3o \u00e9 exposto no output.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Oracle Database Layer<\/h2>\n\n\n\n<p>Com os comandos acima, j\u00e1 conseguimos identificar os processos que est\u00e3o mais consumindo I\/O, e em quais devices. Na camada de banco de dados, conseguimos listar os processos que est\u00e3o aguardando recurso de I\/O pela consulta abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSELECT a.username, a.sql_id, b.object_name, b.object_type, a.event\nFROM v$session a\n,dba_objects b\n,v$event_name c\nWHERE b.object_id = a.row_wait_obj#\nAND a.event = c.name\nAND c.wait_class = &#039;User I\/O&#039;;\n<\/pre><\/div>\n\n\n<p>H\u00e1 tamb\u00e9m a possibilidade de investigarmos estes eventos pelos relat\u00f3rios AWR (caso licenciado) ou Statspack, nas sess\u00f5es que tratam de I\/O.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sysstat\/pidstat<\/h2>\n\n\n\n<p>Caso o IOTOP seja impeditivo, pela necessidade de instala\u00e7\u00e3o, uma alternativa de tentar identificar processos e seus respectivos consumo de I\/O seria usando o comando &#8220;pidstat&#8221;, que faz parte do pacote &#8220;sysstat&#8221;. Descobri essa possibilidade atrav\u00e9s do Oracle Note &#8220;<strong>Oracle Linux: How to monitor I\/O activity per process (Doc ID 2910779.1)<\/strong>&#8220;:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ pidstat -d\nLinux 4.14.35-1902.3.2.el7uek.x86_64 (oel7.localdomain)         01\/19\/2023      _x86_64_        (6 CPU)\n\n08:39:03 PM   UID       PID   kB_rd\/s   kB_wr\/s kB_ccwr\/s  Command\n08:39:03 PM 54321      3285    748.52   1730.71    970.84  bash\n08:39:03 PM 54321     15426      8.95      0.00      0.00  bash\n08:39:03 PM 54321     31973      0.00    104.02    103.05  stress\n08:39:03 PM 54321     31975      0.00    102.47    101.54  stress\n&#x5B;oracle@oel7 ~]$ pidstat -d\nLinux 4.14.35-1902.3.2.el7uek.x86_64 (oel7.localdomain)         01\/19\/2023      _x86_64_        (6 CPU)\n\n08:39:09 PM   UID       PID   kB_rd\/s   kB_wr\/s kB_ccwr\/s  Command\n08:39:09 PM 54321      3285    747.72   1936.92   1175.95  bash\n08:39:09 PM 54321     15426      8.94      0.00      0.00  bash\n&#x5B;oracle@oel7 ~]$\n<\/pre><\/div>\n\n\n<p>No exemplo acima, de forma proposital, vemos que h\u00e1 2 processos que n\u00e3o aparecem na segunda execu\u00e7\u00e3o do comando, pois o seu processo origem foi finalizado. Ou seja, s\u00f3 \u00e9 poss\u00edvel ver as condi\u00e7\u00f5es de uso no momento da execu\u00e7\u00e3o. Caso queiramos guardar as informa\u00e7\u00f5es para an\u00e1lise posterior, podemos usufruir do comando de exemplo abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ while true; do date | tee -a \/tmp\/ioperprocess.stat; pidstat -d | tee -a \/tmp\/ioperprocess.stat; sleep 5; done\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ cat \/tmp\/ioperprocess.stat\nThu Jan 19 20:41:28 -03 2023\nLinux 4.14.35-1902.3.2.el7uek.x86_64 (oel7.localdomain)         01\/19\/2023      _x86_64_        (6 CPU)\n\n08:41:28 PM   UID       PID   kB_rd\/s   kB_wr\/s kB_ccwr\/s  Command\n08:41:28 PM 54321      1425      0.00     19.90     19.73  stress\n08:41:28 PM 54321      1427      0.00     20.33     20.15  stress\n08:41:28 PM 54321      1513      0.00      0.00      0.00  tee\n08:41:28 PM 54321      3285    729.63   1890.05   1147.49  bash\n08:41:28 PM 54321     15426      8.73      0.00      0.00  bash\nThu Jan 19 20:41:33 -03 2023\nLinux 4.14.35-1902.3.2.el7uek.x86_64 (oel7.localdomain)         01\/19\/2023      _x86_64_        (6 CPU)\n\n08:41:33 PM   UID       PID   kB_rd\/s   kB_wr\/s kB_ccwr\/s  Command\n08:41:33 PM 54321      1425      0.00     37.19     36.87  stress\n08:41:33 PM 54321      1427      0.00     39.51     39.19  stress\n08:41:33 PM 54321      1553      0.00      0.00      0.00  tee\n08:41:33 PM 54321      3285    728.98   1888.38   1146.48  bash\n08:41:33 PM 54321     15426      8.72      0.00      0.00  bash\nThu Jan 19 20:41:38 -03 2023\nLinux 4.14.35-1902.3.2.el7uek.x86_64 (oel7.localdomain)         01\/19\/2023      _x86_64_        (6 CPU)\n\n08:41:38 PM   UID       PID   kB_rd\/s   kB_wr\/s kB_ccwr\/s  Command\n08:41:38 PM 54321      1425      0.00     54.51     54.05  stress\n08:41:38 PM 54321      1427      0.00     58.31     57.82  stress\n08:41:38 PM 54321      1599      0.00      0.00      0.00  tee\n08:41:38 PM 54321      3285    728.34   1886.72   1145.48  bash\n08:41:38 PM 54321     15426      8.71      0.01      0.00  bash\nThu Jan 19 20:41:43 -03 2023\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Testing I\/O rates<\/h2>\n\n\n\n<p>Quando \u00e9 necess\u00e1rio medir as taxas de I\/O do sistema (principalmente para provar aos nossos SAs que nosso HDD do laptop pessoal est\u00e1 melhor que o Storage disponibilizado), podemos usar o comando &#8220;dd&#8221;. <\/p>\n\n\n\n<p>Estimativa para escrita:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ time dd if=\/dev\/zero of=swivfile bs=1M count=1024 oflag=direct\n1024+0 records in\n1024+0 records out\n1073741824 bytes (1.1 GB) copied, 11.5458 s, 93.0 MB\/s\n\nreal    0m11.549s\nuser    0m0.007s\nsys     0m0.739s\n&#x5B;oracle@oel7 ~]$\n<\/pre><\/div>\n\n\n<p>Estimativa para leitura:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel7 ~]$ time dd of=\/dev\/null if=swivfile bs=1M count=1024 iflag=direct\n1024+0 records in\n1024+0 records out\n1073741824 bytes (1.1 GB) copied, 10.0512 s, 107 MB\/s\n\nreal    0m10.053s\nuser    0m0.009s\nsys     0m0.176s\n&#x5B;oracle@oel7 ~]$\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">More robust Tools<\/h2>\n\n\n\n<p>Para o objetivo deste artigo, as ferramentas apresentadas s\u00e3o mais do que suficientes para o trabalho. Por\u00e9m, caso voc\u00ea esteja envolvido em um Stress Test, ou an\u00e1lise de capacity, h\u00e1 2 ferramentas que podem ajudar: IOZONE e IOMETER. Elas devem ser usadas com muito cuidado, pois podem afetar negativamente o ambiente (tanto em termos de performance, quanto na consist\u00eancia dos dados persistidos). Recomendo bastante a leitura do Oracle Note &#8220;<strong>Oracle Linux: How to Measure I\/O Performance on Linux (Doc ID 1931009.1)<\/strong>&#8220;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Parecido com o artigo sobre consumo de CPU e Mem\u00f3ria, hoje escreverei sobre I\/O, contemplando parte te\u00f3rica e pr\u00e1tica. Antes de ir para \u00e0s ferramentas em efetivo, s\u00f3 gostaria de compartilhar a imagem abaixo, retirada da obra &#8220;Linux and Solaris Recipes for Oracle DBAs&#8221;. Achei muito interessante, para vermos as diversas camadas que precisamos saber [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-8930","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/8930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=8930"}],"version-history":[{"count":0,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/8930\/revisions"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=8930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=8930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=8930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}