-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2399/
-----------------------------------------------------------

(Updated 2011-10-19 23:45:13.114412)


Review request for zookeeper.


Changes
-------

Incorporated the review comments.


Summary
-------

This change is to optimize the memory allocated for the watches managed by the 
WatchManager. With this change, WatchManager consumes less than 100M for 200M 
watches.

I have also attempted to improve the synchronization in WatchManager to use 
fine-grained locks. This optimization should reduce contention amongst 
addWatch() operations and also between addWatch() and triggerWatch().


Diffs (updated)
-----

  /src/java/main/org/apache/zookeeper/server/WatchManager.java 1183779 
  /src/java/test/org/apache/zookeeper/server/WatchManagerTest.java PRE-CREATION 

Diff: https://reviews.apache.org/r/2399/diff


Testing
-------

Added a unit test to verify the memory optimization.

Ran zookeeper under yourkit profiler with 5000 clients setting watches on a 10k 
node and a writer updating the node every second. This run did not show any 
contention in the WatchManager.


Thanks,

Vikas

Reply via email to