2012-05-10

temporary tablespace in ramfs

One good article : http://www.thegeekstuff.com/2008/11/overview-of-ramfs-and-tmpfs-on-linux/

The idea is to user your RAM in order to put there the temporary tablespace ( I suppose you have a box with a lot of GB for RAM ).

Sometimes , your database could have a bottleneck in your temporary tablespace ( in case of large sorts ) .
RAMFS is  a good filesystem which resides in your RAM memory. This means that the data in RAMFS get lost forever when there is a electrical problem  and your server is restarted or stopped .

This is not such a big problem in our case, because in OracleDB,  temporary tablespace  does not contain persistent information and is not subject to the recovery mechanism .

Read and write in your ramfs filesystem will be very fast.
In case your server is restarted, we can switch to the old temporary tablespace ( alter database default temporary tablespace temp; )

As root:

mkdir /ramfs
mount -t ramfs -o size=500m ramfs /ramfs


In your oracle database ( as user sys or system ) :
create temporary tablespace temp_ramfs tempfile '/ramfs/temp_ramfs.dbf' size 10M autoextend on next 10M maxsize 32G;

alter database default temporary tablespace temp_volatil ;



Niciun comentariu:

Trimiteți un comentariu