If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > I/O question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-22-11, 19:13
db2aix db2aix is offline
Registered User
 
Join Date: Jul 2009
Location: USA
Posts: 50
I/O question

What's the difference between random, sequential, synchronous, and asynchronous I/O?
Reply With Quote
  #2 (permalink)  
Old 05-27-11, 10:30
db2aix db2aix is offline
Registered User
 
Join Date: Jul 2009
Location: USA
Posts: 50
Can some one help me please?
Reply With Quote
  #3 (permalink)  
Old 05-30-11, 03:15
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
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.
Reply With Quote
  #4 (permalink)  
Old 05-30-11, 09:44
Jack Vamvas Jack Vamvas is offline
Registered User
 
Join Date: Jan 2009
Posts: 57
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)
__________________
-------------
DBA DB2
SQL SERVER DBA
Reply With Quote
  #5 (permalink)  
Old 05-30-11, 17:14
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On