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:
- Stop FreeSWITCH
- 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
- type: echo tmpfs /var/lib/freeswitch/db tmpfs nodev,nosuid,noexec,nodiratime,size=1024M 0 0 >> /etc/fstab
- type: mount -a
- Restore your db files
- Start FreeSWITCH
Good luck!blog comments powered by Disqus