summaryrefslogtreecommitdiff
path: root/LICENSE-MPL-RabbitMQ
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-11-19 16:43:17 +0000
committerMatthew Sackman <matthew@lshift.net>2009-11-19 16:43:17 +0000
commit847ca84878fe7c61a04601f6119220134c959b71 (patch)
tree6a302514aa896953319834ca8865766face8d30d /LICENSE-MPL-RabbitMQ
parentb0f200b3d34872eac03121cde58073e1aeec63c8 (diff)
downloadrabbitmq-server-git-847ca84878fe7c61a04601f6119220134c959b71.tar.gz
Finished the file handle cache. It works as follows:
1) Every client keeps a gb_tree of timestamp-when-fd-was-last-used => fd_ref. This is updated for each action. 2) When a client opens a file or closes a file, it sends a suitable msg to the server, including the smallest timestamp-when-fd-was-last-used (i.e. least recently used fd) 3) The server counts how many fds have been used 4) When too many fds have been used, it finds the average age of the least-recently-used-fds and tells all clients to close anything older than that 5) This is likely to have no effect, because the clients may have since used the fds, thus the ages will be wrong. Regardless of whether any fds have been closed at this point, all the clients send back to the server their current smallest timestamp-when-fd-was-last-used 6) 2 seconds later, the server checks to see if the situation has improved, and if not, using the now updated information (thus the average age will be lower) may choose to further ask all clients to kill off fhs. This will repeat, albeit not that fast until enough fds have been closed.
Diffstat (limited to 'LICENSE-MPL-RabbitMQ')
0 files changed, 0 insertions, 0 deletions