Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Forcedirectio In Solaris
In article <8slefp$qnd$1_at_nnrp1.deja.com>, EnderW <ender29_at_my-deja.com> wrote:
>Hi,
> Quick question about mounting a ufs with forcedirectio option... I
>would always think this should be on when the fs contains Oracle
>datafiles. Is that true ? Thanks
IMHO it is almost always true. A possible exception may be tablespaces containing tables of reasonable size, accessed via full scans fairly often, but not explicitly cached.
My experience with Solaris' directio is that : - using it for online redo logs is a must ; log file write waits (from v$system_event) are considerably decreased. - db file write waits decrease is less obvious, but using it on datafiles frees plenty of memory for a better use. - you don't need to mount filesystems with forcedirectio option, you may prefer to set directio on individual files with something like :
#include <sys/types.h> #include <sys/fcntl.h> #include <errno.h>
int main(int argc, char *argv[])
{
extern int errno;
int fd;
errno = 0;
if ((fd = open(argv[1], O_RDWR)) < 0)
perror("open"), exit(1);
if (directio(fd, DIRECTIO_ON))
perror("directio"), exit(2);
return 0;
}
Moreover, this kind of program (and another with DIRECTIO_OFF) can be used to experiment more easily than mounting filesystems with varying options. Received on Thu Oct 19 2000 - 06:40:19 CDT