Chinaunix

标题: solaris下设置异步I/O的步骤 [打印本页]

作者: skyoflzp    时间: 2007-02-09 23:06
标题: solaris下设置异步I/O的步骤
请教如何在solaris下设置异步I/O的步骤?
急!!!
作者: briangao    时间: 2007-02-10 00:43
Solaris use asynchronous I/O as default.
作者: skyoflzp    时间: 2007-02-27 22:25
胡说,solaris默认是同步I/O.
作者: briangao    时间: 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.
作者: nimysun    时间: 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模式则是关闭的,需要性能上的考虑而把它打开。
作者: briangao    时间: 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.
作者: startserver    时间: 2007-02-28 13:02
默认就是打开aio的。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2