<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Speed difference between dsk/rdsk - why? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059426#M908099</link>
    <description>Hi,&lt;BR /&gt;you can dd either from disks or from lvol.&lt;BR /&gt;&lt;BR /&gt;Why character device are faster?&lt;BR /&gt;&lt;BR /&gt;quoting from "man dd"&lt;BR /&gt;&lt;BR /&gt;     If if or of refers to a raw disk, bs should always be a multiple of&lt;BR /&gt;      the sector size of the disk.  By default, bs is 512 bytes.  If the&lt;BR /&gt;      sector size of the disk is different from 512 bytes, bs should be&lt;BR /&gt;      specified using a multiple of sector size.  The character special&lt;BR /&gt;      (raw) device file should always be used for devices.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I think that the reason could lay in the bypassing of the buffer cache for raw device.&lt;BR /&gt;&lt;BR /&gt;   Massimo</description>
    <pubDate>Fri, 29 Aug 2003 06:19:51 GMT</pubDate>
    <dc:creator>Massimo Bianchi</dc:creator>
    <dc:date>2003-08-29T06:19:51Z</dc:date>
    <item>
      <title>Speed difference between dsk/rdsk - why?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059425#M908098</link>
      <description>There is a significant read difference between reading from rlvol or lvol (rdsk/dsk) device:&lt;BR /&gt;$ timex dd if=/dev/dsk/c4t7d2 of=/dev/null bs=64k count=1000&lt;BR /&gt;1000+0 records in&lt;BR /&gt;1000+0 records out&lt;BR /&gt;real 4.11&lt;BR /&gt;user 0.00&lt;BR /&gt;sys 0.90&lt;BR /&gt;&lt;BR /&gt;$ timex dd if=/dev/rdsk/c4t7d2 of=/dev/null bs=64k count=1000&lt;BR /&gt;1000+0 records in&lt;BR /&gt;1000+0 records out&lt;BR /&gt;real 0.63&lt;BR /&gt;user 0.00&lt;BR /&gt;sys 0.05&lt;BR /&gt;&lt;BR /&gt;Could somebody explain me where is the difference comes from?&lt;BR /&gt;BTW why is it possible to dd from dsk/lvol? I thought that only caracter devices can used for this. Is this an HPUX feature or I simple don't understand which device is used for what?&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Fri, 29 Aug 2003 06:10:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059425#M908098</guid>
      <dc:creator>Laszlo Csizmadia</dc:creator>
      <dc:date>2003-08-29T06:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Speed difference between dsk/rdsk - why?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059426#M908099</link>
      <description>Hi,&lt;BR /&gt;you can dd either from disks or from lvol.&lt;BR /&gt;&lt;BR /&gt;Why character device are faster?&lt;BR /&gt;&lt;BR /&gt;quoting from "man dd"&lt;BR /&gt;&lt;BR /&gt;     If if or of refers to a raw disk, bs should always be a multiple of&lt;BR /&gt;      the sector size of the disk.  By default, bs is 512 bytes.  If the&lt;BR /&gt;      sector size of the disk is different from 512 bytes, bs should be&lt;BR /&gt;      specified using a multiple of sector size.  The character special&lt;BR /&gt;      (raw) device file should always be used for devices.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I think that the reason could lay in the bypassing of the buffer cache for raw device.&lt;BR /&gt;&lt;BR /&gt;   Massimo</description>
      <pubDate>Fri, 29 Aug 2003 06:19:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059426#M908099</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-29T06:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Speed difference between dsk/rdsk - why?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059427#M908100</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Using the raw device is faster, you will miss the lvm overhead.&lt;BR /&gt;&lt;BR /&gt;Hope it helps,&lt;BR /&gt;&lt;BR /&gt;Robert-Jan.</description>
      <pubDate>Fri, 29 Aug 2003 06:21:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059427#M908100</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2003-08-29T06:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Speed difference between dsk/rdsk - why?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059428#M908101</link>
      <description>mmm... c4t7d2 looks like a disk array LUN.  The second operation probably had the data in the array cache so it wouldn't matter which device you used for the second test.&lt;BR /&gt;&lt;BR /&gt;you can dd from any file - its UNIX after all.&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2003 06:54:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059428#M908101</guid>
      <dc:creator>Steve Lewis</dc:creator>
      <dc:date>2003-08-29T06:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Speed difference between dsk/rdsk - why?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059429#M908102</link>
      <description>To Steve:&lt;BR /&gt;reading from a raw disks bypasses the buffer cache, so data was not already there.&lt;BR /&gt;&lt;BR /&gt;I also know that reading from raw is faster, and my above guess is the only exaplanation i can think of.&lt;BR /&gt;&lt;BR /&gt;   Massimo</description>
      <pubDate>Fri, 29 Aug 2003 06:58:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059429#M908102</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-29T06:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Speed difference between dsk/rdsk - why?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059430#M908103</link>
      <description>Steve,&lt;BR /&gt;right this a storage disk but it doesn't matter. For local disk the difference is the same.&lt;BR /&gt;&lt;BR /&gt;Massimo,&lt;BR /&gt;you said that in case of raw disk buffer cache is used. Why is it not used in case of block devices(dsk)?&lt;BR /&gt;As you quoted from man dd:&lt;BR /&gt;"The character special(raw) device file should always be used for devices."&lt;BR /&gt;It means that block devices couldn't even used for dd, doesn't it?&lt;BR /&gt;BTW 64k is a multiple of 512byte, so dd above was ok in that respect.&lt;BR /&gt;&lt;BR /&gt;I hardly believe that lvm overhead can cause this.&lt;BR /&gt;What about readahed cache? Does it matters?</description>
      <pubDate>Fri, 29 Aug 2003 07:40:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059430#M908103</guid>
      <dc:creator>Laszlo Csizmadia</dc:creator>
      <dc:date>2003-08-29T07:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Speed difference between dsk/rdsk - why?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059431#M908104</link>
      <description>Maybe i explained bad.&lt;BR /&gt;&lt;BR /&gt;When you use raw disk buffer cache is BYPASSED, is NOT USED. you do not have to transfer data to memory and after to destination.&lt;BR /&gt;&lt;BR /&gt;When you use the block special file, all data goes through many other layer, thus slowing down.&lt;BR /&gt;&lt;BR /&gt;So, when using dd, for a faster transfer raw disk, aka character device, are suggested.&lt;BR /&gt;&lt;BR /&gt;    Massimo</description>
      <pubDate>Fri, 29 Aug 2003 07:55:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059431#M908104</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-29T07:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Speed difference between dsk/rdsk - why?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059432#M908105</link>
      <description>"man disk"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Block-special access&lt;BR /&gt;      Block-special device files access disks via the system's block buffer&lt;BR /&gt;      cache mechanism.  Buffering is done in such a way that concurrent&lt;BR /&gt;      access through multiple opens and mounting the same physical device is&lt;BR /&gt;      correctly handled to avoid operation sequencing errors.  The block&lt;BR /&gt;      buffer cache permits the system to do physical I/O operations when&lt;BR /&gt;      convenient.  This means that physical write operations may occur&lt;BR /&gt;      substantially later in time than their corresponding logical write&lt;BR /&gt;      requests.  This also means that physical read operations may occur&lt;BR /&gt;      substantially earlier in time than their corresponding logical read&lt;BR /&gt;      requests.&lt;BR /&gt;&lt;BR /&gt;      Block-special files can be read and written without regard to physical&lt;BR /&gt;      disk records.  Block-special file read() and write() calls requiring&lt;BR /&gt;      disk access result in one or more BLKDEV_IOSIZE byte (typically 2048&lt;BR /&gt;      byte) transfers between the disk and the block buffer cache.&lt;BR /&gt;      Applications using the block-special device should ensure that they do&lt;BR /&gt;      not read or write past the end of last BLKDEV_IOSIZE sized block in&lt;BR /&gt;      the device file.  Because the interface is buffered, accesses past&lt;BR /&gt;      this point behave unpredictably.&lt;BR /&gt;&lt;BR /&gt;    Character-special access&lt;BR /&gt;      Character-special device files access disks without buffering and&lt;BR /&gt;      support the direct transmission of data between the disk and the&lt;BR /&gt;      user's read or write buffer.  Disk access through the character&lt;BR /&gt;      special file interface causes all physical I/O operations to be&lt;BR /&gt;      completed before control returns from the call.  A single read or&lt;BR /&gt;      write operation up to MAXPHYS bytes (typically 64 Kbytes or 256&lt;BR /&gt;      Kbytes) results in exactly one disk operation.  Requests larger than&lt;BR /&gt;      this are broken up automatically by the operating system.  Since large&lt;BR /&gt;      I/O operations via character-special files avoid block buffer cache&lt;BR /&gt;      handling and result in fewer disk operations, they are typically more&lt;BR /&gt;      efficient than similar block-special file operations.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2003 07:56:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059432#M908105</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-29T07:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Speed difference between dsk/rdsk - why?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059433#M908106</link>
      <description>You all completely mis-understood what i was talking about.  By cache I meant the disk array controller cache, not the buffer cache.&lt;BR /&gt;&lt;BR /&gt;Surely everyone knows that io to and from /dev/dsk devices gets buffered through the o/s and filesystem i/o goes through the buffer cache.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2003 08:10:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059433#M908106</guid>
      <dc:creator>Steve Lewis</dc:creator>
      <dc:date>2003-08-29T08:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Speed difference between dsk/rdsk - why?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059434#M908107</link>
      <description>well done Massimo for clarifying the issue from the man page - i didnt see your last posting.  &lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2003 08:14:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/speed-difference-between-dsk-rdsk-why/m-p/3059434#M908107</guid>
      <dc:creator>Steve Lewis</dc:creator>
      <dc:date>2003-08-29T08:14:14Z</dc:date>
    </item>
  </channel>
</rss>

