On Tue, 29 May 2007, Edgar A. Luna Diaz wrote:

The real problem was found. The configuration of this server had a
recording path as /var/spool/asterisk/monitor/ for every call, so the
size of monitor (the directory) keeps growing at 2000 files per day. Its
peek was around 36MB, just containing the addresses of the files, I just
changed the filename variable for Monitor to store in a path like
/var/spool/asterisk/monitor/2007/05/29/. With this change the maximum
size of a directory is 700k.

That's a common problem with many filesystems - there is a limit to the number of files it's "sensible" to put in one directory - it's really a SysAdmin issue, but it's going to be easy for others to enter this trap.

It really does depend on the filesystem though - Linux ext3 is fair to middling at handling large numbers of files - with the dir_index option set, but without it, it's really bad. There are other filesystems which are better (and worse!) Ext3 has an option at create time - dir_index which you can set to make it use a more efficient way to store filenames. It's usually too late to change at production time unless you can take the server offline for a bit. (The defaults also depend on your Linux distribution too!)

Your system of a new directory per day is a solution similar to many others adopted by other systems though! (eg. email spools, home directorys, squid cache files, etc.)

Gordon
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to