Skip to contentSkip to conversation

FAQ followup: changes in open fd/proc in 2.4.x?

DISCUSSION Doug Alcorn 4 participants 4 messages Nov 17, 2000

lore
Share & tools
lore
#0 lore raw

I am working on a project to port a commercial app to Linux. Our app is essentially a dataserver with approximately two files per database table. I did a search of this mailing lists archive on the subject and found a discussion back in the 2.0.x days when the limit was 256. Basically the discussion went like this:

guy who wanted more: I really need more fds
list: redesign your app
guy who wanted more: But my app is really mature
list: no response

I couldn't find any of the discussion from when the limit was increased.

With the 2.2.x kernel, our choices are basically to live with the limitation or redesign. We certainly don't like the limitation and are talking about a redesign.

Now we get to the reason for this post. Has anything changed for 2.4.x? With release eminent, we don't really want to go through the redesign and implementation if the architecture is different for 2.4.x. I don't closely follow linux-kernel (except through periodic catch-ups on the kernel cousin). It seems like the VFS changes might affect this, I don't know.

So basically, before we begin the arduous task of redesign is there anything in the 2.4.x kernel that will affect our decisions?

PS, please CC: me on replies.

Signature · 8 lines
 (__)  Doug Alcorn (mailto:[email protected] http://www.lathi.net)
 oo /  
 |_/   

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#1 lore raw
Quoted 6 lines · Doug Alcorn

I am working on a project to port a commercial app to Linux. Our app is essentially a dataserver with approximately two files per database table. I did a search of this mailing lists archive on the subject and found a discussion back in the 2.0.x days when the limit was 256. Basically the discussion went like this:

The default is now 1024 fds (try it):

main()

{
    int fd;
    for(;;)
    {
        fd = open("/dev/null", 0);
        printf("%d\n", fd);
        if(fd < 0) exit(0);

    }
}

Something in /proc/sys/fs is supposed to increase it even more, but I don't know how.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.0 on an i686 machine (799.54 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of course you get it all back when you reboot..."; Actual explanation obtained from the Micro$oft help desk.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Doug Alcorn
Quoted 5 lines · Doug Alcorn

I am working on a project to port a commercial app to Linux. Our app is essentially a dataserver with approximately two files per database table. I did a search of this mailing lists archive on the subject and found a discussion back in the 2.0.x days when the limit was 256. Basically the discussion went like this:

<--cut->

Quoted 4 lines

With the 2.2.x kernel, our choices are basically to live with the limitation or redesign. We certainly don't like the limitation and are talking about a redesign.

I have some similar problems on 2.2.xx , and i do the following:
echo 65535 >/proc/sys/fs/file-max
and then in the scripts that start the programs:
ulimit -n 65535
And everyting is fine... Even better, you can use setrlimit() to set this in your program...( and even do the echo ... > ... there :))) )

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw
In reply to Doug Alcorn
Quoted 3 lines · Doug Alcorn

With the 2.2.x kernel, our choices are basically to live with the limitation or redesign. We certainly don't like the limitation and are talking about a redesign.

Later 2.2.x (x>=11 or so) has no limitations on fds/procs, other than what you set with ulimit and the global limit (/proc/sys/fs/{file,inode}-max) 2.2.x before that need to be recompiled for more than 1024 fds/proc and they will also waste a lot of memory for high settings.

Some older library functions may cause problems though when they use select() and you pass a fd>=1024 to them.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/