免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2939 | 回复: 6
打印 上一主题 下一主题

solaris下设置异步I/O的步骤 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-02-09 23:06 |只看该作者 |倒序浏览
请教如何在solaris下设置异步I/O的步骤?
急!!!

论坛徽章:
0
2 [报告]
发表于 2007-02-10 00:43 |只看该作者
Solaris use asynchronous I/O as default.

论坛徽章:
0
3 [报告]
发表于 2007-02-27 22:25 |只看该作者
胡说,solaris默认是同步I/O.

论坛徽章:
0
4 [报告]
发表于 2007-02-28 04:57 |只看该作者
胡说,solaris默认是同步I/O.
Really? Then not only you have to convince me but also Sun support.

  1. From: Jason.Lane@Sun.COM [mailto:Jason.Lane@Sun.COM]
  2. Sent: Tuesday, February 28, 2006 2:03 PM
  3. To: Gao Brian
  4. Subject: Re: Case 65375754

  5. Brian, asynchronous I/O is the default.

  6. Regards,
  7. Jason Lane
复制代码


Read Solaris Internals first edition by Jim Mauro,  page 502-508 and the following article or call Sun to make your argument

Title: Synchronous vs. Asynchronous I/O
Copyright Notice: Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved
Update Date: Wed Jan 18 00:00:00 MST 2006
Products:  Sun StorEdge 9900 Universal Replicator Software,  Sun StorEdge 9990 Compatible Replication for IBM XRC Software,  Sun StorEdge Network Data Replicator 3.0 Software,  Sun StorEdge 9960 System,  Sun StorEdge 9910,  Sun StorEdge 9990 System

--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

Last Updated By: Terence Patrick  Donoghue
Keyword(s):synchronous, asynchronous, I/O, write, read, filesystem, function, scsi, replication

Description: Top

The terms synchronous and asynchronous are, like symmetric and asymmetric commonly mis-used or mis-understood. This Infodoc aims to clarify the differences between these two terms are and how they can be applied in the field with some specific examples.

Document Body: Top

Solaris Operating System - Kernel Functions

Functions can be either synchronous or asynchronous. A synchronous function call is where the caller does not resume execution until the called function returns. Alternatively, an asynchronous function call is where the caller and the called function appear to execute at the same time without any of the 'blocking' seen in synchronous calls.

UFS Filesystem I/O

There is a difference between writing user data to a filesystem and writing filesystem metadata. In a UFS filesystem metadata is usually dealt with synchronously, while user data is normally dealt with asynchronously via write(2).

User data is transferred via the filesystem to the device driver and the write(2) returns to the user. Normally, a call to write returns once the data has been copied to a buffer in the kernel - the write has no idea when the data will be transferred to a physical storage medium.

Of course if a file is opened open(2) with the flags O_SYNC or O_DSYNC then user data write operations will not complete until the data is transferred to the physical storage medium (will happen synchronously) i.e. the call will wait (biowait()) until the driver signals either completion or failure of the I/O request and only then return.

The performance impact of writing or reading asynchronously to a device is that data can also be clustered into large chunks and written to or read from a device in a single operation - which is obviously going to be much faster than making several small operations.

Storage: asynchronous data replication

A replication technique in which data must be committed to storage at only the primary site and not the secondary site before the write is acknowledged to the host. Data is then asynchronously forwarded to the secondary site as the network capabilities permit.

According to the SNIA definition: An I/O operation whose initiator does not await its completion before proceeding with other work. Asynchronous I/O operations enable an initiator to have multiple concurrent I/O operations in progress. Asynchronous replication is typically used for low speed remote connections.

Storage: synchronous data replication

The synchronous application that resides on intelligent controllers waits for both disk drives to complete writing data before it returns an acknowledgement to the initiator (requestor). Synchronous replication is optimised for local (high speed) connections with low latency (which can include 'metro' networks implementing DWDM).

Common Examples of Synchronous and Asynchronous Software

  Synchronous Replication  Asynchronous Replication  
Sun  Unity3.0 / SNDR*  Unity3.0 / SNDR  
HDS  TrueCopy  TrueCopy  
EMC  SRDF**  SRDF  
IBM  PPRC***  XRC  
HP  StorageWorks  StorageWorks  

*SNDR - StorEdge Network Data Replicator
**SRDF - Symmetrix Remote Data Facility
***PPRC - Peer to Peer Remote Copy


SCSI Transfer Rate

SCSI is able to transfer data using either synchronous or asynchronous mode.

Asynchronous transfers are not tied to a fixed clock rate, instead transfer timing is controlled by request / acknowledge signals. Each byte that is transferred to / from the drive must be requested and acknowledged before another byte is sent. Cable length in this case can have a significant performance impact because of the time it takes signals to propagate.

While synchronous SCSI still uses the request / acknowledge model, the cycle has a fixed period that is agreed between devices during negotiation. The driver and the target device negotiate a data transfer rate and a synchronous offset. The synchronous offset is the maximum number of outstanding requests before the first acknowledge is required. This means several requests may be sent to a target before the initial acknowledge is required.

It is important to mention that SCSI command and message transfers use asynchronous mode, higher speed options only apply to data transfers. When devices are initially connected, they exchange messages asynchronously and will negotiate to highest speed of the slowest device.

论坛徽章:
7
荣誉会员
日期:2011-11-23 16:44:17水瓶座
日期:2013-08-28 21:20:16丑牛
日期:2013-10-02 21:01:462015年迎新春徽章
日期:2015-03-04 09:54:45操作系统版块每日发帖之星
日期:2016-06-05 06:20:0015-16赛季CBA联赛之吉林
日期:2016-06-20 08:24:0515-16赛季CBA联赛之四川
日期:2016-08-18 15:02:02
5 [报告]
发表于 2007-02-28 09:16 |只看该作者
原帖由 briangao 于 2007-2-28 04:57 发表
Really? Then not only you have to convince me but also Sun support.
[code]
From: Jason.Lane@Sun.COM [mailto:Jason.Lane@Sun.COM]
Sent: Tuesday, February 28, 2006 2:03 PM
To: Gao Brian
Subjec ...


你说的应该没错,我也没有具体查过资料,但是在某些应用的安装文档中,没有提到solaris如何打开AIO;而AIX则是专门提到是要单独打开的,默认AIX模式则是关闭的,需要性能上的考虑而把它打开。

论坛徽章:
0
6 [报告]
发表于 2007-02-28 09:53 |只看该作者
你说的应该没错,我也没有具体查过资料,但是在某些应用的安装文档中,没有提到solaris如何打开AIO;而AIX则是专门提到是要单独打开的,默认AIX模式则是关闭的,需要性能上的考虑而把它打开。

I spoke with Sun back line engineer regarding this. Solaris is designed to use asynchronous I/O wherever possible. There is no parameter to turn it on. It is by default.

论坛徽章:
0
7 [报告]
发表于 2007-02-28 13:02 |只看该作者
默认就是打开aio的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP