User Rating: 3 / 5

Star Active Star Active Star Active Star InactiveStar Inactive
 
speeding.jpg

Not really an original thing, but I keep forgetting it. Maybe it helps others.

When FreeSWITCH loads some modules such as mod_callcenter, mod_fifo or is not using any kind of ODBC it uses SQLite as database handler. SQLite stores its database in /var/lib/freeswitch/db (generally). Depending on your hard disk, the I/O may become a bottleneck.

Speeding Up the SQLite Access

The solution is the use of tmpfs. Tmpfs is smart enough to use a mix of RAM and virtual memory. Your I/O will speed up considerably. To enable the tmpfs, follow these steps:

  1. Stop FreeSWITCH
  2. Backup some db files you want, if you are using mod_fifo or mod_callcenter you may want to keep your agent status, otherwise you just ignore this step
  3. type: echo tmpfs /var/lib/freeswitch/db tmpfs nodev,nosuid,noexec,nodiratime,size=1024M 0 0 >> /etc/fstab
  4. type: mount -a
  5. Restore your db files
  6. Start FreeSWITCH

Good luck!

blog comments powered by Disqus