Raw - Vs - Filesystem ASE
Raw - Vs - Filesystem ASE
Raw - Vs - Filesystem ASE
Sybase ASE introduced DSYNC capabilities for file system support in ASE 12.0. Although in
many of the Sybase documents published prior to ASE 15.5 the recommendation was to use a
raw partition, post ASE 15.5, Sybase decided to better support the file system community as
well with DIRECT I/O. DIRECT I/O is basically a way to perform I/O on file system devices in a
similar way to raw devices i.e. the OS buffer caches are bypassed and data are written directly
to disk.
DIRECT I/O does not however guarantee that the writes will only return after all data have been
stored on disk (just that data will not go into caches). But since the OS buffer caches are
bypassed, it does provide a pretty good recoverability. DIRECT I/O provides better write
performance than sync (especially if the device is stored on a SAN). On the other hand, DSYNC
is faster on devices for read operations. So transaction log devices are very good candidates for
DIRECT I/O (or for raw devices).
The “DSYNC” parameter implemented DSYNC I/O for file system devices, enabling updates to
the device to take place directly on the storage media, or buffering them with the UNIX file
system. Although it may have appeared that DSYNC bypassed the file system buffer to ensure
recoverability, it still used the file system buffer, but forced a flush after each file system write.
This double buffering in both Adaptive Server Enterprise and the file system cache—plus the
flush request—caused slower response times for writes to file system devices than for raw
partitions. ASE opens a database device file of a device with the DSYNC setting on, using the
operating system DSYNC flag. With this flag, when ASE writes to the device file, both the
written data must be physically stored on disk before the system call returns.
This allows for a better recoverability of the written data in case of crash: If the writes are
buffered by the OS and the system crashes, these writes are lost. Of course, this only handles
OS level buffering. The data could still be in the disk write cache and get lost…
One of the drawbacks of DSYNC is that it costs performance (because the writes, even if
buffered by the OS, are guaranteed to go to the disk before the operation finishes). It should
be noted that DSYNC doesn’t mean that there is not asynchronous I/O. It just means that when
you write synchronously or check for whether the asynchronous I/O was performed, you’ll only
get the response that the write is completed once the data are effectively on the physical disk.
With a 32-bit ASE there was a need for what can be termed as a double-copy or double-
buffering. ASE will perform its own caching mechanism and the OS file system will also have its
caching mechanism in place which can cause some delay in writing to the disk. However, with
a 64-bit ASE, there is no need for this double-copy or double-buffering concept. Since a 64-bit
ASE is capable of handling larger memory, it is prudent to let ASE cache the data and use the
allocated memory instead of allowing the OS file system to add another layer of caching. This
provides good performance on a file system like seen on a raw device.
Summary
It is a well-known fact that raw devices provide the highest performance for write activity and
ensure data integrity. However, little is said about its inability to read fast – especially
sequential reads, and much needed capability of shrinking or growing a device. Although raw
devices were considered to be better because of the performance gains, tremendous strides
have been made in the file system area that the gap between raw devices and file systems have
become negligible. A few examples of the improvements in the file system arena are ease of
setting up an application like ASE, ability to take snapshots that can ease lifecycle management,
performance benefits and recoverability and more. SAP Business Suite prefers file system to
raw partitions especially with the advances in technology and the advantages it brings to the
environment.
www.sap.com
Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are
registered trademarks of Crossgate AG in Germany and other
countries. Crossgate is an SAP company.
All other product and service names mentioned are the trademarks of
their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.