Difference between revisions of "FreeSWITCH DB In RAMdrive"

From FreeSWITCH Wiki
Jump to: navigation, search
(Discussion)
(Example)
Line 8: Line 8:
 
==Example==
 
==Example==
 
   
 
   
in /etc/fstab:
+
in /etc/fstab, add a mountpoint:
 
+
   
 
     tmpfs    /usr/local/freeswitch/ramdb    tmpfs  defaults        0 0
 
     tmpfs    /usr/local/freeswitch/ramdb    tmpfs  defaults        0 0
 +
Then save and make sure you also create the directory.
 +
    mkdir /usr/local/freeswitch/ramdisk
 +
    mount -a
  
 
Then, in freeswitch/conf/autoload_configs/switch.conf.xml uncomment:
 
Then, in freeswitch/conf/autoload_configs/switch.conf.xml uncomment:
Line 16: Line 19:
 
     <param name="core-db-name" value="/usr/local/freeswitch/ramdisk/core.db" />
 
     <param name="core-db-name" value="/usr/local/freeswitch/ramdisk/core.db" />
  
And set it to the path you created in fstab.  Make sure you also create the directory.
+
And set it to the path you created in fstab.   
  
 
Restart FreeSWITCH
 
Restart FreeSWITCH

Revision as of 20:55, 21 September 2012

Contents

Introduction

Moving the ephemeral databases to a RAM disk will greatly improve performance, and it is CRITICAL to move them to a RAM disk if you use SSDs. More info on running FreeSWITCH on SSDs is here.

Discussion

Some Linux distros have quirks that cause SQLite to behave poorly when scaling up. In other cases, disk I/O becomes a bottleneck to FreeSWITCH performance. Putting the FreeSWITCH core.db file onto a RAM disk can increase performance.

Example

in /etc/fstab, add a mountpoint:

   tmpfs    /usr/local/freeswitch/ramdb     tmpfs   defaults        0 0

Then save and make sure you also create the directory.

   mkdir /usr/local/freeswitch/ramdisk
   mount -a

Then, in freeswitch/conf/autoload_configs/switch.conf.xml uncomment:

   <param name="core-db-name" value="/usr/local/freeswitch/ramdisk/core.db" />

And set it to the path you created in fstab.

Restart FreeSWITCH

See Also

Performance_testing_and_configurations#FreeSWITCH.27s_core.db_I.2FO_bottleneck