RAMdisk for hosting SQL database with persistent image file

Started by frank6677

Hi there,

I was looking for ways to improve the performance of my SQL database and I came across RAMdisk. So I am thinking of hosting the database on the ramdisk. Obviously I need to make sure, that if the RAMdisk ever fails or if the computer crashes, that the database and contents do not get lost.

My idea was to use an image file for persistent RAMdisk and write every 5 minutes to the image file.

Does anyone have any experience and tips with this?
Will 5 minute cycle be OK or will it put too much stress on ramdisk?
Any known issues with ramdisk and SQL database?

Thank you in advance.
-Frank
SoftPerfect Support forum - Andrew avatar image

Re: RAMdisk for hosting SQL database with persistent image file   17 August 2016, 18:14

It's better to use a fast SSD instead. I don't recommend using a RAM Disk for this purpose because:
  • The RAM Disk will be locked for writing temporarily every 5 minutes, which may result in SQL server errors.
  • You may end up having inconsistent DB file because it's a random access file, while backup is made sequentially.
  • If the server crashes between backups, a significant number of transactions may be lost.
Assuming you are using MSSQL It's okay though to store tempdb on a RAM Disk as it doesn't need to be persistent.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **      **  **    **  **     **  **     **  **     ** 
 **  **  **  ***   **  **     **   **   **   **     ** 
 **  **  **  ****  **  **     **    ** **    **     ** 
 **  **  **  ** ** **  *********     ***     **     ** 
 **  **  **  **  ****  **     **    ** **     **   **  
 **  **  **  **   ***  **     **   **   **     ** **   
  ***  ***   **    **  **     **  **     **     ***    

Message: