Why dd Oracle files is slow?
Published September 25th, 2006 in Oracle.
Large sequential I/O can cause performance problems due to excessive use of the memory page cache. One way to avoid this problem is to use direct I/O on filesystems where large sequential I/Os are common. Direct I/O is a mechanism for bypassing the memory page cache alltogether.
DIRECTIO_ON allows you to force directio per-file and is used by Oracle database. The idea is that with a properly sized memory area the database can manage its own buffering and avoid the overhead of copying to kernel buffers. Even after the database is shut down directio will persist for a long time. The flag is set in the inode’s i_flag and hangs around cached within the inode in the DNLC and will effect files until the inode is flushed from the DNLC.
John Alderson demonstrated the problem using two simple C programs.
The Directory Name Lookup Cache (DNLC) is a general file-system service. DNLC caches the most recently referenced directory names and their associated vnodes. UFS directory entries are stored linearly on disk. This means that locating an entry requires searching each entry for the name. Adding a new entry requires searching the entire directory to ensure the name does not exist. To solve this performance problem, entire directories are cached in memory by the DNLC. sar -a reports on the activity of this cache.
dd copies the specified input file to the specified output with possible conversions. The standard input and output are used by default. The input and output block sizes may be specified to take advantage of raw physical I/O. Unlike most commands, dd uses a keyword=value format for its parameters. This was reputedly modeled after IBM System/360 JCL, which had an elaborate DD “Dataset Definition'’ specification for I/O devices.
Some people believe dd means “Destroy Disk'’ or “Delete Data'’ because if it is misused, a partition or output file can be trashed very quickly. Since dd is the tool used to write disk headers, boot records, and similar system data areas, misuse of dd has probably trashed many hard disks and file systems.
via Blogs.sun.com


0 Responses to “Why dd Oracle files is slow?”
Please Wait
Leave a Reply