Paul Van Den Bogaard
2005-Sep-22 17:24 UTC
[dtrace-discuss] io provider and files in a forceddirectio mounted filesystem
The following script is used as a first attempt to discover IO patterns in a dbase setup: #------------------------------------------------------------------ #pragma D option dynvarsize=128m dtrace:::BEGIN { } pid$target::kaio:entry { self->doit = 1; } pid$target::_aiodone:return { self->doit = 0; } io:::start /self->doit || execname == "oracle"/ { block[args[2]->fi_pathname, args[0]->b_blkno ] = timestamp; } io:::done /block[args[2]->fi_pathname, args[0]->b_blkno]/ { self->action = (args[0]->b_flags & B_READ) ? "R" : "W"; @countem[args[1]->dev_pathname, args[2]->fi_pathname, self->action ] = count(); @elapsed[args[1]->dev_pathname, args[2]->fi_pathname, self->action ] = sum(timestamp - block[args[2]->fi_pathname, args[0]->b_blkno]); } dtrace:::END { printa("count: %64s %40s %1s %@14d\n", @countem); normalize(@elapsed, 1000); printa("elapsed: %64s %40s %1s %@14d\n", @elapsed); } #------------------------------------------------------------------ The Oracle dbase its files all reside in filesystems. The redo is on a directio mounted filesystem. The output I get when running this script tells me all the filenames (including the device names) except for the redolog files! Remounting the filesystem that holds the redolog files without the directio option however ''solves'' this. Without the directio option the redolog files are listed by name too. Why is it that mounting a filesystem with the direcio option disables dtrace its ability to show the filename? Any clues, or can this be considered a ''undocumented feature''? BTW $target refers to the PID of the redologwriter: the only process that is writing to these redolog files. All other processes related to Oracle are all known in the kernel under the execname "oracle" Thanks Paul