Why am i getting Very slow dd dsync test results in Linux












0















I am investigating slow application issues with some New Hardware and am running into some odd results. I am trying to determine what is causing this behavior.



I am using



dd if=x.b1 of=x.b10 bs=8192 oflag=dsync 


of a 101MB file simulate how our database is writing to disk (the dsync flag was suggested by our database vendor), and while normal dd commands without the dsync option are showing 80-100 Mb/s, with the dsync command I am getting results in the 160Kb/s-200Kb/s range.



This behavior has been viewed on multiple pieces of hardware, as well as different model hard drives and doing a drive wipe test



dd if=/dev/zero of=/dev/sda bs=8192 oflag=dsync


shows more expected 80-100Mb/s speed, which seems to suggest it is something in our custom OS that is slowing things down. We have run these tests under a custom SuseLinux as well as OracleOS (32 and 64 bit) and we continue to see these very low numbers.



Can you give me some ideas of where the problem is?










share|improve this question





























    0















    I am investigating slow application issues with some New Hardware and am running into some odd results. I am trying to determine what is causing this behavior.



    I am using



    dd if=x.b1 of=x.b10 bs=8192 oflag=dsync 


    of a 101MB file simulate how our database is writing to disk (the dsync flag was suggested by our database vendor), and while normal dd commands without the dsync option are showing 80-100 Mb/s, with the dsync command I am getting results in the 160Kb/s-200Kb/s range.



    This behavior has been viewed on multiple pieces of hardware, as well as different model hard drives and doing a drive wipe test



    dd if=/dev/zero of=/dev/sda bs=8192 oflag=dsync


    shows more expected 80-100Mb/s speed, which seems to suggest it is something in our custom OS that is slowing things down. We have run these tests under a custom SuseLinux as well as OracleOS (32 and 64 bit) and we continue to see these very low numbers.



    Can you give me some ideas of where the problem is?










    share|improve this question



























      0












      0








      0








      I am investigating slow application issues with some New Hardware and am running into some odd results. I am trying to determine what is causing this behavior.



      I am using



      dd if=x.b1 of=x.b10 bs=8192 oflag=dsync 


      of a 101MB file simulate how our database is writing to disk (the dsync flag was suggested by our database vendor), and while normal dd commands without the dsync option are showing 80-100 Mb/s, with the dsync command I am getting results in the 160Kb/s-200Kb/s range.



      This behavior has been viewed on multiple pieces of hardware, as well as different model hard drives and doing a drive wipe test



      dd if=/dev/zero of=/dev/sda bs=8192 oflag=dsync


      shows more expected 80-100Mb/s speed, which seems to suggest it is something in our custom OS that is slowing things down. We have run these tests under a custom SuseLinux as well as OracleOS (32 and 64 bit) and we continue to see these very low numbers.



      Can you give me some ideas of where the problem is?










      share|improve this question
















      I am investigating slow application issues with some New Hardware and am running into some odd results. I am trying to determine what is causing this behavior.



      I am using



      dd if=x.b1 of=x.b10 bs=8192 oflag=dsync 


      of a 101MB file simulate how our database is writing to disk (the dsync flag was suggested by our database vendor), and while normal dd commands without the dsync option are showing 80-100 Mb/s, with the dsync command I am getting results in the 160Kb/s-200Kb/s range.



      This behavior has been viewed on multiple pieces of hardware, as well as different model hard drives and doing a drive wipe test



      dd if=/dev/zero of=/dev/sda bs=8192 oflag=dsync


      shows more expected 80-100Mb/s speed, which seems to suggest it is something in our custom OS that is slowing things down. We have run these tests under a custom SuseLinux as well as OracleOS (32 and 64 bit) and we continue to see these very low numbers.



      Can you give me some ideas of where the problem is?







      linux hard-drive performance dd






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 9 at 12:45









      Jaywalker

      1054




      1054










      asked Jul 22 '15 at 16:19









      azith28azith28

      112




      112






















          1 Answer
          1






          active

          oldest

          votes


















          2














          Specifying the oflag=dsync flag on dd which will dramatically slow down write speed to the output file.



          From the dd manual:




          dsync



          Use synchronized I/O for data. For the output file, this forces a
          physical write of output data on each write.




          After every 8kb block, dd will wait for the data to be physically writen to the disk. This bypasses all caches including the hardware cache on the drive itself. The 8kb block will not start copying until this is complete.



          If the copy speed is 200KB/s and the blocksize is 8k, then that's about 25 sync/s or 40ms a sync. This time is pretty typical for a hard drive.



          The database vendor is probably asking you to try this because they use synchronized I/O for the transaction log of the database (to provide ACID reliability guarantees).






          share|improve this answer
























          • I'm familiar with why dsync is slower, but compared to what the vendor is telling us, it is much slower then it should be. why would the drive wipe dd tests show full speed with dsync but the copies show the very slow rate?

            – azith28
            Jul 22 '15 at 18:18











          • Do you have data=journal set in your mount options maybe? That would probably cause a journal write every 8k

            – Mikel Rychliski
            Jul 22 '15 at 21:37











          • No, this is not set in the mount table.

            – azith28
            Jul 23 '15 at 13:57











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f943952%2fwhy-am-i-getting-very-slow-dd-dsync-test-results-in-linux%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Specifying the oflag=dsync flag on dd which will dramatically slow down write speed to the output file.



          From the dd manual:




          dsync



          Use synchronized I/O for data. For the output file, this forces a
          physical write of output data on each write.




          After every 8kb block, dd will wait for the data to be physically writen to the disk. This bypasses all caches including the hardware cache on the drive itself. The 8kb block will not start copying until this is complete.



          If the copy speed is 200KB/s and the blocksize is 8k, then that's about 25 sync/s or 40ms a sync. This time is pretty typical for a hard drive.



          The database vendor is probably asking you to try this because they use synchronized I/O for the transaction log of the database (to provide ACID reliability guarantees).






          share|improve this answer
























          • I'm familiar with why dsync is slower, but compared to what the vendor is telling us, it is much slower then it should be. why would the drive wipe dd tests show full speed with dsync but the copies show the very slow rate?

            – azith28
            Jul 22 '15 at 18:18











          • Do you have data=journal set in your mount options maybe? That would probably cause a journal write every 8k

            – Mikel Rychliski
            Jul 22 '15 at 21:37











          • No, this is not set in the mount table.

            – azith28
            Jul 23 '15 at 13:57
















          2














          Specifying the oflag=dsync flag on dd which will dramatically slow down write speed to the output file.



          From the dd manual:




          dsync



          Use synchronized I/O for data. For the output file, this forces a
          physical write of output data on each write.




          After every 8kb block, dd will wait for the data to be physically writen to the disk. This bypasses all caches including the hardware cache on the drive itself. The 8kb block will not start copying until this is complete.



          If the copy speed is 200KB/s and the blocksize is 8k, then that's about 25 sync/s or 40ms a sync. This time is pretty typical for a hard drive.



          The database vendor is probably asking you to try this because they use synchronized I/O for the transaction log of the database (to provide ACID reliability guarantees).






          share|improve this answer
























          • I'm familiar with why dsync is slower, but compared to what the vendor is telling us, it is much slower then it should be. why would the drive wipe dd tests show full speed with dsync but the copies show the very slow rate?

            – azith28
            Jul 22 '15 at 18:18











          • Do you have data=journal set in your mount options maybe? That would probably cause a journal write every 8k

            – Mikel Rychliski
            Jul 22 '15 at 21:37











          • No, this is not set in the mount table.

            – azith28
            Jul 23 '15 at 13:57














          2












          2








          2







          Specifying the oflag=dsync flag on dd which will dramatically slow down write speed to the output file.



          From the dd manual:




          dsync



          Use synchronized I/O for data. For the output file, this forces a
          physical write of output data on each write.




          After every 8kb block, dd will wait for the data to be physically writen to the disk. This bypasses all caches including the hardware cache on the drive itself. The 8kb block will not start copying until this is complete.



          If the copy speed is 200KB/s and the blocksize is 8k, then that's about 25 sync/s or 40ms a sync. This time is pretty typical for a hard drive.



          The database vendor is probably asking you to try this because they use synchronized I/O for the transaction log of the database (to provide ACID reliability guarantees).






          share|improve this answer













          Specifying the oflag=dsync flag on dd which will dramatically slow down write speed to the output file.



          From the dd manual:




          dsync



          Use synchronized I/O for data. For the output file, this forces a
          physical write of output data on each write.




          After every 8kb block, dd will wait for the data to be physically writen to the disk. This bypasses all caches including the hardware cache on the drive itself. The 8kb block will not start copying until this is complete.



          If the copy speed is 200KB/s and the blocksize is 8k, then that's about 25 sync/s or 40ms a sync. This time is pretty typical for a hard drive.



          The database vendor is probably asking you to try this because they use synchronized I/O for the transaction log of the database (to provide ACID reliability guarantees).







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 22 '15 at 17:38









          Mikel RychliskiMikel Rychliski

          33114




          33114













          • I'm familiar with why dsync is slower, but compared to what the vendor is telling us, it is much slower then it should be. why would the drive wipe dd tests show full speed with dsync but the copies show the very slow rate?

            – azith28
            Jul 22 '15 at 18:18











          • Do you have data=journal set in your mount options maybe? That would probably cause a journal write every 8k

            – Mikel Rychliski
            Jul 22 '15 at 21:37











          • No, this is not set in the mount table.

            – azith28
            Jul 23 '15 at 13:57



















          • I'm familiar with why dsync is slower, but compared to what the vendor is telling us, it is much slower then it should be. why would the drive wipe dd tests show full speed with dsync but the copies show the very slow rate?

            – azith28
            Jul 22 '15 at 18:18











          • Do you have data=journal set in your mount options maybe? That would probably cause a journal write every 8k

            – Mikel Rychliski
            Jul 22 '15 at 21:37











          • No, this is not set in the mount table.

            – azith28
            Jul 23 '15 at 13:57

















          I'm familiar with why dsync is slower, but compared to what the vendor is telling us, it is much slower then it should be. why would the drive wipe dd tests show full speed with dsync but the copies show the very slow rate?

          – azith28
          Jul 22 '15 at 18:18





          I'm familiar with why dsync is slower, but compared to what the vendor is telling us, it is much slower then it should be. why would the drive wipe dd tests show full speed with dsync but the copies show the very slow rate?

          – azith28
          Jul 22 '15 at 18:18













          Do you have data=journal set in your mount options maybe? That would probably cause a journal write every 8k

          – Mikel Rychliski
          Jul 22 '15 at 21:37





          Do you have data=journal set in your mount options maybe? That would probably cause a journal write every 8k

          – Mikel Rychliski
          Jul 22 '15 at 21:37













          No, this is not set in the mount table.

          – azith28
          Jul 23 '15 at 13:57





          No, this is not set in the mount table.

          – azith28
          Jul 23 '15 at 13:57


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f943952%2fwhy-am-i-getting-very-slow-dd-dsync-test-results-in-linux%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Сан-Квентин

          8-я гвардейская общевойсковая армия

          Алькесар