diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2010-08-13 12:44:49 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2010-08-13 12:44:49 +0100 |
| commit | 9f00b0141635732298e47eaa8ec14503bb7aa275 (patch) | |
| tree | a5b97bda0f5aab38613fbe128018fd4d4c181daa /src | |
| parent | 54c800a01bfd9e0cb3ea37ffb179e2ec9b718dcb (diff) | |
| download | rabbitmq-server-git-9f00b0141635732298e47eaa8ec14503bb7aa275.tar.gz | |
Improvements to comments
Diffstat (limited to 'src')
| -rw-r--r-- | src/file_handle_cache.erl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl index 4ef5e29f2a..5b3485807d 100644 --- a/src/file_handle_cache.erl +++ b/src/file_handle_cache.erl @@ -137,6 +137,13 @@ -define(SERVER, ?MODULE). -define(RESERVED_FOR_OTHERS, 100). + +%% Googling around suggests that Windows has a limit somewhere around +%% 16M, eg +%% http://blogs.technet.com/markrussinovich/archive/2009/09/29/3283844.aspx +%% however, it turns out that's only available through the win32 +%% API. Via the C Runtime, we have just 512: +%% http://msdn.microsoft.com/en-us/library/6e3b887c%28VS.80%29.aspx -define(FILE_HANDLES_LIMIT_WINDOWS, 512). -define(FILE_HANDLES_LIMIT_OTHER, 1024). -define(FILE_HANDLES_CHECK_INTERVAL, 2000). @@ -820,12 +827,9 @@ maybe_reduce(State = #fhc_state { limit = Limit, count = Count, elders = Elders, maybe_reduce(State) -> State. -%% Googling around suggests that Windows has a limit somewhere around -%% 16M, eg -%% http://blogs.technet.com/markrussinovich/archive/2009/09/29/3283844.aspx -%% For everything else, assume ulimit exists. Further googling -%% suggests that BSDs (incl OS X), solaris and linux all agree that -%% ulimit -n is file handles +%% For all unices, assume ulimit exists. Further googling suggests +%% that BSDs (incl OS X), solaris and linux all agree that ulimit -n +%% is file handles ulimit() -> case os:type() of {win32, _OsName} -> |
