{"id":3950,"date":"2015-02-13T11:18:00","date_gmt":"2015-02-13T01:18:00","guid":{"rendered":"https:\/\/www.flamingspork.com\/blog\/?p=3950"},"modified":"2015-02-13T11:18:00","modified_gmt":"2015-02-13T01:18:00","slug":"preliminary-results-from-power8-optimized-crc32-for-mysql","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2015\/02\/13\/preliminary-results-from-power8-optimized-crc32-for-mysql\/","title":{"rendered":"Preliminary results from POWER8 optimized CRC32 for MySQL"},"content":{"rendered":"<p>So, <a href=\"http:\/\/antonblanchardfacts.com\/\">Anton<\/a> got some useful code working that I could patch into a MySQL server for testing purposes &#8211; a POWER8 optimized CRC32 implementation.<\/p>\n<p>I went with a pretty stock MySQL 5.6.22 (one patch) with sysbench preparing a single 2GB table (10,000,000 rows). I then hacked up innochecksum so that it would <strong>only<\/strong> do the correct CRC32 (rather than trying each checksum type). Using the standard CRC32 algorithm it took around three seconds to verify all of the checksums. With a POWER8 optimized CRC32: 0.4-0.5 seconds. Useful speed-up!<\/p>\n<p>I then ran sysbench read\/write with 16 threads with oltp-table-size=10000 (on the larger table) to see if there would be an improvement in a &#8220;real world&#8221; workload. I got about 30% better performance on read\/write operations!<\/p>\n<p>Using perf to see where CPU was going, CPU time spent doing CRC32 calculations went down from ~2.5% to ~0.25%!<\/p>\n<p>In theory, we should be able to get about 52GiB\/sec of CRC32 out of a 4.1Ghz POWER8 core. I don&#8217;t think we&#8217;ll be hitting this in MySQL any time soon.<\/p>\n<p>Give us another week or two and we&#8217;ll likely have a patch that&#8217;s ready to merge.<\/p>\n<p>Initial benchmarks look promising though!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, Anton got some useful code working that I could patch into a MySQL server for testing purposes &#8211; a POWER8 optimized CRC32 implementation. I went with a pretty stock MySQL 5.6.22 (one patch) with sysbench preparing a single 2GB &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2015\/02\/13\/preliminary-results-from-power8-optimized-crc32-for-mysql\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[76,14,615],"tags":[],"class_list":["post-3950","post","type-post","status-publish","format-standard","hentry","category-code","category-mysql","category-powerpc"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-11I","jetpack-related-posts":[{"id":4019,"url":"https:\/\/www.flamingspork.com\/blog\/2015\/12\/18\/power8-accelerated-crc32-merged-in-mariadb-10-1\/","url_meta":{"origin":3950,"position":0},"title":"POWER8 Accelerated CRC32 merged in MariaDB 10.1","author":"Stewart Smith","date":"2015-12-18","format":false,"excerpt":"Earlier on in benchmarking MySQL and MariaDB on POWER8, we noticed that on write workloads (or read workloads involving a lot of IO) we were spending a bunch of time computing InnoDB page checksums. This is a relatively well known MySQL problem and has existed for many years and Percona\u2026","rel":"","context":"In &quot;IBM&quot;","block_context":{"text":"IBM","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/ibm-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1648,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/05\/19\/is-bit_length-useful\/","url_meta":{"origin":3950,"position":1},"title":"Is BIT_LENGTH() useful?","author":"Stewart Smith","date":"2009-05-19","format":false,"excerpt":"mysql [localhost] {msandbox} ((none)) > select length(crc32(3)) * 8, bit_length(crc32(3)); +----------------------+----------------------+ | length(crc32(3)) * 8 | bit_length(crc32(3)) | +----------------------+----------------------+ | 80 | 80 | +----------------------+----------------------+ 1 row in set (0.00 sec)","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3755,"url":"https:\/\/www.flamingspork.com\/blog\/2014\/06\/03\/mysql-5-6-performance-on-power8\/","url_meta":{"origin":3950,"position":2},"title":"MySQL 5.6 Performance on POWER8","author":"Stewart Smith","date":"2014-06-03","format":false,"excerpt":"The following sentence is brought to you by IBM Legal: The postings on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. My previous post covered the work needed to get MySQL 5.6.17 running reliably on modern POWER systems. The patch to MySQL 5.6.17 that's\u2026","rel":"","context":"In &quot;IBM&quot;","block_context":{"text":"IBM","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/ibm-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3765,"url":"https:\/\/www.flamingspork.com\/blog\/2014\/06\/03\/1-million-sql-queries-per-second-mysql-5-7-on-power8\/","url_meta":{"origin":3950,"position":3},"title":"1 million SQL Queries Per Second: MySQL 5.7 on POWER8","author":"Stewart Smith","date":"2014-06-03","format":false,"excerpt":"I've previously covered MySQL 5.6 on POWER (with patch), MySQL 5.6 Performance on POWER8 (spoiler: new performance record) and MySQL 5.7 on POWER. Of course, The postings on this site are my own and don\u00e2\u20ac\u2122t necessarily represent IBM\u00e2\u20ac\u2122s positions, strategies or opinions. Also, these numbers should be considered preliminary, but\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3758,"url":"https:\/\/www.flamingspork.com\/blog\/2014\/06\/03\/mysql-5-7-on-power\/","url_meta":{"origin":3950,"position":4},"title":"MySQL 5.7 on POWER","author":"Stewart Smith","date":"2014-06-03","format":false,"excerpt":"In a previous post, I covered porting MySQL 5.6 to POWER and subsequently, some new record performance numbers with MySQL 5.6.17 on POWER8. Well, those following at home will be aware that not only is the next sentence sponsored by IBM Legal, but that MySQL 5.7 alleviates a bunch of\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3959,"url":"https:\/\/www.flamingspork.com\/blog\/2015\/04\/28\/going-beyond-1-3-million-sql-queriessecond\/","url_meta":{"origin":3950,"position":5},"title":"Going beyond 1.3 MILLION SQL Queries\/second","author":"Stewart Smith","date":"2015-04-28","format":false,"excerpt":"So, on a large IBM POWER8 system I was recently running the newly coined \"yesmark\" benchmark, which is best translated as this: Benchmark (N for concurrency): for i in {1..N}; do yes \"DO 0;\" | mysql > \/dev\/null & done Live results: mysqladmin -ri 1 extended-status | grep Questions Which\u2026","rel":"","context":"In &quot;IBM&quot;","block_context":{"text":"IBM","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/ibm-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=3950"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3950\/revisions"}],"predecessor-version":[{"id":3951,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3950\/revisions\/3951"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=3950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=3950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=3950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}