<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ssd on blog.iankulin.com</title><link>https://blog.iankulin.com/tags/ssd/</link><description>Recent content in Ssd on blog.iankulin.com</description><generator>Hugo</generator><language>en-AU</language><lastBuildDate>Sat, 09 Sep 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.iankulin.com/tags/ssd/index.xml" rel="self" type="application/rss+xml"/><item><title>Basic VPS disk speed</title><link>https://blog.iankulin.com/basic-vps-disk-speed/</link><pubDate>Sat, 09 Sep 2023 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/basic-vps-disk-speed/</guid><description>&lt;p&gt;I couldn&amp;rsquo;t help but measure some VPS disk speeds while I was busting out the &lt;code&gt;fio&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.iankulin.com/images/vps.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;Binary Lane only claims &amp;ldquo;pure SSD drives&amp;rdquo; but seems pretty great. The difference between Digital Ocean SSD and NVME is disappointing. Obviously you&amp;rsquo;re sharing a drive with other users, so perhaps this depends on what else is going on.&lt;/p&gt;</description></item><item><title>Testing Storage Speed</title><link>https://blog.iankulin.com/testing-storage-speed/</link><pubDate>Sun, 03 Sep 2023 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/testing-storage-speed/</guid><description>&lt;p&gt;Now I&amp;rsquo;ve added NVME drives to my nodes, plus added an external NMVE RAID, I&amp;rsquo;ve got quite the collection of storage options. For one of my nodes, it looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.iankulin.com/images/screen-shot-2023-07-23-at-1.20.34-pm.png"&gt;&lt;img src="https://blog.iankulin.com/images/screen-shot-2023-07-23-at-1.20.34-pm.png" width="979" alt="Screenshot of Proxmox GUI showing 5 storage options"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The 256GB NVME the OS is installed to&lt;/li&gt;
&lt;li&gt;The 512GB SSD, currently running ZFS&lt;/li&gt;
&lt;li&gt;The Synology NAS - 4 x 6TB drives in RAID 5 on a 1GB switch&lt;/li&gt;
&lt;li&gt;A pair of 256GB NVME sticks in an external USB3 enclosure set up as a mirrored ZFS pool.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For my dev VM&amp;rsquo;s I often set them up to have their storage on the NAS - it&amp;rsquo;s just super easy to move them around then. The production VM&amp;rsquo;s currently have their storage on the SSD (that machine hasn&amp;rsquo;t had the NVME upgrade yet), but obviously with all these options, it&amp;rsquo;d be interesting to think about what goes where.&lt;/p&gt;
&lt;p&gt;The biggest lots of files - media and distro ISO&amp;rsquo;s are clearly going to be on the NAS. No thinking to do there. Production VM backups also go there, and now I&amp;rsquo;ve got room they might also go cross-node as an extra layer of redundancy.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s really the live VM hard disks that need a decision. So I need to do some measuring.&lt;/p&gt;
&lt;p&gt;Jim Salter - one of the ZFS kings on the &lt;a href="https://2.5admins.com/"&gt;2.5 Admins&lt;/a&gt; podcast has an &lt;a href="https://arstechnica.com/gadgets/2020/02/how-fast-are-your-disks-find-out-the-open-source-way-with-fio/"&gt;article on drive speed testing&lt;/a&gt; that&amp;rsquo;s worth reading even just for the good descriptions of different drives and the range of workloads to consider.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://arstechnica.com/gadgets/2020/02/how-fast-are-your-disks-find-out-the-open-source-way-with-fio/"&gt;&lt;img src="https://blog.iankulin.com/images/screen-shot-2023-07-23-at-4.42.31-pm.jpg" alt="Article headline: How fast are your disks? Find out the open source way,
with fio."&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;He ends up recommending three tests using &lt;code&gt;fio&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Writing 4K blocks randomly - disks do not enjoy this&lt;/li&gt;
&lt;li&gt;Having 16 parallel processes write 64K blocks to random locations in 256MB files&lt;/li&gt;
&lt;li&gt;Writing 1MB blocks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I ran all of those tests once on each of my storage options and this is what we got.&lt;/p&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;NVME&lt;/td&gt;&lt;td&gt;NAS/NFS/RAID 5&lt;/td&gt;&lt;td&gt;SDD/ZFS&lt;/td&gt;&lt;td&gt;External NVME RAID 1 ZFS&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Single 4KiB random write process&lt;/td&gt;&lt;td&gt;430&lt;/td&gt;&lt;td&gt;17.9&lt;/td&gt;&lt;td&gt;80.6&lt;/td&gt;&lt;td&gt;75.7&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;16 parallel 64KiB random write processes&lt;/td&gt;&lt;td&gt;2328&lt;/td&gt;&lt;td&gt;4897&lt;/td&gt;&lt;td&gt;267&lt;/td&gt;&lt;td&gt;135&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Single 1MiB random write process&lt;/td&gt;&lt;td&gt;651&lt;/td&gt;&lt;td&gt;70.7&lt;/td&gt;&lt;td&gt;379&lt;/td&gt;&lt;td&gt;195&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;em&gt;Speeds in MB/s&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You can better see how crazy this is in a graph.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.iankulin.com/images/picture-1.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;What is up with the figure for the NAS 16 x 64K?&lt;/p&gt;
&lt;p&gt;Probably worth talking about what I was expecting. I thought the internal NVME would be quickest, then the internal SDD, then the external NVME RAID then the NAS since it&amp;rsquo;s over the network.&lt;/p&gt;
&lt;p&gt;Given the excellent speed of the internal NVME, the external NMVE was a d=bit disappointing, but it&amp;rsquo;s got a few factors going against it. One is that it&amp;rsquo;s talking over USB 3 which has a theoretical 600MB/s limit, but we&amp;rsquo;re well under that. More likely it&amp;rsquo;s the ZFS - a system that is focused on data integrity rather than speed. But then the external drive is worse that the internal SATA SSD - and they both have ZFS with compression turned on. The enclosure is a no-name brand one, so we don&amp;rsquo;t really know the quality of it&amp;rsquo;s USB 3.0 implementation.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m dubious about the data for the NAS. When I first ran the 4K test it took so long, I killed the process a couple of times thinking it was frozen. The test command limits all three tests to a minute, so you&amp;rsquo;d expect them to take just a few seconds more than that, but all the NAS tests seemed to hang on the very last piece of output for minutes. I&amp;rsquo;m wondering is there was some smart caching going on, but then it waited in an async way to complete. Jim actually discusses that this is the purpose of the &lt;code&gt;--end_fsync=1&lt;/code&gt; in the commands so likely that&amp;rsquo;s it. I&amp;rsquo;ll have a think about how to adjust for this for a future post.&lt;/p&gt;
&lt;h3 id="cost-of-zfs"&gt;Cost of ZFS&lt;/h3&gt;
&lt;p&gt;What would the story be on the internal SSD if we turn the ZFS compression off, or just use ext4?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.iankulin.com/images/ssd-speed.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;It looks like compression has quite a cost on the little writes. It&amp;rsquo;s not a simple matter though - you could expect a speed improvement in many situations if the data compresses well. I had a look at the data in some of the test files that were generated, and it seemed quite random which is probably the worst case scenario for compression. Even so, in the graphs above the compressed looks like it did better than the uncompressed for the 64K random writes. I didn&amp;rsquo;t bother to replicate the tests, so it&amp;rsquo;s possible that&amp;rsquo;s just noise.&lt;/p&gt;
&lt;p&gt;Looking at the external dual NVME USB 3 drive with compression on/off is a similar story.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.iankulin.com/images/external.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;A big increase for the small writes, slight decrease in the parallel ones.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s really a bit hard to come to any conclusions from all this, but let&amp;rsquo;s have a go:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There&amp;rsquo;s a speed penalty for using ZFS at all&lt;/li&gt;
&lt;li&gt;ZFS compression is expensive for many small writes of uncompressible data&lt;/li&gt;
&lt;li&gt;I need to know more about fio to figure out what was going on with that near impossible speed&lt;/li&gt;
&lt;li&gt;NVME is really fast connected to the bus, plugged in through USB, not so much&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Based on this, I wish I&amp;rsquo;d bought bigger NVME drives - that might be a future plan when I&amp;rsquo;ve run these for a while. These 256GB ones were $20 each which is just about a disposable price. They&amp;rsquo;ll probably end up as cache for a NAS or something in the future. In the mean time, I&amp;rsquo;ll format my SATA SSDs with ZFS with no compression and the VM disks will live on them. The benefits I get from that (100% data integrity checks with scrubs, and easy transfer of snapshots) seem like a reasonable tradeoff for a little speed.&lt;/p&gt;</description></item><item><title>SDD Wearout numbers</title><link>https://blog.iankulin.com/sdd-wearout-numbers/</link><pubDate>Tue, 25 Apr 2023 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/sdd-wearout-numbers/</guid><description>&lt;p&gt;I didn&amp;rsquo;t understand why the default Proxmox install sets up the storage the way it does - with the available disk split up into an LVM and an LVM thin storage - so I&amp;rsquo;ve been reading this excellent &lt;a href="https://blog.programster.org/proxmox-storage-guide"&gt;Proxmox Storage Guide&lt;/a&gt; by Programster (spoiler - the LVM thin makes VM snapshots easier).&lt;/p&gt;
&lt;p&gt;At one point in the post they mention that you can see the &amp;ldquo;Wearout&amp;rdquo; percentage for any SSD drives in the Proxmox GUI, so of course, since I now own five second hand HP Elitedesk 800 G1/G2&amp;rsquo;s all with SSD drives, I dived in to have a look at each drive and found this.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Server&lt;/th&gt;
 &lt;th&gt;GB&lt;/th&gt;
 &lt;th&gt;Model&lt;/th&gt;
 &lt;th&gt;SMART&lt;/th&gt;
 &lt;th&gt;Wearout&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;pve-prod1&lt;/td&gt;
 &lt;td&gt;512&lt;/td&gt;
 &lt;td&gt;Micron_1100 SATA&lt;/td&gt;
 &lt;td&gt;Pass&lt;/td&gt;
 &lt;td&gt;6%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;pve-prod2&lt;/td&gt;
 &lt;td&gt;120&lt;/td&gt;
 &lt;td&gt;SSD2S120SF1200SA2&lt;/td&gt;
 &lt;td&gt;Pass&lt;/td&gt;
 &lt;td&gt;100%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;pve-dev1&lt;/td&gt;
 &lt;td&gt;256&lt;/td&gt;
 &lt;td&gt;TOSHIBA_THNSNK256GCS8&lt;/td&gt;
 &lt;td&gt;Pass&lt;/td&gt;
 &lt;td&gt;2%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;pve-kr01&lt;/td&gt;
 &lt;td&gt;120&lt;/td&gt;
 &lt;td&gt;KINGSTON_SA400S37120G&lt;/td&gt;
 &lt;td&gt;Pass&lt;/td&gt;
 &lt;td&gt;0%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;I&amp;rsquo;m no expert, but 100% &amp;ldquo;wearout&amp;rdquo; sounds bad, or maybe these figures go the other way, and that drive is 100% good and the others are just about dead. Either way, I&amp;rsquo;m suddenly interested in this number and what it means.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a button to look at the S.M.A.R.T (Self-Monitoring, Analysis and Reporting Technology backronym) attributes, so let&amp;rsquo;s have a look at this suspicious no-name drive.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.iankulin.com/images/screen-shot-2023-04-19-at-7.27.43-pm.jpg" alt=""&gt;&lt;/p&gt;
