Performance on Sybase Devices Using Direct I/O, Dsync and Raw ...
Performance on Sybase Devices Using Direct I/O, Dsync and Raw ...
Performance on Sybase Devices Using Direct I/O, Dsync and Raw ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
3.0 SYNCHRONOUS I/OSynchr<strong>on</strong>ous I/O blocks the I/O issuing process from c<strong>on</strong>tinuing executing while OS completes the request. Theprocess is blocked till the request is completed. This generally results in poor throughput. Following figure shows howAdaptive Server works with synchr<strong>on</strong>ous I/O.dataserverissuewritecall to write()O/SwritestartedDataserver blockswaiting for I/OPerform I/Oc<strong>on</strong>tinuewrite() returnswritecomplete4.0 DSYNC WRITESFor devices initialized <strong>on</strong> UNIX operating system files, the dsync setting c<strong>on</strong>trols whether or not writes to thosefiles are buffered. When the dsync setting is <strong>on</strong>, Adaptive Server opens a database device file using the UNIX dsyncflag. The dsync flag ensures that writes to the device file occur directly <strong>on</strong> the physical storage media, <strong>and</strong> AdaptiveServer can recover data <strong>on</strong> the device in the event of a system failure.Use of dsync opti<strong>on</strong> with database device files incurs the following performance trade-offs:• If database device files <strong>on</strong> these platforms use the dsync opti<strong>on</strong>, the Adaptive Server engine writing to the devicefile blocks until the write operati<strong>on</strong> completes. This can cause poor performance during update operati<strong>on</strong>s• Resp<strong>on</strong>se time for read operati<strong>on</strong>s is generally better for devices stored <strong>on</strong> UNIX operating system files ascompared to devices stored <strong>on</strong> raw partiti<strong>on</strong>s. Data from device files can benefit from the UNIX file system cacheas well as the Adaptive Server cache, <strong>and</strong> more reads may take place without requiring physical disk access.Following figure shows how Adaptive server works when dsync setting is turned <strong>on</strong>.dataserverissuewritecall to aiowrite()aiowrite() returnsO/SwritestartedPerform I/O in adifferent c<strong>on</strong>textDataserver doesother work whileI/O is in progressPoll for I/Ocompleti<strong>on</strong>aiowait()writecompletereturn I/OstatusOnly thing DSYNC changes is what “write complete” means.The I/O is still async from the perspective of ASE.2