Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Aug 2005 13:26:37 +0300
From:      victor cruceru <victor.cruceru@gmail.com>
To:        Divacky Roman <xdivac02@stud.fit.vutbr.cz>
Cc:        hackers@freebsd.org
Subject:   Re: number of simultanously opened files
Message-ID:  <4940255050821032669f7b13a@mail.gmail.com>
In-Reply-To: <20050821094849.GA79907@stud.fit.vutbr.cz>
References:  <20050821094849.GA79907@stud.fit.vutbr.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
And errno (from a failed open) is ....?


On 8/21/05, Divacky Roman <xdivac02@stud.fit.vutbr.cz> wrote:
>=20
> hi
>=20
> I wrote this:
> witten /tmp# cat x.c
> #include <stdio.h>
> #include <fcntl.h>
> #include <sys/limits.h>
>=20
> #define MAX 100000
> main()
> {
> int i =3D MAX;
>=20
> for (; i>0; i--) {
> if (open("/dev/null", O_RDONLY) =3D=3D -1) {
> printf("FUCK: %i\n", MAX-i);
> printf("FUCK: %i\n", i);
> break;
> }
> }
> getchar();
> }
>=20
> set:
>=20
> witten ~# sysctl kern.maxfiles=3D100000
> kern.maxfiles: 100000 -> 100000
> witten ~# sysctl kern.maxfilesperproc=3D100000
> kern.maxfilesperproc: 100000 -> 100000
> witten ~#
>=20
> but I still cannot open more than 7319 files simultaneously. pls can you=
=20
> tell
> me why?
>=20
> thnx
>=20
> roman
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org=
"
>



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