<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Nvme on blog.iankulin.com</title><link>https://blog.iankulin.com/tags/nvme/</link><description>Recent content in Nvme 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/nvme/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>How to install M.2 SSD in HP G2 800 Mini</title><link>https://blog.iankulin.com/how-to-install-m-2-ssd-in-hp-g2-800-mini/</link><pubDate>Mon, 28 Aug 2023 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/how-to-install-m-2-ssd-in-hp-g2-800-mini/</guid><description>&lt;img src="https://blog.iankulin.com/images/img_5821-copy.jpg" width="512" alt=""&gt;
&lt;p&gt;As part of my strategy to not worry about the &lt;a href="https://blog.iankulin.com/sdd-wearout-numbers/"&gt;slightly dodgy SMART reporting&lt;/a&gt; on the SDD&amp;rsquo;s in my HP Elitedesk G2 800 Mini Proxmox nodes, I&amp;rsquo;d decided to make use of the full sized &lt;a href="https://en.wikipedia.org/wiki/M.2"&gt;M.2&lt;/a&gt; slot to install 256GB NVME drives. That way I can boot from those, and have the SSD&amp;rsquo;s running &lt;a href="https://arstechnica.com/information-technology/2020/05/zfs-101-understanding-zfs-storage-and-performance/"&gt;ZFS&lt;/a&gt; which allows &lt;em&gt;&lt;a href="https://openzfs.github.io/openzfs-docs/man/8/zpool-scrub.8.html"&gt;scrubbing&lt;/a&gt;&lt;/em&gt; to check the integrity of all the data. My VM disks can live on this drive.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://support.hp.com/au-en/product/hp-elitedesk-800-35w-g2-desktop-mini-pc/7633266"&gt;G2 800 Mini&lt;/a&gt; has two M.2 slots, a 2230 (M.2 sizes are &lt;code&gt;wwll&lt;/code&gt; where &lt;code&gt;ww&lt;/code&gt; is width in mm, and &lt;code&gt;ll&lt;/code&gt; is length in mm) for the wireless/bluetooth adaptor and a 2280 for storage. These slots are under the SSD drive cage.&lt;/p&gt;
&lt;h2 id="steps"&gt;Steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Undo the large finger-operable screw on the back of the case, then slide the case off in the direction of the front of the unit.&lt;/li&gt;
&lt;li&gt;Unplug the drive SATA connector&lt;/li&gt;
&lt;/ul&gt;
&lt;img src="https://blog.iankulin.com/images/img_5818.jpg" width="800" alt=""&gt;
&lt;ul&gt;
&lt;li&gt;At the right side of the SSD (when the machine is orientated per the photo above) is a lever that can be pushed a little to the right to allow the drive to slide back and be lifted out.&lt;/li&gt;
&lt;li&gt;There&amp;rsquo;s three giant screws holding the drive cage in numbered 1, 2 &amp;amp; 3. There&amp;rsquo;s also several smaller screws with numbers - ignore them. The ones you are looking for have a torx in the middle, but also a slot for an ordinary flat blade screwdriver. If you can only find two, that&amp;rsquo;s probably because the drive&amp;rsquo;s SATA connector is covering it up.&lt;/li&gt;
&lt;/ul&gt;
&lt;img src="https://blog.iankulin.com/images/img_5829.jpg" width="800" alt=""&gt;
&lt;ul&gt;
&lt;li&gt;Once the drive cage is removed and set aside, you&amp;rsquo;ll be able to see the two M.2 slots. The NVME drive slots in like SODIMM memory - sort of sprung up on the end away from the connector. I didn&amp;rsquo;t like the look of those lose wires - but I assume they are for the wifi or bluetooth antennas.&lt;/li&gt;
&lt;/ul&gt;
&lt;img src="https://blog.iankulin.com/images/img_5821-copy.jpg" width="512" alt=""&gt;
&lt;ul&gt;
&lt;li&gt;Wriggle it in, then push the end down and secure it with the little M.2 screws. You did remember to &lt;a href="https://www.ebay.com.au/itm/254101897159?hash=item3b29a73fc7:g:Wi4AAOSw6JpfdRiw&amp;amp;amdata=enc%3AAQAIAAABAFQS9v%2BRrt%2FNj4OpgTFaOvObhlzxvwZi%2BTxcYYqqbid7A6%2BkHvM6T3%2BDJ%2FegE3E9k3OH8bnHIBDJATYnIeJb9db%2FcKPWZP%2FAeNLDhwPi%2FDebbCZOJmhrSd3j0GRYLzE03YK%2F8DvMMAeLjPWLUO6mqZSUv%2FB7%2FuOs4Yz%2F5%2Bj6atvgCb0afWi9igSdklHlr6N1gqWN7DSb9WrCi2Dx62LQdasjvyrTNm%2BeDGzRj1ADzEJTG1oyJkOto6DOY2cUiGM5gLssMknszOh25RhBgXrNLf%2BUFnzUI2%2BOr5fvcamWs7zxKJJcndcMYOzbm3v%2B243SsWoGymttCsbsWi%2FLRekQRpQ%3D%7Ctkp%3ABFBMvrXWjLBi"&gt;order those screws&lt;/a&gt;, right? My $20 Samsung PM981a 256GB drives didn&amp;rsquo;t come with any, but perhaps fancy ones do.&lt;/li&gt;
&lt;li&gt;Then, as 1970 &lt;a href="https://haynes.com/en-au/holden/kingswood/1968-1971?part=04085&amp;amp;selector=print&amp;amp;gclid=EAIaIQobChMI3u6DqfKjgAMVLtcWBR2U7gT2EAQYBiABEgIgmfD_BwE"&gt;Greggory&amp;rsquo;s workshop manuals&lt;/a&gt; used to say, &amp;ldquo;&lt;em&gt;Assembly is the reverse of the disassembly steps with attention to the following:&lt;/em&gt;&amp;rdquo;. In this case, the attention would be towards being gentle with that SSD ribbon connector.&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>