{"id":148,"date":"2014-06-26T22:03:20","date_gmt":"2014-06-27T03:03:20","guid":{"rendered":"http:\/\/etapien.com\/guides\/?p=148"},"modified":"2020-08-24T14:22:21","modified_gmt":"2020-08-24T19:22:21","slug":"optimize-linux-ssds-2","status":"publish","type":"post","link":"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/","title":{"rendered":"How To Optimize Linux For SSDs"},"content":{"rendered":"<p>Get the most out of your SSD in Linux \u2013 here\u2019s what you need to know.<\/p>\n<p>Linux is pretty great out-of-the-box, there are still some items that require a little bit of manual optimization to get them going as smoothly as possible.\u00a0Controlling power consumption\u00a0is the most common one, but optimizing your system for SSDs is another important one. And it\u2019s important to do so, because\u00a0well-maintained SSDs are a joy to have.<\/p>\n<p>To get the best performance and least wear-and-tear on your solid state drive, try these optimizations for your Linux system.<\/p>\n<h2 style=\"font-weight: 400; color: #222222;\">Update Your Distribution<\/h2>\n<p>While I don\u2019t think this will be an issue for most people, it\u2019s still worth mentioning. In order to take advantage of the latest optimizations in applications, kernel, filesystem, and much more, it\u2019s best to run the latest version of\u00a0your favorite distribution. If even if you\u2019re on older but still-supported releases (such as Ubuntu 12.04), it\u2019s best to upgrade to the latest version (such as 14.04) as there have been a ton of changes that make the operating system much more SSD-friendly.<\/p>\n<h2 style=\"font-weight: 400; color: #222222;\">Update SSD Firmware<\/h2>\n<p>It\u2019s also a good idea to upgrade the firmware on your SSD. The instructions on how to do this is different for each vendor, so you\u2019ll need to look up instructions for your specific SSD. Be aware that some (but not all) don\u2019t allow the firmware to be updated via Linux; instead, you\u2019ll need to use a specific bootable environment (similar to a Linux live environment) or a Windows utility to do the job.<\/p>\n<h2 style=\"font-weight: 400; color: #222222;\">Use ext4<\/h2>\n<p><span class=\"post__img-holder\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-352985\" title=\"How To Optimize Linux For SSDs   image\" src=\"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_ext4.jpg?496a37\" alt=\"linux ssd ext4   How To Optimize Linux For SSDs\" width=\"640\" height=\"391\" \/><\/span><\/p>\n<div class=\"img__sharer\"><\/div>\n<p>When you\u2019re freshly installing a Linux system, it\u2019s best to use the ext4 filesystem. It\u2019s the most used, and most stable, filesystem available that supports TRIM (which still needs to be enabled \u2013 more on that below).<\/p>\n<p>&nbsp;<\/p>\n<p>This shouldn\u2019t be much of a problem: most distributions default to ext4.<\/p>\n<h2 style=\"font-weight: 400; color: #222222;\">Mount Options At Boot<\/h2>\n<p><span class=\"post__img-holder\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-352986\" title=\"How To Optimize Linux For SSDs   image\" src=\"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_fstab.jpg?496a37\" alt=\"linux ssd fstab   How To Optimize Linux For SSDs\" width=\"640\" height=\"345\" \/><\/span><\/p>\n<div class=\"img__sharer\"><\/div>\n<p>Every time you boot your Linux system, it must mount the various drives in your computer in order to use them. There are various mount options you can use, depending on your hardware and your needs, and some are appropriate to use with SSDs.<\/p>\n<p>&nbsp;<\/p>\n<p>To make these changes, open up your terminal and run the command\u00a0<code>sudo nano \/etc\/fstab<\/code>. Next, find the partition(s) in your SSD(s) that are listed in this file. Partitions here are normally listed by UUID, which is more precise than the\u00a0<code>\/dev\/sdXY<\/code>\u00a0identification system. If you have multiple partitions, you can use the command\u00a0<code>blkid \/dev\/sdXY<\/code>\u00a0to find the UUID, replacing X with a-z and Y with 1-9.<\/p>\n<p>Then, add the following mount options:\u00a0<code>discard<\/code>\u00a0and\u00a0<code>noatime<\/code>. Discard allows the SSD\u2019s TRIM function to be used \u2013 this improves performance and longevity. The other option, noatime, tells the filesystem to not keep track of last accessed times \u2013 just last modified times. This can reduce wear and tear on your SSD, because there are many files that you access while you use your computer but there are far fewer files that you\u2019ll end up modifying. The file should look similar to the screenshot above.<\/p>\n<p>If you find that some programs are misbehaving with the noatime option (as last accessed times will be before last modified times, which is normally impossible), you can replace noatime with relatime. This updates the last accessed time with the same value as the last modified time, all in the same write operation.<\/p>\n<h2 style=\"font-weight: 400; color: #222222;\">Don\u2019t Use SWAP<\/h2>\n<p><span class=\"post__img-holder\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-352987\" title=\"How To Optimize Linux For SSDs   image\" src=\"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_noswap.jpg?496a37\" alt=\"linux ssd noswap   How To Optimize Linux For SSDs\" width=\"640\" height=\"487\" \/><\/span><\/p>\n<div class=\"img__sharer\"><\/div>\n<p>When using an SSD, it\u2019s also a very good idea to not have\u00a0a SWAP partition\u00a0on it (unless you have a serious reason to do so).<\/p>\n<p>&nbsp;<\/p>\n<p>The constant reads and writes SWAP partitions do add significant wear-and-tear to the SSD. If you really would like to have a SWAP partition, it\u2019d be better to place it on a secondary, non-SSD hard drive if at all possible. I know it\u2019s tempting to put a SWAP partition on an SSD \u2013 it would be the best-performing SWAP partition you\u2019ll ever have \u2013 but this speed comes at a major cost.<\/p>\n<p>A lot of people suggest that you can still add a SWAP partition but disable hibernation, since that causes extreme amounts of reads and writes. But since it\u2019s rare that you\u2019ll use a SWAP partition, as you probably have more than enough RAM, it\u2019ll just take up space and potentially cause wear-and-tear. Also, not including a SWAP partition to begin with is an easy way to disable hibernation.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get the most out of your SSD in Linux \u2013 here\u2019s what you need to know. Linux is pretty great out-of-the-box, there are still some items that require a little bit of manual optimization to get them going as smoothly as possible.\u00a0Controlling power consumption\u00a0is the most common one, but optimizing your system for SSDs is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Optimize Linux For SSDs - Tech Howtos<\/title>\n<meta name=\"description\" content=\"optimize ssd\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Optimize Linux For SSDs - Tech Howtos\" \/>\n<meta property=\"og:description\" content=\"optimize ssd\" \/>\n<meta property=\"og:url\" content=\"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Howtos\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-27T03:03:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-24T19:22:21+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_ext4.jpg?496a37\" \/>\n<meta name=\"author\" content=\"Etapien\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Etapien\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/\",\"url\":\"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/\",\"name\":\"How To Optimize Linux For SSDs - Tech Howtos\",\"isPartOf\":{\"@id\":\"https:\/\/etapien.com\/guides\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_ext4.jpg?496a37\",\"datePublished\":\"2014-06-27T03:03:20+00:00\",\"dateModified\":\"2020-08-24T19:22:21+00:00\",\"author\":{\"@id\":\"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424\"},\"description\":\"optimize ssd\",\"breadcrumb\":{\"@id\":\"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/#primaryimage\",\"url\":\"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_ext4.jpg?496a37\",\"contentUrl\":\"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_ext4.jpg?496a37\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/etapien.com\/guides\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Optimize Linux For SSDs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/etapien.com\/guides\/#website\",\"url\":\"https:\/\/etapien.com\/guides\/\",\"name\":\"Tech Howtos\",\"description\":\"Tech related useful howtos\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/etapien.com\/guides\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424\",\"name\":\"Etapien\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/etapien.com\/guides\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g\",\"caption\":\"Etapien\"},\"url\":\"https:\/\/etapien.com\/guides\/author\/Etapien\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Optimize Linux For SSDs - Tech Howtos","description":"optimize ssd","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/","og_locale":"en_US","og_type":"article","og_title":"How To Optimize Linux For SSDs - Tech Howtos","og_description":"optimize ssd","og_url":"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/","og_site_name":"Tech Howtos","article_published_time":"2014-06-27T03:03:20+00:00","article_modified_time":"2020-08-24T19:22:21+00:00","og_image":[{"url":"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_ext4.jpg?496a37"}],"author":"Etapien","twitter_misc":{"Written by":"Etapien","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/","url":"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/","name":"How To Optimize Linux For SSDs - Tech Howtos","isPartOf":{"@id":"https:\/\/etapien.com\/guides\/#website"},"primaryImageOfPage":{"@id":"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/#primaryimage"},"image":{"@id":"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/#primaryimage"},"thumbnailUrl":"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_ext4.jpg?496a37","datePublished":"2014-06-27T03:03:20+00:00","dateModified":"2020-08-24T19:22:21+00:00","author":{"@id":"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424"},"description":"optimize ssd","breadcrumb":{"@id":"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/#primaryimage","url":"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_ext4.jpg?496a37","contentUrl":"http:\/\/main.makeuseoflimited.netdna-cdn.com\/wp-content\/uploads\/2014\/06\/linux_ssd_ext4.jpg?496a37"},{"@type":"BreadcrumbList","@id":"https:\/\/etapien.com\/guides\/optimize-linux-ssds-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/etapien.com\/guides\/"},{"@type":"ListItem","position":2,"name":"How To Optimize Linux For SSDs"}]},{"@type":"WebSite","@id":"https:\/\/etapien.com\/guides\/#website","url":"https:\/\/etapien.com\/guides\/","name":"Tech Howtos","description":"Tech related useful howtos","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/etapien.com\/guides\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424","name":"Etapien","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/etapien.com\/guides\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g","caption":"Etapien"},"url":"https:\/\/etapien.com\/guides\/author\/Etapien\/"}]}},"_links":{"self":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts\/148"}],"collection":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/comments?post=148"}],"version-history":[{"count":1,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts\/148\/revisions"}],"predecessor-version":[{"id":149,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts\/148\/revisions\/149"}],"wp:attachment":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/media?parent=148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/categories?post=148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/tags?post=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}