Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Forcedirectio In Solaris

Re: Forcedirectio In Solaris

From: Philippe Michel <Philippe.Michel_at_syseca.thomson-csf.com>
Date: 19 Oct 2000 11:40:19 GMT
Message-ID: <8smmj3$m4q$1@news.syseca.fr>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US