[
https://issues.apache.org/jira/browse/HADOOP-8926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476916#comment-13476916
]
Gopal V commented on HADOOP-8926:
---------------------------------
On x86_64 on an ec2 m1.xl (after changes)
Performance Table (The unit is MB/sec)
|| Num Bytes || CRC32 || PureJavaCrc32 ||
| 1 | 9.799 | 72.921 |
| 2 | 18.850 | 177.113 |
| 4 | 42.687 | 214.704 |
| 8 | 70.552 | 318.484 |
| 16 | 111.875 | 416.191 |
| 32 | 153.779 | 496.209 |
| 64 | 190.493 | 544.428 |
| 128 | 215.851 | 564.414 |
| 256 | 232.110 | 590.515 |
| 512 | 240.359 | 581.974 |
| 1024 | 244.682 | 597.676 |
| 2048 | 246.642 | 599.621 |
| 4096 | 249.438 | 604.247 |
| 8192 | 249.247 | 605.547 |
| 16384 | 249.524 | 606.494 |
| 32768 | 249.508 | 602.449 |
| 65536 | 250.977 | 604.064 |
| 131072 | 249.678 | 597.944 |
| 262144 | 249.505 | 603.270 |
| 524288 | 250.805 | 602.656 |
| 1048576 | 250.900 | 602.949 |
| 2097152 | 250.137 | 601.563 |
| 4194304 | 249.406 | 602.058 |
| 8388608 | 249.937 | 598.310 |
| 16777216 | 249.892 | 592.417 |
> hadoop.util.PureJavaCrc32 cache hit-ratio is low for static data
> ----------------------------------------------------------------
>
> Key: HADOOP-8926
> URL: https://issues.apache.org/jira/browse/HADOOP-8926
> Project: Hadoop Common
> Issue Type: Improvement
> Components: util
> Affects Versions: 2.0.3-alpha
> Environment: Ubuntu 10.10 i386
> Reporter: Gopal V
> Assignee: Gopal V
> Priority: Trivial
> Labels: optimization
> Attachments: crc32-faster+readable.patch, crc32-faster+test.patch,
> pure-crc32-cache-hit.patch
>
>
> While running microbenchmarks for HDFS write codepath, a significant part of
> the CPU fraction was consumed by the DataChecksum.update().
> The attached patch converts the static arrays in CRC32 into a single linear
> array for a performance boost in the inner loop.
> milli-seconds for 1Gig (16400 loop over a 64kb chunk)
> || platform || original || cache-aware || improvement ||
> | x86 | 3894 | 2304 | 40.83 |
> | x86_64 | 2131 | 1826 | 14 |
> The performance improvement on x86 is rather larger than the 64bit case, due
> to the extra register/stack pressure caused by the static arrays.
> A closer analysis of the PureJavaCrc32 JIT code shows the following assembly
> fragment
> {code}
> 0x40f1e345: mov $0x184,%ecx
> 0x40f1e34a: mov 0x4415b560(%ecx),%ecx ;*getstatic T8_5
> ; - PureJavaCrc32::update@95 (line 61)
> ; {oop('PureJavaCrc32')}
> 0x40f1e350: mov %ecx,0x2c(%esp)
> {code}
> Basically, the static variables T8_0 through to T8_7 are being spilled to the
> stack because of register pressure. The x86_64 case has a lower likelihood of
> such pessimistic JIT code due to the increased number of registers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira