12.07.2015 Views

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 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Note: <strong>Dsync</strong> opti<strong>on</strong> is useful in Intel 32bit platforms where system can support up to 64G memory but <strong>on</strong>ly 4G can beaddress by ASE. In such scenario, customers can use file system to cache the data in the remaining memory not used byASE. But with DIRECTIO <strong>and</strong> Extended cache we can circumvent the problem <strong>and</strong> use the memory given to the FS by ASE.This is not applicable to 64bit platform hence <strong>Direct</strong> I/O is always the preferred way.DBCC Tablealloc testFollowing chart shows advantage of using dsync opti<strong>on</strong> <strong>on</strong> file system devices for read operati<strong>on</strong>. In this test, Dbcctablealloc comm<strong>and</strong> is executed against <strong>Sybase</strong> file system devices with direct IO, <strong>and</strong> devices with dsync opti<strong>on</strong>senabled. Dbcc Tablealloc reads <strong>and</strong> checks the pages from specified table or data partiti<strong>on</strong> to see that all the pages arecorrectly allocated <strong>and</strong> that no page that is allocated is not used. With dsync opti<strong>on</strong> enabled, resp<strong>on</strong>se time is 96sec<strong>on</strong>ds, while with direct IO opti<strong>on</strong>, resp<strong>on</strong>se time is 386 sec<strong>on</strong>ds.Sec<strong>on</strong>ds400350300250200150100500TableAlloc<strong>Dsync</strong><strong>Direct</strong> IO5.0 DIRECT I/O<strong>Direct</strong> I/O is the feature of the file system in which writes directly goes to the storage device, bypassing theoperating system buffer cache. <strong>Direct</strong> I/O is invoked by opening a file with O_DIRECT flag. On Solaris platform,directio() system call is used after the normal open() call to open file system device. The direct I/O parameter is usedwith disk init, disk reinit, <strong>and</strong> sp_deviceattr comm<strong>and</strong>s. <strong>Direct</strong> I/O performs IO in the same manner as raw devices <strong>and</strong>provides the same performance benefit as raw devices.1. RequestwriteASE DataCache3. Write returnssuccess2. Issue write<strong>on</strong> dirtyASEEngineFile <strong>on</strong> Disk1. ASE requires dirty page in ASE data cache be written written written.2. ASE issues a write <strong>on</strong> that page. Write goes directly to disk, bypassing the FS cache3. Write returns when data hits the disk.Note: <strong>Direct</strong> IO, as well as dsync opti<strong>on</strong>s should not be used for tempdb devices, as recovery is not important fortempdb.3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!