hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yi Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8900) Optimize XAttr memory footprint.
Date Thu, 20 Aug 2015 08:53:45 GMT

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

Yi Liu commented on HDFS-8900:

This optimization:
-   For each XAttr, can save: 12bytes (object overhead) + 2bytes (compact), memory alignment
of value
-   For each XAttrFeature, can save: 12 bytes (object overhead) + num * XAttr saved.

So for each XAttrFeature (associated with an INodeFile or INodeDirectory), we can save (bytes):
12 + n * (14 + memory alignment of value in each XAttr) 

The patch also makes code logic more simper, and has no impact on NN performance.

Besides, the xattrMaxSize is used to restrict user/trust namespace xattrs, I add a hard limit
for max size. It's reasonable and make Xattr more controllable. 

> Optimize XAttr memory footprint.
> --------------------------------
>                 Key: HDFS-8900
>                 URL: https://issues.apache.org/jira/browse/HDFS-8900
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>         Attachments: HDFS-8900.001.patch
> {code}
> private final ImmutableList<XAttr> xAttrs;
> {code}
> Currently we use above in XAttrFeature, it's not efficient from memory point of view,
since {{ImmutableList}} and {{XAttr}} have object memory overhead, and each object has memory
> We can use a {{byte[]}} in XAttrFeature and do some compact in {{XAttr}}.

This message was sent by Atlassian JIRA

View raw message