If you use the standard POSIX C / C ++ libraries with Windows, the answer is yes, there is a limit.
However, interestingly, the limit is imposed by the types of C / C ++ libraries that you use.
I came across the following JIRA thread ( http://bugs.mysql.com/bug.php?id=24509 ) from MySQL. They faced the same problem about the number of open files.
However, Paul DuBois explained that the problem can be effectively fixed in Windows using ...
Win32 API call (CreateFile (), WriteFile (), etc.) And the maximum number of open files by default was increased to 16384. The maximum can be increased using the -max-open-files = N option to the server.
Naturally, you could have a theoretically large number of open files using a technique similar to combining database connections, but that would have a serious impact on performance.
Indeed, opening a large number of files can be a poor design. However, some situations require this. For example, if you create a database server that will be used by thousands of users or applications, the server will definitely have to open a large number of files (or suffer from a performance hit using file and descriptor merge methods).
luiscolorado Nov 25 '10 at 11:08 2010-11-25 11:08
source share