系統管理
1753943 會員
8461 線上
108811 解決方案
發表新文章

async i/o and sync i/o

 
watermelonyu
教授

async i/o and sync i/o

我看到一篇文章說

HP-UX 11i Online JFS file system today only support synchronous IO.

請問async io and sync io 的比較跟優缺點

這跟disk storage 的cache 有關嗎
2則回覆 2
watermelonyu
教授

async i/o and sync i/o

Hi :



這個問題可分兩個方向來看:



1. For block device, that is buffer cached I/O.



async I/O -

open() file without O_SYNC flag set,

As many as write() can be fired without having to wait for

them to complete.

Good performance, weak data integrity.



Sync I/O -

The next write() must wait the first write() complete

and then which can continue to go on.

Good data integrity but weak performance.



2. For raw device, that is non buffer cached I/O.



Sync I/O -

Normally, All I/O on raw device are synchronous,

The next write() must wait the first write() complete

and then which can continue to go on, because this is

no buffer cache there.



Async I/O -

Special driver give buufer-cache-like features on

raw I/O devices. Which let the user can fire more I/O

at the same time.



Such as Sybase achieves by using the HP async driver.

and the Oracle application does its own queueing of what

the OS sees as raw I/O requests, but which users might call

multiple async I/Os, even though they are using the raw device.



The buffer cache used for block device is on system main memory.

Which is not relative to cache size of storage.



PS, I try to make the explan in Chinese but .... Sorry about this.

Hope my explan is clear enough.



..

.
watermelonyu
教授

async i/o and sync i/o

基本上, disk storage 的 cache 是 contoller 在控制的, 可以設成 write back or write through, 跟 sync/async disk io 無關.