&lt;p&gt;Well, some of this is comprehensible. The Power_On_Hours is saying it&amp;rsquo;s been on for about one and a half years worth of hours. Since it&amp;rsquo;s been power cycled over a thousand times, that all sort of matches a corporate desk machine that&amp;rsquo;s been in use for five or six years. These values look like the sort of data you get from running the &lt;code&gt;smartctl -a /dev/sda&lt;/code&gt; command. I&amp;rsquo;ve snipped this output because it is huge, but the middle part is very similar to the table above, and there was nothing scary it it,&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SMART overall-health self-assessment test result: PASSED
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1 Raw_Read_Error_Rate 0x0032 120 120 050 Old_age Always - 0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 5 Reallocated_Sector_Ct 0x0033 100 100 003 Pre-fail Always - 0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 9 Power_On_Hours 0x0032 060 060 000 Old_age Always - 35173 (2 96 0)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 1059
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;171 Unknown_Attribute 0x000a 100 100 000 Old_age Always - 0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;172 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;No self-tests have been logged. [To run self-tests, use: smartctl -t]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s a lot, but it clearly says that it&amp;rsquo;s &amp;ldquo;passed&amp;rdquo; the test.&lt;/p&gt;
&lt;p&gt;I tried to run the short SMART test a couple of times with the command: &lt;code&gt;smartctl --test=short /dev/sda&lt;/code&gt; but each time (after I&amp;rsquo;d waited a couple of minutes) when I ran &lt;code&gt;smartctl -l selftest /dev/sda&lt;/code&gt; to look at the results, it claimed the test had been aborted by the host. Presumably I need to shut down Proxmox to run the test properly.&lt;/p&gt;
&lt;p&gt;For the moment, I&amp;rsquo;m just hoping that different manufacturers report that wearout figure differently, but I&amp;rsquo;ll show an increased interest in these drives health for a while.&lt;/p&gt;
&lt;p&gt;The reason I have three nodes locally is that I&amp;rsquo;m anticipating going to HA (high availability) as I move more services out of the paid cloud onto self-hosted. When I do that some of the VM&amp;rsquo;s (with low disk speed needs) will have their storage on the NAS, and the others in a Ceph or ZFS pool to facilitate quick migration on failure. To support that, I&amp;rsquo;m probably looking at provisioning new high quality 512GB SSDs to these machines anyway, so if I do get to that stage, that&amp;rsquo;s a strong (although expensive) possibility, and I&amp;rsquo;d certainly rather buy two than three.&lt;/p&gt;</description></item></channel></rss>