Number of File descriptors
Hello All,
My interest has been peaked by a recent email. At one point, I heard two people speaking
about how some database guy wanted to have 2000 open files(or something crazy like that). They said that he must be crazy because the kernel does a sequential search through the open file descriptors. Anyway, I read a posting an a mail list that someone wanted select to select on 3000 files. Alright, the question(Finally!):
To have select() select on 3000 file descriptors, they must be open. That's 3000 open files. Will select be ultra slow trying to select on 3000 file descriptors? Also, what is the clarification on the kernel doing a sequential search through the open file descriptors?
Thanks In Advance,
Chuck Winters
Quoted 10 lines
Hello All,
My interest has been peaked by a recent email. At one
point, I heard two people speaking
about how some database guy wanted to have 2000 open files(or something crazy like that).
They said that he must be crazy because the kernel does a sequential search through the open
file descriptors. Anyway, I read a posting an a mail list that someone wanted select to
Quoted 8 lines
select on 3000 files. Alright, the question(Finally!):
To haveselect()select on 3000 file descriptors,
they must be open. That's 3000 open
files. Will select be ultra slow trying to select
on 3000 file descriptors? Also,
what is the clarification on the kernel doing a
sequential search through the open
file descriptors?
Using 'select' on 3,000 file descriptors is not a problem. I have used
'poll' on 12,000 file descriptors with no problems at all. Performance is not exactly stellar (you can use threads to improve it) but it's quite good.
DS
Thank You all for the information
Chuck
Quoted 18 lines · Chuck Winters
Hello All,
My interest has been peaked by a recent email. At one point, I heard two people speaking
about how some database guy wanted to have 2000 open files(or something crazy like that). They said that he must be crazy because the kernel does a sequential search through the open file descriptors. Anyway, I read a posting an a mail list that someone wanted select to select on 3000 files. Alright, the question(Finally!):
To haveselect()select on 3000 file descriptors, they must be open. That's 3000 open files. Will select be ultra slow trying to select on 3000 file descriptors? Also, what is the clarification on the kernel doing a sequential search through the open file descriptors?Thanks In Advance,
Chuck Winters
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Abhishek Chandra and David Mosberger wrote an interesting paper on this subject which was presented at this year's Usenix conference.
See "Scalability of Linux Event-Dispatch Mechanisms" at (you must be a member of Usenix to download it):
http://www.usenix.org/publications/library/proceedings/usenix01/technical.html
Pat
Signature · 2 lines
Patrick O'Rourke [email protected]