Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Unix Cache setting for Oracle
@ 2000-01-30  5:00 Chris Man
  2000-02-11  5:00 ` /WB/
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Man @ 2000-01-30  5:00 UTC (permalink / raw)


Hi,

    I am using Unix 4.0D with storage work HSZ 40.  I want to know what
cache settings ( if any ) are required for databases such as oracle to
correct flush all data when they commits.

Regards,

    Chris





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unix Cache setting for Oracle
  2000-01-30  5:00 Unix Cache setting for Oracle Chris Man
@ 2000-02-11  5:00 ` /WB/
       [not found]   ` <UyFq4.826$pK3.18958@sea-read.news.verio.net>
  0 siblings, 1 reply; 5+ messages in thread
From: /WB/ @ 2000-02-11  5:00 UTC (permalink / raw)


I would strongly suggest using raw devices on the raid rather than file
systems...

/WB

Chris Man wrote:
> 
> Hi,
> 
>     I am using Unix 4.0D with storage work HSZ 40.  I want to know what
> cache settings ( if any ) are required for databases such as oracle to
> correct flush all data when they commits.
> 
> Regards,
> 
>     Chris



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unix Cache setting for Oracle
       [not found]   ` <UyFq4.826$pK3.18958@sea-read.news.verio.net>
@ 2000-02-17  5:00     ` Joerg Bruehe
  2000-02-17  5:00     ` Joerg Bruehe
  2000-02-17  5:00     ` Joerg Bruehe
  2 siblings, 0 replies; 5+ messages in thread
From: Joerg Bruehe @ 2000-02-17  5:00 UTC (permalink / raw)


Hi ! 

Mark Orndorff schrieb:
> 
> Would you mind outlining specifically why you would stongly recommend this?
> 
> Mark
> 
> /WB/ <WB@slashwb.org> wrote in message news:38A3B348.35159669@slashwb.org...
> > I would strongly suggest using raw devices on the raid rather than file
> > systems...

Even though I am not the one asked specifically, I would like to 
comment on this topic. 
Please note that I have no connection to Oracle, I work with a 
subsidiary of "Software AG" and port/test/support their "Adabas D". 

Our preference for raw devices has several reasons: 

1) Data transferred by a program to/from a file is typically cached 
   by the Unix kernel (for all variants of Unix, including Linux). 

 A DBMS has its own cache for the pages last used. 
 Its caching includes criteria like 
  - type of page (data / index / log / ...), 
  - specific kind of data (permanent / temporary / intermediate result), 
  - transaction still active or finished, 
  - ... 
 which make the DBMS caching much more effective than the OS caching 
 (which can only look at the access pattern and mostly does LRU). 
 Therefore, any page used for DBMS cache is much more effective 
 than a page used for OS cache of DBMS data. 
 In hard words: OS caching of DBMS data is waste of RAM. 

2) The DBMS does its data transfers in (multiple) page units 
   with proper alignment. So there is no need for the OS to 
 use its own "buffer cache" / ... (whatever it may be called) 
 to ensure correct size and alignment (which is needed for files 
 in general). 

 However, any file access goes through this "buffer cache", 
 which means there are two transfers (program space - buffer cache 
 PLUS buffer cache - disk), effectively needing CPU cycles which 
 (in the special DBMS case) do not provide functionality. 
 So OS caching of DBMS data also (slightly) increases CPU load 
 (and so transfer time). 

3) For recoverability of the DBMS contents in case of crash, any 
   change involving more than one page (like a split of a tree 
 leaf page) must be written to disk in a specific order. So these 
 writes will be done in a synchronous fashion, and the DBMS will 
 prevent the OS from reordering them. 
 So the OS optimization for I/O throughput will not help (in general). 

4) When the DBMS needs several consecutive pages (bulk transfers, 
   like in a backup operation), the likelihood of a single large 
 physical I/O is much less for files (depending on file system 
 placement policy), so backup performance will be higher for 
 raw disks.  

In consequence: 
When OS caching is not needed (2), even costs performance (2, 4), 
sequence is enforced by the DBMS (3),
and the RAM could be used more effectively (1), 
the best way is to bypass the cache altogether and use the raw disk. 

The only argument against that is the flexibility of file size 
which may not be offered by disk partition management. 
The importance of that difference depends on the flexibility of 
the disk partition management - the more flexible that is 
(positive example: "logical volumes" like in AIX, 
negative example: sequential areas like in Win-PCs), the less 
is the "raw disk" problem. 

Regards, 
Joerg Bruehe 

-- 
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
     (speaking only for himself)
mailto: joerg@sql.de



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unix Cache setting for Oracle
       [not found]   ` <UyFq4.826$pK3.18958@sea-read.news.verio.net>
  2000-02-17  5:00     ` Joerg Bruehe
@ 2000-02-17  5:00     ` Joerg Bruehe
  2000-02-17  5:00     ` Joerg Bruehe
  2 siblings, 0 replies; 5+ messages in thread
From: Joerg Bruehe @ 2000-02-17  5:00 UTC (permalink / raw)


Hi ! 

Mark Orndorff schrieb:
> 
> Would you mind outlining specifically why you would stongly recommend this?
> 
> Mark
> 
> /WB/ <WB@slashwb.org> wrote in message news:38A3B348.35159669@slashwb.org...
> > I would strongly suggest using raw devices on the raid rather than file
> > systems...

Even though I am not the one asked specifically, I would like to 
comment on this topic. 
Please note that I have no connection to Oracle, I work with a 
subsidiary of "Software AG" and port/test/support their "Adabas D". 

Our preference for raw devices has several reasons: 

1) Data transferred by a program to/from a file is typically cached 
   by the Unix kernel (for all variants of Unix, including Linux). 

 A DBMS has its own cache for the pages last used. 
 Its caching includes criteria like 
  - type of page (data / index / log / ...), 
  - specific kind of data (permanent / temporary / intermediate result), 
  - transaction still active or finished, 
  - ... 
 which make the DBMS caching much more effective than the OS caching 
 (which can only look at the access pattern and mostly does LRU). 
 Therefore, any page used for DBMS cache is much more effective 
 than a page used for OS cache of DBMS data. 
 In hard words: OS caching of DBMS data is waste of RAM. 

2) The DBMS does its data transfers in (multiple) page units 
   with proper alignment. So there is no need for the OS to 
 use its own "buffer cache" / ... (whatever it may be called) 
 to ensure correct size and alignment (which is needed for files 
 in general). 

 However, any file access goes through this "buffer cache", 
 which means there are two transfers (program space - buffer cache 
 PLUS buffer cache - disk), effectively needing CPU cycles which 
 (in the special DBMS case) do not provide functionality. 
 So OS caching of DBMS data also (slightly) increases CPU load 
 (and so transfer time). 

3) For recoverability of the DBMS contents in case of crash, any 
   change involving more than one page (like a split of a tree 
 leaf page) must be written to disk in a specific order. So these 
 writes will be done in a synchronous fashion, and the DBMS will 
 prevent the OS from reordering them. 
 So the OS optimization for I/O throughput will not help (in general). 

4) When the DBMS needs several consecutive pages (bulk transfers, 
   like in a backup operation), the likelihood of a single large 
 physical I/O is much less for files (depending on file system 
 placement policy), so backup performance will be higher for 
 raw disks.  

In consequence: 
When OS caching is not needed (2), even costs performance (2, 4), 
sequence is enforced by the DBMS (3),
and the RAM could be used more effectively (1), 
the best way is to bypass the cache altogether and use the raw disk. 

The only argument against that is the flexibility of file size 
which may not be offered by disk partition management. 
The importance of that difference depends on the flexibility of 
the disk partition management - the more flexible that is 
(positive example: "logical volumes" like in AIX, 
negative example: sequential areas like in Win-PCs), the less 
is the "raw disk" problem. 

Regards, 
Joerg Bruehe 

-- 
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
     (speaking only for himself)
mailto: joerg@sql.de



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unix Cache setting for Oracle
       [not found]   ` <UyFq4.826$pK3.18958@sea-read.news.verio.net>
  2000-02-17  5:00     ` Joerg Bruehe
  2000-02-17  5:00     ` Joerg Bruehe
