{"id":1709,"date":"2020-10-26T09:15:53","date_gmt":"2020-10-26T08:15:53","guid":{"rendered":"https:\/\/locallost.net\/?p=1709"},"modified":"2020-10-26T09:15:53","modified_gmt":"2020-10-26T08:15:53","slug":"quick-benchmark-of-gzip-and-gnupg-throughput","status":"publish","type":"post","link":"https:\/\/locallost.net\/?p=1709","title":{"rendered":"Quick benchmark of Gzip and Gnupg throughput"},"content":{"rendered":"\n<p>Testing Gzip and Gnupg throughput for compressing and encrypting large files on-the-fly on Intel Core i5-6200U @2.30 GHz.<\/p>\n\n\n\n<p><code>gzip<\/code> vs. <code>pigs<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>gzip --best<\/code> : 23,8 MB\/s<\/li><li><code>pigz -p 2 --best<\/code> : 51 MB\/s<\/li><li><code>pigs -p 4 --best<\/code> : 60 MB\/s<\/li><\/ul>\n\n\n\n<p><code>gpg<\/code> vs. <code>gpg2<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>gpg --encrypt<\/code> : 19,5 MB\/s<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><code>gpg2 --encrypt<\/code> : 22,5 MB\/s<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><code>gpg --encrypt --compress-level 0<\/code> : 56,5 MB\/s<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><code>gpg2 --encrypt --compress-level 0<\/code> : 98,5 MB\/s<\/li><\/ul>\n\n\n\n<p>Summary :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Gzip compression (with <code>--best<\/code> level) is the limiting factor: use <code>pigz<\/code> to parallelize and maximize compression throughput.<\/li><li>Gnupg performs by default a compression which is redundant if you feed him already compressed files: use <code>pigz<\/code> to parallelize and maximize the throughput AND disable Gnupg&rsquo;s compression (<code>--compress-level 0<\/code>). Also, if you leave Gnupg&rsquo;s compression on, it might not be able to parallelize it as <code>pigz<\/code> does, hence the benefit of performing the compression separately with <code>pigz<\/code> to maximize throughput.<\/li><li><code>gpg2<\/code> is almost two time faster than <code>gpg<\/code> when performing AES256 encryption: use  <code>gpg2<\/code> to maximize throughput.<\/li><li>The overall best \u00ab\u00a0combo\u00a0\u00bb for compressing and encrypting large files on-the-fly might be: <code>pigz --best | gpg2 --encrypt --compress-level 0<\/code><\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Testing Gzip and Gnupg throughput for compressing and encrypting large files on-the-fly on Intel Core i5-6200U @2.30 GHz. gzip vs. pigs: gzip &#8211;best : 23,8 MB\/s pigz -p 2 &#8211;best : 51 MB\/s pigs -p 4 &#8211;best : 60 MB\/s &hellip; <a href=\"https:\/\/locallost.net\/?p=1709\">Continuer la lecture <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_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_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}},"categories":[1],"tags":[],"class_list":["post-1709","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2Bei9-rz","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/locallost.net\/index.php?rest_route=\/wp\/v2\/posts\/1709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/locallost.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/locallost.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/locallost.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/locallost.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1709"}],"version-history":[{"count":1,"href":"https:\/\/locallost.net\/index.php?rest_route=\/wp\/v2\/posts\/1709\/revisions"}],"predecessor-version":[{"id":1710,"href":"https:\/\/locallost.net\/index.php?rest_route=\/wp\/v2\/posts\/1709\/revisions\/1710"}],"wp:attachment":[{"href":"https:\/\/locallost.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/locallost.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/locallost.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}