db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2327) Reduce monitor contention in LockSet
Date Sat, 10 Mar 2007 08:22:09 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479813
] 

Knut Anders Hatlen commented on DERBY-2327:
-------------------------------------------

I was thinking of using java.util.concurrent.locks.ReentrantLock, which should give us the
same as synchronization only with more flexibility. Then we don't need one stack frame per
lock. Instead we can keep the locks in a list, like this:

  LinkedList<ReentrantLock> mutexes = new LinkedList<ReentrantLock>();
  try {
    for (Entry e : locks.values()) {
       mutexes.add(e.mutex);
       e.mutex.lock();
       // .....
    }
  } finally {
    for (ReentrantLock mutex : mutexes) mutex.unlock();
  }

Of course, this will give us a small space overhead compared to a plain synchronization approach.

> Reduce monitor contention in LockSet
> ------------------------------------
>
>                 Key: DERBY-2327
>                 URL: https://issues.apache.org/jira/browse/DERBY-2327
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Performance, Services
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: ConcurrentHashMap.diff, derby-2327-1a.diff, derby-2327-1a.stat
>
>
> When multiple threads enter the lock manager, only one can access the hash table in LockSet.
To improve scalability on multiple CPUs, it should be possible to have more than one thread
accessing the lock table at the same time.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message