hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jing Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-2421) Improve the concurrency of SerialNumberMap in NameNode
Date Wed, 15 Aug 2012 02:04:38 GMT

     [ https://issues.apache.org/jira/browse/HDFS-2421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jing Zhao updated HDFS-2421:
----------------------------

    Attachment: performance_SerialNumberManager.png
                TestSerialNumberManager.java
                HDFS-2421.patch

Write a simple test program to compare the two programs: ConcurrentHashMap vs. HashMap + synchronized.
The TestSerialNumberManager.java is the test code. The ConcurrentHashMap version changes the
original synchronization semantic, but seems fine if every thread is generating serial number
for different names.

A simple performance measurement is included (results are in milliseconds). For both read
and write, every thread is doing 
10000 sets of r/w operations, and I tested scenarios with 10, 20, 50, and 100 threads. The
test is on a MAC with 8G memory and a 2.2 GHz i7 processor.

                
> Improve the concurrency of  SerialNumberMap in NameNode
> -------------------------------------------------------
>
>                 Key: HDFS-2421
>                 URL: https://issues.apache.org/jira/browse/HDFS-2421
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: name-node
>            Reporter: Hairong Kuang
>            Assignee: Weiyan Wang
>             Fix For: 0.24.0
>
>         Attachments: HDFS-2421.patch, performance_SerialNumberManager.png, TestSerialNumberManager.java
>
>
> After enabled permission checking in our HDFS test cluster, our benchmark observed a
significant reduced concurrency in NameNode. Investigation showed that most threads were blocked
at acquiring the lock of org.apache.hadoop.hdfs.server.namenode.SerialNumberManager$SerialNumberMap.
We used concurrentHashMap to replace Hashmap + synchronized methods, which greatly improved
the situation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message