Skip to main content

FreeSWITCH DB in RAMdrive

About​

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.

Click here to expand Table of Contents

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​

  1. In /etc/fstab, add a mountpoint and save.
    1. tmpfs    /usr/local/freeswitch/ramdisk     tmpfs   defaults        0 0  

  2. Make sure you also create the directory.
    1. mkdir /usr/local/freeswitch/ramdisk  
      mount -a

  3. Then, in freeswitch/conf/autoload_configs/switch.conf.xml uncomment core-db-name and set it to the path you created in fstab.
    1. <param name="core-db-name" value="/usr/local/freeswitch/ramdisk/core.db" />  

  4. Restart FreeSWITCH