Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Aug 2005 11:48:49 +0200
From:      Divacky Roman <xdivac02@stud.fit.vutbr.cz>
To:        hackers@freebsd.org
Subject:   number of simultanously opened files
Message-ID:  <20050821094849.GA79907@stud.fit.vutbr.cz>

next in thread | raw e-mail | index | archive | help
hi

I wrote this:
witten /tmp# cat x.c
#include <stdio.h>
#include <fcntl.h>
#include <sys/limits.h>

#define MAX     100000
main()
{
      int i = MAX;

         for (; i>0; i--) {
	          if (open("/dev/null", O_RDONLY) == -1) {
		              printf("FUCK: %i\n", MAX-i);
			      printf("FUCK: %i\n", i);
			      break;
		}
	}
getchar();
}

set:

witten ~# sysctl kern.maxfiles=100000
kern.maxfiles: 100000 -> 100000
witten ~# sysctl kern.maxfilesperproc=100000
kern.maxfilesperproc: 100000 -> 100000
witten ~#

but I still cannot open more than 7319 files simultaneously. pls can you tell
me why?

thnx 

roman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050821094849.GA79907>