[ 
https://issues.apache.org/jira/browse/HDFS-1114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879989#action_12879989
 ] 

Tsz Wo (Nicholas), SZE commented on HDFS-1114:
----------------------------------------------

Comparing memory footprint on a 32-bit VM over 1,000,000 elements
{noformat}
 num     #instances         #bytes  class name
----------------------------------------------
   1:       1000040       24000960  java.util.HashMap$Entry
   2:       1000000       24000000  
org.apache.hadoop.hdfs.util.TestGSet$IntElement
   3:            23        8390960  [Ljava.util.HashMap$Entry;
HashMap: 53.78 MB


 num     #instances         #bytes  class name
----------------------------------------------
   1:       1000000       24000000  
org.apache.hadoop.hdfs.util.TestGSet$IntElement
   2:             1        4194320  
[Lorg.apache.hadoop.hdfs.util.LightWeightGSet$LinkedElement;
LightWeightGSet: 26.89 MB
{noformat}

> Reducing NameNode memory usage by an alternate hash table
> ---------------------------------------------------------
>
>                 Key: HDFS-1114
>                 URL: https://issues.apache.org/jira/browse/HDFS-1114
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: name-node
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>             Fix For: 0.22.0
>
>         Attachments: GSet20100525.pdf, gset20100608.pdf, 
> h1114_20100607.patch, h1114_20100614b.patch, h1114_20100615.patch, 
> h1114_20100616b.patch, h1114_20100617.patch, h1114_20100617b.patch
>
>
> NameNode uses a java.util.HashMap to store BlockInfo objects.  When there are 
> many blocks in HDFS, this map uses a lot of memory in the NameNode.  We may 
> optimize the memory usage by a light weight hash table implementation.

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

Reply via email to