Re: ramfs or ram disk

From: William Muriithi <william.muriithi_at_gmail.com>
Date: Wed, 21 Aug 2013 20:26:06 -0400
Message-ID: <CAE9rU+4GhQ2kvHcuuBuNUa-aGe16=vOp00pZNWHU5SDR1fQxKw_at_mail.gmail.com>



> I accept that using a ram disk would be relatively safe for a temporary
> tablespace.
> However I remember when Oracle absolutely forbade the use of sparse files.
> Then at some point Oracle has started using sparse files for temporary
> tablespaces and I have seen no new official position on sparse files.
>

Think it may be related to the teething when operating system introduced the feature. Currently, I haven't come across any reason it would be a problem.
> I would be cautious about putting a sparse temporary tablespace on a
> ramdisk.
>
> A reccomendation I should have included in my original response is: open
an
> SR to verify that your new proposed configuration is fully supported.
>

Petty good idea. Do you mind updating the list of their opinion should you open a SR please ?

> I will however restate my original position, if your ram is fully
commited,
> then creating a ramdisk will rob another part of your system of a valuable
> resource.
>

Depends on if you are using ramfs or tmpfs. The former locks ram for its use and don't use swap, the later is treated like cache by operating system .

So if you are using tmpfs and have 2GB of free ram, your oracle temporary table run from ram. If another application need more ram though, your temporary table will be pushed to the swap.

This is on Red Hat systems and possibly all Linux distributions.
> For example if most of your temporary tablespace usage is for sorting,
> reducing the sort area size to make space for a ramdisk will not solve
your
> performance problem as you will simply increase the number of sorts that
> spill to disk.
>

Correct. That's why its not advisable to use ramfs, use tmpfs and don't adjust sort area size. Temporary file system will run from disk if there is not enough ram but will be opportunistic and run from ram if there is something free hanging around.

> If developers have made extensive use of global temporary tables
> inappropriatley then you may be able to inprove performance using a
ramdisk.
>
> However I would still contend that fixing the real problem with the code
> rather than using the sticking plaster of a ramdisk.
>

Agree. Problem is they may not have a solution or time to fix it most of the time. And not for their own fault, sometimes the management don't think its important so never allocate the resources.

> There are valid uses of ramdisks but they are rare and sometimes do not
> constitute a long term solution.
>

Agree. Temporary fixes to allow you to sleep without getting nagios call every night when application take long to respond and nagios assume its down
> Dave
>

William
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 22 2013 - 02:26:06 CEST

Original text of this message