directio,dsync & sync , async IO
来源:互联网 发布:missa队内关系知乎 编辑:程序博客网 时间:2024/05/03 06:43
http://sybaseblog.com/2010/04/20/directiodsync-sync-async-io/
I came across very conceptual article about the sybase device io.
If you have any questions and suggestions please let me know. Thanks.
Source: Sybase Blogs, www, sybooks, sybase white paper for direct io.
ASYNCHRONOUS I/O:
- Asynchronous I/O allows the process issuing the I/O to continue executing while OS completes the request.
- Dataserver process does not block on this request till its completion.
SYNCHRONOUS I/O:
- Synchronous I/O blocks the I/O issuing process from continuing executing while OS completes the request.
- The process is blocked till the request is completed. This generally results in poor throughput.
DSYNC :
- In 12.0 sybase introduced the dsync flag – shorthand for “Data Synchronous.”
- When the dsync setting is on, Adaptive Server opens a database device file using the UNIX dsync flag.
- The dsync flag in ASE directly translates to the O_DSYNC open(2) flag. That is to say, when ASE opens a device that has the dsync flag set, ASE will pass O_DSYNC to open(2).
- This flag tells the file system that a write to that file must pass though the cache and be written to disk before the write is considered complete.
- In other words, for writes we throw away the cache efficiency and make sure the data goes to disk.
- This way if the system crashes, everything that we thought had been written to disk has in fact been written to disk.
Is DSYNC “synchronous”??
- This is not true.
- This synchronous / asynchronous conflict is at a different level. With async i/o we are talking about the context in which the i/o is executed, i.e. whether the i/o blocks the caller or if it is done in a different context.
- With dsync we are talking about when the write() is considered complete.
- These are not mutually exclusive, and you can asynchronously do a data synchronous i/o.
- The async portion is as always: the application issues an i/o and later polls (or is notified) for completion. The dsync portion means that the application won’t be told that the I/O has completed until the data has made it to disk.
DIRECT IO
- Direct I/O is another kind of file system i/o, introduced in ASE15.
- In the direct i/o model the file system cache is completely bypassed.
- Using direct i/o, writes are naturally safe because they bypass the cache and go straight to disk.
- Direct i/o is very, very similar to raw i/o.
- The main difference is that in direct i/o the structure of a file system still exists, easing manageability.
- With raw i/o, no file system exists. The performance of raw and direct i/o should be very similar.
Also like to add :
- The dsync and directio are mutually exclusive. Both cannt be turn on same time on the device. Both dsync and directio provide the full recoveribility.
- If you gone through the full article, the next question is, which would be best in raw device and filesystem device with direct io, both are bypassing the file system cache.
- directio,dsync & sync , async IO
- dd命令的conv=fsync,oflag=sync/dsync
- Sync & ASync
- Half-Sync/Half-Async
- Async vs sync benchmark
- ASP.NET sync over async
- 笔记之DirectIO时的IO放大探究
- mina中Half Sync/Half Async模式
- Asp.Net Sync & ASync Processing request
- GCD dispatch async / dispatch sync 介绍 。
- Kafka之sync、async以及oneway
- HttpClient实现同步(sync)和异步(Async)
- async io framework
- DirectIO时的IO放大探究【io主文--逻辑块映射物理块,io请求合并分割】
- 【ASYNC IO】HP-UNIX_ORACLE10G_ASYNC IO ERROR
- 设计模式 - 半同步半异步(Half-Sync/Half-Async)
- 【Verilog】 同步复位和异步复位比较 async vs. sync
- 数据库Standby中的几个概念 - LGWR, ARCH,ASYNC,SYNC,AFFIRM
- 计时器篇两个计时器API的讨论
- android.annotation.SuppressLint
- 用Java风格使用OC——NSString类别
- VC6.0致命错误 RC1015: 无法打开包含文件 'afxres.h'.解决方法
- 使用mp4v2将H264+AAC合成mp4文件
- directio,dsync & sync , async IO
- MTBF的配置
- Android, IOS和QNX之比较
- 如何使用eclipse打开已有工程
- Android开机时桌面Widget的载入流程
- 求值顺序
- 在RHEL/CentOS 5.5里安装使用Chrome/Chromium浏览器
- WireShark中一个奔溃bug
- 如果在缘分的开端就看清了末路的结局,你还会不会选择开始