Results 1 to 5 of 5

Thread: I/O question

  1. #1
    Join Date
    Jul 2009
    Location
    USA
    Posts
    53

    Unanswered: I/O question

    What's the difference between random, sequential, synchronous, and asynchronous I/O?

  2. #2
    Join Date
    Jul 2009
    Location
    USA
    Posts
    53
    Can some one help me please?

  3. #3
    Join Date
    Jan 2010
    Posts
    335
    Hi,

    random and sequential is how is data read from the disk. Is the data read sequentially from disk or not?

    DB2 uses prefetching to read from disk before it is needed by the query. So the query doesn't have to wait for disk I/O. That's asynchronous I/O.
    With synchronous I/O the has to wait till the pages are read from the disk.

  4. #4
    Join Date
    Jan 2009
    Location
    United Kingdom
    Posts
    77
    This relates to reads and writes. An example of a sequential write is a write to a log file on a dedicated drive . The writes are written in order , one after the other.
    In contrast a random write . Another example is Bulk Insert .
    In contrast a random write , is an OLTP write (which can also be a sequential write depending on the DML)

  5. #5
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    asynchronous IO vs. synchronous is also available at the OS kernel level: with asynchronous IO, you just tell the kernel to write a block of data to some file. Control returns immediately to the application and it doesn't wait until the kernel made some sort of guarantees that the write succeeded. (You would have to poll whether the write operation has already finished.) Similar things apply to read operations.

    The advantage of asynchronous IO is that the application is not blocked, waiting for the IO operation to finish. So it can do other things in the mean time.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •