Darrel Schneider created GEODE-212:
--------------------------------------

             Summary: ResourceManager implementation impacts off-heap 
performance
                 Key: GEODE-212
                 URL: https://issues.apache.org/jira/browse/GEODE-212
             Project: Geode
          Issue Type: Bug
          Components: offheap
            Reporter: Darrel Schneider
            Assignee: Darrel Schneider


When the resource manager is configured with either a eviction or critical 
threshold then it registers a listener with the off-heap SimpleMemoryAllocator 
that causes every off-heap allocate and free to call this listener.

The current listener does a synchronize on a singleton and notifies it. This 
will impact the rate at which multiple threads can allocate and free off-heap 
objects.

I simple test using 8 threads showed that without the resource manager they 
could do 16 million allocate/frees in 3 seconds. With the resource manager it 
took 12 seconds.

The notify is done to a singleton thread that simple checks to see if the new 
off-heap memory size would result in a change to the resource manager state. 
This can be done without synchronizing. Only if a change is possible do we need 
to do the sync and notify.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to