@ 2000-02-17  5:00     ` Joerg Bruehe
  2 siblings, 0 replies; 5+ messages in thread
From: Joerg Bruehe @ 2000-02-17  5:00 UTC (permalink / raw)


Hi ! 

Mark Orndorff schrieb:
> 
> Would you mind outlining specifically why you would stongly recommend this?
> 
> Mark
> 
> /WB/ <WB@slashwb.org> wrote in message news:38A3B348.35159669@slashwb.org...
> > I would strongly suggest using raw devices on the raid rather than file
> > systems...

Even though I am not the one asked specifically, I would like to 
comment on this topic. 
Please note that I have no connection to Oracle, I work with a 
subsidiary of "Software AG" and port/test/support their "Adabas D". 

Our preference for raw devices has several reasons: 

1) Data transferred by a program to/from a file is typically cached 
   by the Unix kernel (for all variants of Unix, including Linux). 

 A DBMS has its own cache for the pages last used. 
 Its caching includes criteria like 
  - type of page (data / index / log / ...), 
  - specific kind of data (permanent / temporary / intermediate result), 
  - transaction still active or finished, 
  - ... 
 which make the DBMS caching much more effective than the OS caching 
 (which can only look at the access pattern and mostly does LRU). 
 Therefore, any page used for DBMS cache is much more effective 
 than a page used for OS cache of DBMS data. 
 In hard words: OS caching of DBMS data is waste of RAM. 

2) The DBMS does its data transfers in (multiple) page units 
   with proper alignment. So there is no need for the OS to 
 use its own "buffer cache" / ... (whatever it may be called) 
 to ensure correct size and alignment (which is needed for files 
 in general). 

 However, any file access goes through this "buffer cache", 
 which means there are two transfers (program space - buffer cache 
 PLUS buffer cache - disk), effectively needing CPU cycles which 
 (in the special DBMS case) do not provide functionality. 
 So OS caching of DBMS data also (slightly) increases CPU load 
 (and so transfer time). 

3) For recoverability of the DBMS contents in case of crash, any 
   change involving more than one page (like a split of a tree 
 leaf page) must be written to disk in a specific order. So these 
 writes will be done in a synchronous fashion, and the DBMS will 
 prevent the OS from reordering them. 
 So the OS optimization for I/O throughput will not help (in general). 

4) When the DBMS needs several consecutive pages (bulk transfers, 
   like in a backup operation), the likelihood of a single large 
 physical I/O is much less for files (depending on file system 
 placement policy), so backup performance will be higher for 
 raw disks.  

In consequence: 
When OS caching is not needed (2), even costs performance (2, 4), 
sequence is enforced by the DBMS (3),
and the RAM could be used more effectively (1), 
the best way is to bypass the cache altogether and use the raw disk. 

The only argument against that is the flexibility of file size 
which may not be offered by disk partition management. 
The importance of that difference depends on the flexibility of 
the disk partition management - the more flexible that is 
(positive example: "logical volumes" like in AIX, 
negative example: sequential areas like in Win-PCs), the less 
is the "raw disk" problem. 

Regards, 
Joerg Bruehe 

-- 
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
     (speaking only for himself)
mailto: joerg@sql.de



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-02-17  5:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-30  5:00 Unix Cache setting for Oracle Chris Man
2000-02-11  5:00 ` /WB/
     [not found]   ` <UyFq4.826$pK3.18958@sea-read.news.verio.net>
2000-02-17  5:00     ` Joerg Bruehe
2000-02-17  5:00     ` Joerg Bruehe
2000-02-17  5:00     ` Joerg Bruehe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox