- 论坛徽章:
- 0
|
Really? Then not only you have to convince me but also Sun support.
- From: Jason.Lane@Sun.COM [mailto:Jason.Lane@Sun.COM]
- Sent: Tuesday, February 28, 2006 2:03 PM
- To: Gao Brian
- Subject: Re: Case 65375754
- Brian, asynchronous I/O is the default.
- Regards,
- 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. |
|