[etherlab-users] dlsd: Too many open files

Andy Rohr andy.rohr at mindclue.ch
Mon May 4 14:22:47 CEST 2009


Hello

I'm using dlsd to log measurements. This works fine with a small amount of channels. But I want to 
record 180 channels of data. As soon as I configure configure this many channels, I get into trouble 
with the dlsd_logger:

May  4 14:03:02 mindclue-andy-linux dlsd_logger[9475]: ERROR: Processing data: Logger: GenSaver: 
Could not write to global index file 
"/media/sda8/data/dls_data/job107/channel111/chunk1241438543765428/level1/data_mean.idx": Could not 
create file "/media/sda8/data/dls_data/job107/channel111/chunk1241438543765428/level1/data_mean.idx" 
for appending: Too many open files

A "sudo lsof | grep dlsd | wc -l" shows me that the process dlsd has over 1000 files open at that 
moment where the error message comes up.

Searching the Internet, I found out that there is a per process maximum of 1024 open files per 
process by default (see http://linuxmafia.com/pub/linux/suse-linux-internals/chapter4.html).

in include/linux/fs.h there is defined:

/* Fixed constants first: */
#undef NR_OPEN
#define NR_OPEN (1024*1024)	/* Absolute upper limit on fd num */
#define INR_OPEN 1024		/* Initial setting for nfile rlimits */

Where INR_OPEN seems to be this per process limit. But according to
http://linux.derkeiler.com/Newsgroups/comp.os.linux.misc/2007-09/msg02517.html
it should be possible to set the limit by using ulimit in the init script of dlsd. So I added

ulimit -Hn 8192

in the init script, just before starting the deamon


[...]

case "$1" in
     start)
         echo -n "Starting DLS Daemon "

         # Increase allowed nr of open files per process to 8192 (default 1024)
         ulimit -Hn 8192

         if ! $DLSD $DLSD_OPTIONS > /dev/null; then
         exit_fail
         fi

         sleep 1
         checkpid
     exit_success
         ;;

[...]


But it did not change anything. The problem persists.

Does anybody have a clue how to reslove this? Do I really have to recompile the Kernel with a hacked 
default? (INR_OPEN)


Regards
Andy


-------------- next part --------------
A non-text attachment was scrubbed...
Name: andy_rohr.vcf
Type: text/x-vcard
Size: 246 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20090504/c8194065/attachment-0003.vcf>


More information about the Etherlab-users mailing list