
{"id":280,"date":"2011-10-20T20:56:54","date_gmt":"2011-10-20T20:56:54","guid":{"rendered":"http:\/\/www.starcoder.com\/wordpress\/?p=280"},"modified":"2021-10-30T19:54:42","modified_gmt":"2021-10-30T19:54:42","slug":"file-vault-2-on-the-2011-macbook-air","status":"publish","type":"post","link":"https:\/\/www.starcoder.com\/wordpress\/2011\/10\/file-vault-2-on-the-2011-macbook-air\/","title":{"rendered":"File Vault 2 on the 2011 MacBook Air"},"content":{"rendered":"<p>I recently upgraded to a 2011 MacBook Air.  With the new Sandy Bridge processors having encryption routines built-in, I decided to try out File Vault 2 on Lion to see what kind of performance impact it would have while accessing the disk.  Here&#8217;s the configuration of my MacBook Air for reference:<\/p>\n<p>11&#8243; MacBook Air (Summer 2011)<br \/>\n1.8Ghz Core i7<br \/>\n256GB SSD (Samsung model)<\/p>\n<p>First the baseline.  Before enabling File Vault, I did a quick test of writing a 10GB file and then reading it back.<\/p>\n<p><code>Blade:~ mike$ time dd if=\/dev\/zero of=test bs=1073741824 count=10<br \/>\n10+0 records in<br \/>\n10+0 records out<br \/>\n10737418240 bytes transferred in 41.938686 secs (256026577 bytes\/sec)<br \/>\nreal\t0m42.021s<br \/>\nuser\t0m0.005s<br \/>\nsys\t0m6.827s<br \/>\nBlade:~ mike$ time dd if=test of=\/dev\/null bs=1073741824 count=10<br \/>\n10+0 records in<br \/>\n10+0 records out<br \/>\n10737418240 bytes transferred in 37.969485 secs (282790726 bytes\/sec)<br \/>\nreal\t0m38.055s<br \/>\nuser\t0m0.005s<br \/>\nsys\t0m5.069s<\/code><\/p>\n<p>After enabling File Vault, the Mac restarts and it took about 50 minutes to finish the initial encryption. \u00a0While the encoding was taking place\u00a0I was seeing roughly 95-120MB\/sec transfer rates (190-240MB\/sec combined read\/write bandwidth), and it averaged about 45-50% CPU usage (% of a single core) during the encoding process.<\/p>\n<p>So what how was performance with encryption enabled?  Check this out\u2026<\/p>\n<p><code>Blade:~ mike$ time dd if=\/dev\/zero of=test bs=1073741824 count=10<br \/>\n10+0 records in<br \/>\n10+0 records out<br \/>\n10737418240 bytes transferred in 45.342448 secs (236807202 bytes\/sec)<\/p>\n<p>real\t0m45.418s<br \/>\nuser\t0m0.001s<br \/>\nsys\t0m7.721s<br \/>\nBlade:~ mike$ time dd if=test of=\/dev\/null bs=1073741824 count=10<br \/>\n10+0 records in<br \/>\n10+0 records out<br \/>\n10737418240 bytes transferred in 40.052954 secs (268080558 bytes\/sec)<\/p>\n<p>real\t0m40.133s<br \/>\nuser\t0m0.001s<br \/>\nsys\t0m4.032s<\/code><\/p>\n<p>So read operations take a 5.5% hit, and write operations are 8.1% slower with File Vault 2 enabled.  That&#8217;s a performance penalty I can live with for the extra peace of mind of my data being secure while traveling.  Even better is the amount of CPU used was about the same whether encryption was enabled or disabled.<\/p>\n<p>Performance summary:<\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<th>File Vault<\/th>\n<th colspan=\"2\" align=\"center\">Read<\/th>\n<th colspan=\"2\" align=\"center\">Write<\/th>\n<\/tr>\n<tr>\n<td>\u00a0<\/td>\n<th align=\"center\">Bandwidth<\/th>\n<th align=\"center\">CPU<\/th>\n<th align=\"center\">Bandwidth<\/th>\n<th align=\"center\">CPU<\/th>\n<\/tr>\n<tr>\n<th>Disabled<\/th>\n<td align=\"center\">269.69 MB\/s<\/td>\n<td align=\"center\">5.074s<\/td>\n<td align=\"center\">244.16 MB\/s<\/td>\n<td align=\"center\">6.832s<\/td>\n<\/tr>\n<tr>\n<th>Enabled<\/th>\n<td align=\"center\">255.66 MB\/s<\/td>\n<td align=\"center\">4.033s<\/td>\n<td align=\"center\">225.84 MB\/s<\/td>\n<td align=\"center\">7.722s<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>I recently upgraded to a 2011 MacBook Air. With the new Sandy Bridge processors having encryption routines built-in, I decided to try out File Vault 2 on Lion to see what kind of performance impact it would have while accessing the disk. Here&#8217;s the configuration of my MacBook Air for reference: 11&#8243; MacBook Air (Summer [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-280","post","type-post","status-publish","format-standard","hentry","category-uncategorized","post-preview"],"_links":{"self":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts\/280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/comments?post=280"}],"version-history":[{"count":22,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts\/280\/revisions"}],"predecessor-version":[{"id":564,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts\/280\/revisions\/564"}],"wp:attachment":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/media?parent=280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/categories?post=280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/tags?post=280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}