You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2009/08/21 12:35:14 UTC
[jira] Created: (HDFS-559) Work out the memory consumption of NN
artifacts on a compressed pointer JVM
Work out the memory consumption of NN artifacts on a compressed pointer JVM
---------------------------------------------------------------------------
Key: HDFS-559
URL: https://issues.apache.org/jira/browse/HDFS-559
Project: Hadoop HDFS
Issue Type: Improvement
Components: name-node
Affects Versions: 0.21.0
Reporter: Steve Loughran
Assignee: Steve Loughran
Priority: Minor
Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-559) Work out the memory consumption of NN
artifacts on a compressed pointer JVM
Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747356#action_12747356 ]
Steve Loughran commented on HDFS-559:
-------------------------------------
64 bit, no oop
sizeof(BlockInfo) = 56
sizeof(INode) = 80
sizeof(INodeDirectory) = 64
sizeof(INodeDirectorywithQuota) = 96
sizeof(DatanodeDescriptor) = 168
=bigger
> Work out the memory consumption of NN artifacts on a compressed pointer JVM
> ---------------------------------------------------------------------------
>
> Key: HDFS-559
> URL: https://issues.apache.org/jira/browse/HDFS-559
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
>
> Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-559) Work out the memory consumption of NN
artifacts on a compressed pointer JVM
Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747357#action_12747357 ]
Steve Loughran commented on HDFS-559:
-------------------------------------
64 bit, -XX:+UseCompressedOops
sizeof(BlockInfo) = 48
sizeof(INode) = 64
sizeof(INodeDirectory) = 48
sizeof(INodeDirectorywithQuota) = 80
sizeof(DatanodeDescriptor) = 120
-roughly on a par with the 32 bit numbers
> Work out the memory consumption of NN artifacts on a compressed pointer JVM
> ---------------------------------------------------------------------------
>
> Key: HDFS-559
> URL: https://issues.apache.org/jira/browse/HDFS-559
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
>
> Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-559) Work out the memory consumption of NN
artifacts on a compressed pointer JVM
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747615#action_12747615 ]
Konstantin Shvachko commented on HDFS-559:
------------------------------------------
According to my calculations (no compression)
sizeof(BlockInfo) = 72 + 24*replication
This comes out of these
Object header = 16
Three longs in the block = 8*3
INode reference = 8
Array header = 24
Three references for each replica = 24*replication
> Work out the memory consumption of NN artifacts on a compressed pointer JVM
> ---------------------------------------------------------------------------
>
> Key: HDFS-559
> URL: https://issues.apache.org/jira/browse/HDFS-559
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
>
> Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-559) Work out the memory consumption of NN
artifacts on a compressed pointer JVM
Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747952#action_12747952 ]
Steve Loughran commented on HDFS-559:
-------------------------------------
I tried creating {{BlockInfo}} instances with different nos of replicas, the {{sizeof()}} stuff in instrumentation doesn't pick that up, only the array header. So the [Object] list is being omitted
Looking at the size of foundational classes we see this
{code}
uncompressed
sizeof(Object) = 16
sizeof(String) = 40
compressed
sizeof(Object) = 16
sizeof(String) = 32
{code}
On a 32 bit machine, {{sizeof(Object)==8}}.
On a 64-bit JVM, the header is always 2x that of Object; one mark pointer is never compressed, though the klass pointer is. This means on Compressed OOPs, that 16 byte header has space for one four byte value -int, long, reference or array size.
Looking at arrays of Object, we get this -which is measuring array size only, not cost of anything referenced-
{code}
raw oop
sizeof(Object[0]) = 24 16
sizeof(Object[1]) = 32 24
sizeof(Object[2]) = 40 24
sizeof(Object[3]) = 48 32
sizeof(Object[4]) = 56 32
sizeof(Object[5]) = 64 40
sizeof(Object[6]) = 72 40
sizeof(Object[7]) = 80 48
sizeof(Object[8]) = 88 48
sizeof(Object[9]) = 96 56
sizeof(Object[10])=104 56
sizeof(Object[11])=112 64
sizeof(Object[12])=120 64
sizeof(Object[13])=128 72
sizeof(Object[14])=136 72
sizeof(Object[15])=144 80
{code}
The array header is smaller (16 bytes rather than 24, included in the blockinfo size),
For the raw pointers, cost is 24 bytes per replica. For the compressed pointers, the cost per replica drops. Sometimes the cost comes down to 12 bytes/pointer, but only if everything aligns (replica count = 2 or 4). Otherwise its something <= 16 bytes/replica; for replicas=3, cost is 13.3 bytes/copy in BlockInfo.
Overall then, a pessimistic cost is 48+16*replicas, though for replicas=3, cost is slightly less
> Work out the memory consumption of NN artifacts on a compressed pointer JVM
> ---------------------------------------------------------------------------
>
> Key: HDFS-559
> URL: https://issues.apache.org/jira/browse/HDFS-559
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
>
> Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-559) Work out the memory consumption of NN
artifacts on a compressed pointer JVM
Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747650#action_12747650 ]
Raghu Angadi commented on HDFS-559:
-----------------------------------
Thats why sizeof(BlockInfo) is only a partial picture. It does not include other objects associated with each BlockInfo.
I wonder where the 8 byte difference comes from for BlockInfo between 32-bit and 64-bit-compressed-oop. Some special alignment requirements?
> Work out the memory consumption of NN artifacts on a compressed pointer JVM
> ---------------------------------------------------------------------------
>
> Key: HDFS-559
> URL: https://issues.apache.org/jira/browse/HDFS-559
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
>
> Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-559) Work out the memory consumption of NN
artifacts on a compressed pointer JVM
Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12745890#action_12745890 ]
Steve Loughran commented on HDFS-559:
-------------------------------------
There is a way to to do this in the java Instrumentation API:
http://java.sun.com/javase/6/docs/api/java/lang/instrument/Instrumentation.html#getObjectSize%28java.lang.Object%29
It just needs someone to write an instrumentation agent that can be loaded within Hadoop -even the unit tests- and print out the sizes of various classes; test this on different JVMs and you would have a table for the cost of the directory structure on different machines
It would still be good to run the HADOOP-1687 how-much-work-before-OOM benchmarks, as that is the most realistic test of datastructure size.
> Work out the memory consumption of NN artifacts on a compressed pointer JVM
> ---------------------------------------------------------------------------
>
> Key: HDFS-559
> URL: https://issues.apache.org/jira/browse/HDFS-559
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
>
> Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Work stopped: (HDFS-559) Work out the memory consumption of
NN artifacts on a compressed pointer JVM
Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on HDFS-559 stopped by Steve Loughran.
> Work out the memory consumption of NN artifacts on a compressed pointer JVM
> ---------------------------------------------------------------------------
>
> Key: HDFS-559
> URL: https://issues.apache.org/jira/browse/HDFS-559
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
>
> Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-559) Work out the memory consumption of NN
artifacts on a compressed pointer JVM
Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747019#action_12747019 ]
Steve Loughran commented on HDFS-559:
-------------------------------------
numbers of Java6u14 on 32-bit server VM
sizeof(BlockInfo) = 40
sizeof(INode) = 56
sizeof(INodeDirectory) = 48
sizeof(INodeDirectorywithQuota) = 80
sizeof(DatanodeDescriptor) =120
This uses the instrumentation API; I havent added blocks underneath
> Work out the memory consumption of NN artifacts on a compressed pointer JVM
> ---------------------------------------------------------------------------
>
> Key: HDFS-559
> URL: https://issues.apache.org/jira/browse/HDFS-559
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
>
> Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HDFS-559) Work out the memory consumption of NN
artifacts on a compressed pointer JVM
Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Loughran updated HDFS-559:
--------------------------------
Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Work out the memory consumption of NN artifacts on a compressed pointer JVM
> ---------------------------------------------------------------------------
>
> Key: HDFS-559
> URL: https://issues.apache.org/jira/browse/HDFS-559
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
>
> Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Work started: (HDFS-559) Work out the memory consumption of
NN artifacts on a compressed pointer JVM
Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on HDFS-559 started by Steve Loughran.
> Work out the memory consumption of NN artifacts on a compressed pointer JVM
> ---------------------------------------------------------------------------
>
> Key: HDFS-559
> URL: https://issues.apache.org/jira/browse/HDFS-559
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Environment: 64-bit and 32 bit JVMs, Java6u14 and jdk7 betas, with -XX compressed oops enabled/disabled
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
>
> Following up HADOOP-1687, it would be nice to know the size of datatypes in under the java16u14 JVM, which offers compressed pointers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.