tuyenth / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Defaults use too many file handles for non-Linux OSes #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

 - Create a leveldb with many rows on Solaris

What is the expected output? What do you see instead?

 - Out of file descriptor errors.

Explanation: the default soft limit on Solaris is 256 files, not 1024 like 
Linux. ulimit changes this limit *only if* the running user is root, which is 
not always possible.
options.max_open_files must be changed by users compiling leveldb on these 
platforms, and without this change, scaling problems will result.

Shouldn't the default (utils/options.cc) max_open_files be a more compatible 
number than 1000, less than 256? (I am using 200 because my app opens other 
files too.) Alternately, couldn't leveldb detect the current soft limit and use 
that?

Original issue reported on code.google.com by mbh...@gmail.com on 10 Dec 2011 at 8:52

GoogleCodeExporter commented 9 years ago
One fix could be to build a 64-bit binary, which doesn't have the limitation of 
256 file descriptors.

Original comment by blizin...@google.com on 8 May 2012 at 6:12