Browsed by
Category: Problem solutions

Understanding SSD form factors and interfaces

Understanding SSD form factors and interfaces

SSD’s have been transformative to the entire storage market. The use of solid state memory instead of spinning physical platters in older hard drives and floppies changed how thin, light, rugged, and power efficient modern laptops are.

Understanding these devices has not been easy. There has been an explosion of different drives types – but most guides I found do a terrible job explaining them. They often interchange or incorrectly refer to their properties in confusing, and very often incorrect ways.

Hard Drive replacements and Upgrades
All the different types of hard drives/storage you find these days

Let’s start our journey by understanding the 3 basic properties of storage devices. Form factors, interfaces and storage technology.

Form factor: The form factor is the standardized physical dimensions for the drive. The form factor tells you the physical length, width, and height dimensions. They tell you nothing about whether the drive will actually plug in or work in your system. So, you cannot rely just on the form factor to ensure a new storage device will work in your PC; but you do need to make sure your PC has a physical slot that fits the form factor of your new storage device.

It is possible to find two drives that have the same form factor, but be based on very different physical or interface technologies. For example: it’s possible to find a 2.5″ hard drive that uses traditional physical platters or solid state memory. It’s also possible to find 2.5″ drives that use the SATA interface or IDE (or many others too).

Interface: The interface of a drive tells you how the drive transmits data with the computer. The interface is often (but not always) revealed by the type of power/data plugs that the drive has. Many PC’s have support for more than one type; laptops often only have one specific interface. So you might have to break out your motherboard book or laptop manual.

A common laptop mistake is to buy a drive with the right interface, but find out it won’t physically fit in the system (wrong form factor). It is also important to know that, just like USB ports, some interfaces have the same physical plugs, but support many different speeds of data transfer. It’s also possible for some M.2 slots to have keying that lets it work with SATA or NVMe drives, but the performance difference is sometimes orders of magnitude different. Just like putting a USB 3.x drive into a USB 1.x port (or vice versa), it might plug in and work, but it’s nowhere near as fast as the device or interface allows. So it’s important to see what interfaces your system supports and then buy the right form factor and interface.

Storage medium/technology: The third property is how the data is physically stored. In the 50’s and 60’s, the most common non-volatile storage medium was punch cards. They were simple card stock with holes punched in them. We then moved to tape drives that utilized large spools of magnetic tape. We then moved to hard drives and floppy disks that utilize circular platters coated with magnetic material. Drive heads move over the surface as the drive spun, and read the 1’s and 0’s. The next major advance was the use of solid state memory for storage. USB sticks used flash memory. More recently, we have seen the introduction of solid state drives that utilize much faster NAND flash memory.

Each technology has also had enhancements over time. NAND technology now uses different methods on how the data is stored in the memory cells (SLC, MCL, TLC, QLC). Hard Drives now have shingled (SMR) vs conventional (CMR) recording technology. Some of these technologies are incompatible with certain interfaces, others might be used on multiple interfaces.

Most of these storage technologies are completely transparent to the user but do have performance or failure rate impacts. QLC/TLC on NAND devices tends to slow once the device becomes even half full while SLC devices don’t slow until much more full. SMR hard drives are inherently slower than CMR drives but cheaper if all you’re using it for is infrequent storage purposes.

So now that we know there are these 3 major vectors for our storage devices, lets dig into some of them.

The ‘Standard’/Legacy Form Factors

Form factor has to do with the physical sizes/dimensions of the storage device. This idea came from older computer days when devices were physically larger/smaller. The front of a mid-90’s computer case often showed different drive sizes

computer.jpg (232×342)

These drives look very much like the old drives of days gone by. They came in a standardized 5.25″, 3.5″, 2.5″ and 1.8″ drive sizes. This size refers to their width to fit into physical drive bays located in your computer case. You can buy both SSD, floppy, or older platter sized drives in these form factors. It’s also often possible to buy display units and USB or flash drive readers in this form factor.

USB 3.0 and audio port kit that mounts in a 3.5″ drive bay

These form factors are legacy from older floppy, platter hard drive, and CDROM drive dimensions; but kept because it made mounting and replacing drives easier for PC manufacturers. Desktop systems often have several 5.25″ drive bays for CDROM/Blu-ray or other optical disk formats (though back in the day, there were even 5.25″ hard drives and 5.25″ floppy drives). 3.5″ and 2.5″ drive bays can be found in desktops and laptops. As laptops shrunk, hard drive sizes did too. 1.8″ drive sizes were the smallest things got before we moved to even smaller formats that didn’t need 4 point physical mountings.

As things miniaturized, the need for even tinier form factors became paramount. Here are some of those.

PCI Express Mini/Mini-PCIe/mSATA/MO-300 (full or half size) Form Factor

  • Physical size: 50.8mm x 29.85mm
  • Connector type: 52-pin card edge connector (split into 16-pin & 36-pin sections)

This form factor isn’t very common for storage and is something of a halfway step between platter drive form factors and M.2. You’re likely to encounter it in early laptops. This form factor comes in two varieties: full size and half size.

Great care must be taken with this form factor. Both mSATA and mini PCIe cards have the exact same form factor AND connector type – but your laptop may or may not support both interface types.

Half slimSATA/SlimSATA (MO-297) Form Factor

  • Physical size: 39.8mm x 54mm
  • Connector type: 22-pin standard 2.5” SATA SSD connector

This is a rarer format these days. This form factor comes in half and full sized versions. It can be identified by the fact it uses the standard 22 pin SATA connector.

M.2 Form Factor – Keys and slots

M.2 is the latest, most modern form factor for devices. That is right – M.2 refers only to the physical size/dimensions of the drive. MANY review sites incorrectly call M.2 drives SSD’s, NVME’s, etc. This is wrong because they are now confusing the interfaces with form factor. You can find not only storage in M.2 form factor, but also WiFi, bluetooth, GPS, and other devices. This form factor comes with three important form factor parameters: length, width, and keying. M.2 was introduce as the Next Generation Form Factor, but I have only seen it referred to as M.2.

The vast majority of M.2 devices typically come in the three sizes above, which may be deduced from the card names —2242, 2260, and 2280. The first two digits (22) represents the width in millimeters (mm), while the next two digits represent the length, also in mm.  It is possible to have a wide variety of widths and lengths – but the above sizes are the most common for storage and user devices.

Next up is their “key” type. Believe it or not, there are 12 different kinds of M.2 keying, but the most common for storage are B, M, and B+M.

In this case, you can often determine the interface type by the physical key-ing. B+M (which can fit in socks for B-keyed and M-keyed modules) are usually SATA interfaced. M.2 devices that use the NVMe interface are often only M keyed.

Interfaces

So, now that we’ve discussed if a drive will physically fit in your system, lets talk about how the data flows between your computer and the device. To avoid confusion, almost every interface has its own, unique type of physical data connector.

MFM/RLL/IDE

Wow – these are some old interface types. MFM/RLL are some of the first hard drive interfaces used in the late 80’s and early 90’s. By the 90’s, IDE (sometimes called parallel ATA) had taken over. No modern systems have used these interfaces in almost 20 years.

Serial-ATA/SATA

SATA is probably the most common interface on the market today. You can find it on everything from older platter drives, SSD drives of many form factors, Blu-ray drives, CDROM drives and burners. It was a great replacement for the older IDE interfaces of the 90’s.

SATA has gone through numerous upgrades over the years as speeds have increased. Most modern drives today use the latest iteration – SATA III – which delivers 600MB/s peak performance. SATA maintains very good backwards compatibility with older versions of SATA. Due to performance of the underlying storage media, most SATA III SSD drives can only actually get to 500-550MB/s. SATA III drives that use physical spinning platters can usually only get to 100MB/s due to their physical speed limitations (limitations of the read heads/platters). So just moving from a platter SATA III drive to a SSD SATA III drive can often yield you around a 5x speedup.

The important point about this interface is to know that if your device uses the SATA III interface, you won’t be getting faster than 600MB/s. This can be confusing because some M.2 storage media has both NVMe and SATA III interface support. But if your motherboard only supports SATA III M.2 devices, you’re only going to get the slower SATA III speeds. So be sure you check your motherboard specs and ensure you are using the right ports on your motherboard or you could be wasting a lot of money on performance you won’t be getting.

Additionally, you might think you are upgrading when you get rid of your 2.5″ form factor SSD drive that has the classic SATA III connectors for your fancy new M.2 form factor drive. But if that new M.2 drive uses the SATA III interface internally, you will be getting pretty much the same performance. So if you want NVMe speeds, make sure both the storage device AND your motherboard support NVMe. Otherwise, you’re probably getting SATA III speeds.

NVMe

NVMe stands for the Non-Volatile Memory express interface. The Non-Volatile Memory Host Controller Interface Specification (NVMHCIS) is an open logical device specification for accessing non-volatile storage media attached via the PCI Express (PCIe) bus.

Data exchange interfaces that were designed during the era of physical platter drives (IDE/SATA/etc) have very different latency profiles and very linear/serial input and output characteristics. These interfaces weren’t designed to exploit the unique massively parallel performance characteristics of non-volatile memory storage. The NVMe interface was designed to capitalize on the low latency and massive internal parallelism of solid-state storage devices by having a deep queue system.

By its design, NVMe allows host hardware and software to fully exploit the levels of read and write parallelism possible in modern SSDs. As a result, NVMe reduces I/O overhead and implements performance improvements like multiple long command queues, and reduced latency. 

How fast is NVMe? Well, some drives advertise throughput rates up to 3500MB/s (Samsung 970 Evo Pro) – which is almost 6 times the speed of SATA 3 SSD’s. This makes them around 35 times faster than platter-based hard drives.

PCIe

PCIe drives are the kings of performance right now because they’re using the main interface bus of the system as opposed to through a storage protocol like IDE/SATA/NVMe. These devices are usually expensive because they carry additional development costs and use much faster memory. They must also write their own software/hardware layers to convert PCIe protocol read/writes to solid state memory access.

While PCIe devices have theoretical maximums that are far in excess of other drive interfaces, most typically interface via PCIe 1.x or PCIe 2.x specifications – meaning they have maximum 250-500MB/s rates. But devices like Optane memory can get up into the 1000’s of MB/s range. Early Intel Optane memory drives used PCIe because that interface was the only one that could get the to the 2800MB/s range before NVMe.

Putting it all together

So, now we can put these things all together to help us understand how the different combinations work; and why people often confuse performance when they are not clear about both interface and form factor

Form factorInterfaceSpeed
3.5″/2.5″/1.8″ platter-based hard driveIDE 5MB/s to 133MB/s (ATA100/133)
3.5″/2.5″/1.8″ platter-based hard drive SATA3100MB/s typical
3.5″/2.5″/1.8″ SSD hard drive SATA1/2/3 150/300/600 MB/s max
M.2 SSDSATA1/2/3 150/300/600 MB/s max
M.2 SSDNVMe Up to 3500+ MB/s
PCIePCIe 1.x, 2.x, 3.x, etc250MB/s, 500MB/s, 1GB/s, etc

Now it’s more clear why one needs to pay attention to the form factor AND interface. The form factor can give us hints as to what interface is used, but is not a sure-fired way to know the performance characteristics.

You could have a 3.5″ drive that is IDE, or a platter-based SATA III, or even a SATA III based SSD. While each one is almost identical in physical size – each has almost an order of magnitude performance difference between the previous. A PCIe device might use PCIe 1.x and get 100MB/s or be as fast as an NVMe based M.2 drive if it’s PCIe 3.x. A mSATA/mini PCIe device might give you 150/300/600MB/s if it’s SATA1/2/3, or 250MB/s, 500MB/s, or 1GB/s if it’s using the PCIe interface.

One of the more common current difficult ones is reading advertisements that tout M.2 drives. Many do not clearly advertise the internal interface. If they do not say it is NVMe, then you should assume it is SATA III. As we have seen, a M.2 drive that has an internal NVMe interface might make it up to 6x faster than the same one with a SATA III interface internally.

Next up:

Now that we understand form factors and interfaces, one can move on to understanding the memory storage technologies behind SSD drives. There are many different kinds of memory that affect performance just as greatly as interface. Most SSD’s are designed with MLC, TLC, or QLC memory configurations. Even newer is XPoint memory used in Intel’s Optane drives.

Each of these memory technologies has performance characteristics on top of the limitations of their interfaces. Some of technologies lead their drives to become slow once the drive is mostly full, some start slowing when the drive is even half full. Some have longer MTBF reliability while others statistically fail much earlier. In some cases, different controller hardware can do much better or worse jobs with these inherent limitations.

But that might be a talk for another article…

Resources:

Interfaces:

Form factors:

Upgrading ssd’s/nvme drives

Upgrading ssd’s/nvme drives

Consumer SSDs (solid state drives) have been transformative for the PC world. Their massively smaller size, temperatures, and power requirements have made ultra-thin laptops possible, nearly double battery life, massively increase drop resistance, and their speed has increased performance of disk operations/booting by 10x or more.

The only down side is that they’re fairly limited in capacity. While platter-based drives are selling consumer-priced 8-10 terabyte drives, your average consumer-level SSD is a paltry 512GB for the same price. As prices drop and one upgrades their SSD, one is faced with a terrible upgrade procedure. Upgrading your SSD often means backing up your data, making a windows re-install usb, re-installing your OS, and restoring all your data and re-installing your apps. Annoying to say the least.

It would be great if one could just copy the current image to a new drive, expand the partitions, and just swap drives – but that doesn’t seem possible…or does it.

Equipment you’ll need:

First you need to know what kind of SSD your system has. Is it SATA, PCIe, M.2, U.2, mSATA, or SATA Express, or a soldered-on drive? There is a lot of confusion here, because there is the interface type (SATA, NVMe, PCIe) but there is also the plug type (SATA, M.2, etc). Often you will find guides that interchange or equate them in confusing ways.

Once you have determined your drive type, you need to buy an appropriate drive-to-USB adapter.

Hardware you’ll need

Get one of the following that matches your system configuration:

Software you’ll need:

The Procedure:

  1. Make a backup. No, seriously. You should make a full backup of your system and all those important photos and documents. Go buy an external hard drive and download a free backup program, or buy a cloud storage solution right now, and back up your system. What you’re about to undertake could result in a dead drive if something goes really wrong (static discharge, select wrong source/dest drive, etc). Besides, you have already been doing backups of all your stuff already – right. RIGHT?
  2. Plug in your new SSD/M.2 drive into your USB adapter and plug it into the USB port. To be safe, unplug ALL unnecissary drives – including USB, external backup drives, etc. The less confusion the better.
  3. The procedure I’m going to use is more fully outlined here. And more discussion here.
    1. Start up EaseUS Backup Home (free version).
    2. Click on the ‘Clone’ operation in the lower left sidebar.
    3. Select your SOURCE drive. Proceed to the next step.
    4. Select your DESTINATION drive. Make SURE this drive is your brand new, empty drive.
    5. When you click next here, you’ll see the partition layout of the source and destination drives. You’ll notice there is a tiny partition at the start of the drive – this is the boot partition and doesn’t need to be touched. The next, largest bar will be the system drive. Many laptops will have a 3rd, very tiny partition as a backup partition.
  1. While not immediately clear, you can actually click, move, and resize these partitions! If you can expand the second/larger partition to the end of the space, do so. If you cannot, you need to carefully MOVE (not resize) the 3rd/recovery partition to the end of the drive. Then you can resize the larger middle partition until there is no more free space between the tiny first and tiny 3rd partitions.
  2. Click proceed to image the source drive to the new destination drive. This could easily take 30-90 minutes or longer.
  3. Once you are done, shut down the program and power down the system.
  4. Take your new cloned disk out of the USB adapter.
  5. Physically swap the old drive in your laptop/PC with the newer drive. Unplug the system/disconnect internal batteries to avoid accidental poweron while doing this.
  6. Plug back in and boot. If you did everything correctly, you should be able to power up with the new drive and boot right back up like nothing changed. When you check the free drive space, you should notice all that new capacity!

Wiping and selling

If you wish to sell your old drive, then I recommend using the program DiscGenius to wipe it before selling it. Simply deleting the partitions doesn’t actually wipe the data – and it can all be read by crafty people. Don’t do this wipe of the old drive until you’ve used your new SSD for at least a week to make sure it won’t prematurely fail.

  1. Take the old, smaller drive you wish to wipe+sell and plug it into the USB adapter you used above. Plug this into your PC.
  2. Start up DiscGenius
  3. Delete all the partitions on the old drive. Make SURE you are picking the correct, old drive and not your current boot or a spare drive that’s plugged in.
  4. Right click on the now empty drive, and select ‘Erase Sectors’. Fill the sectors with random data and then click proceed. This will overwrite EVERYTHING on that drive with junk data. It will take around an hour or two. Once you’ve done this, nothing can be recovered from the drive. Safely unmount the drive, shut the program down, and unplug the drive.
  5. You can now sell or use the drive for some other purpose.
Removing the 60fps limit in Dead by Daylight

Removing the 60fps limit in Dead by Daylight

It seems that as games target more platforms on release, they are increasingly dumbing down the controls and limiting features to the lowest common denominator platform. For PC’s, this means suffering with frame rates that are often capped at 60fps. Dead by Daylight doesn’t even allowing you to change the FPS limit in the PC game. Those that have tried increasing the limit have run into various animation/physics bugs – indicating that this limit is due to lack of validation, poor programming, and game engine issues.

How-to:

To change the VSync or FPS limit, exit Dead by Daylight then edit the GameUserSettings.ini file located in your user directory:

C:\Users\'yourUsername'\AppData\Local\DeadByDaylight\Saved\Config\WindowsNoEditor\GameUserSettings.ini 

In the GameUserSettings.ini file, change the following line to whatever you want your max frame rate to be. I have a 144hz display, so I set mine to this:

FrameRateLimit=144

This next step is not required if you just want to set the FPS limit, but you can also to turn vsync on/off by changing this line to true/false respectively:

bUseVsync=False

Save file. Play game.

Source: https://steamcommunity.com/app/381210/discussions/0/1741106440032943073/

Setting up a Raspberry Pi-hole

Setting up a Raspberry Pi-hole

Ad blockers such as uBlock Origin and Adblocker make the web usable – but are not available on every platform and not of the same quality.

Pi-hole is an Linux-based server setup that absorbs ads by filtering DNS requests. You set up the Pi-hole server on a simple Raspberry Pi, set your devices to use the pi-hole server to resolve DNS entries, and voila – any requests to ad sites are immediately and transparently absorbed.

This is far superior to ad block applications for a few reasons. First, because the websites doesn’t even know you’re using it, you will never get those annoying ‘disable adblock to continue’ messages. With a little extra work, you can make your wired/wireless router also run DNS requests through it so that all devices wifi connected phones/laptops/game systems/etc get free ad filtering.

I just set one up this weekend on a raspberry pi and it’s been interesting to play with so far. Pi-hole has been a bit too fiddly in the past, but seems to be working pretty well these days with a slick web interface and easy installation. So far, it has worked really well – but I do occasionally get a false positive and have to turn the filtering off. I’ll give it a few days and see if it grows on me.

Here’s the instructions I used: https://blog.cryptoaustralia.org.au/instructions-for-setting-up-pi-hole/

Changing the DNS for your Win10 system while still using DHCP:
https://www.windowscentral.com/how-change-your-pcs-dns-settings-windows-10

Setting up SSH after install on your raspberry pi so you can access your pi hole via windows/putty/etc.
https://www.raspberrypi.org/documentation/remote-access/ssh/

Here’s the parts list from Amazon:

Raspberry Pi 3 b+ Case, iUniker Raspberry Pi 3 Model B+ Transparent Case with Raspberry Pi Heatsink for Raspberry Pi 3B+, 3B, 2B – Access to All Ports (Clear) $5.68
Samsung 32GB 95MB/s (U1) MicroSDHC EVO Select Memory Card with Adapter (MB-ME32GA/AM) $7.49
Element14 Raspberry Pi 3 B+ Motherboard $36.97
iTrunk Raspberry Pi 3 Model B+ (B Plus) Power Supply, 5V 2.5A Extra Long 2M Micro USB Power Supply Charger Adapter for 2018 New Version Raspberry Pi $8.15
Windows 10 99% memory usage even when nothing is running

Windows 10 99% memory usage even when nothing is running

Running out of memory while running Windows isn’t exactly a new phenomenon. But since Windows 8, things have mostly gotten better from memory usage/performance.

I recently ran into an issue where I’d close down all of my apps, but leave my system on overnight. When I’d jiggle the mouse in the morning, I would be greeted with horrendously sluggish drive swapping and 100% memory utilization. On a system with 32 gigs of memory. Even worse, I opened up my task manager and shut down everything possible – but nothing was indicated where 25+ gigs of memory went. Bad job Microsoft, shouldn’t your performance tools be able to tell me what is using up 90% of my system memory?

I got a clue from the fact my non-pageable memory usage was huge. This, apparently, indicates a driver or service with a memory leak:
https://windows101tricks.com/fix-memory-leak-problem-on-windows-10/

The problem was the Killer Network Suite. Apparently, this is a pretty common problem with the Killer network driver. I uninstalled it, and the problems seemed to go away.
https://www.reddit.com/r/buildapc/comments/3yzjyz/killer_network_suite_gave_me_a_major_memory_leak/

I then downloaded and installed the DRIVER ONLY package for the network interface by going directly to the Killer network website.

Turns out that the Killer network suite unfortunately lives up to it’s name: it certainly killed all the memory on my system. 🙁

MacOS 10.14 Mojave in VMWare

MacOS 10.14 Mojave in VMWare

Developing a iOS app used to require buying a Macbook or Mac mini. With VMWare, it is no longer necessary. I used VMWare Workstation 15.0 Pro and was able to develop an app and debug it on real iPad/iPhone hardware. Setup instructions are here:
https://techsviewer.com/install-macos-mojave-vmware-windows/

Here’s the latest VMWare Mojave 10.14.4, 18E226 (March 25, 2019) image:

Further tips after the above setup

Sprite Dicing

Sprite Dicing

Handy technique for saving texture space! There are various tools to do this, but the basic scheme is to split up a large texture into much smaller chunks, individually trimming these chunks, and seamlessly reconstructing the sprite in the viewport.

Source image
Compresses down to this!
Backdoor Roth IRA

Backdoor Roth IRA

Getting your backdoor Roth IRA right is very tricky. If done incorrectly, you can find yourself owing a ton of money and more than negating the value of contributions.

Here’s the best/most correct covering of the topic:

Here is a higher-level discussion:
https://www.dadsdollarsdebts.com/2016/11/22/roth-401k/

Also look here for much more in-depth information:

https://www.kitces.com/blog/how-to-do-a-backdoor-roth-ira-contribution-while-avoiding-the-ira-aggregation-rule-and-the-step-transaction-doctrine/

Attaching 5.25″ floppies via USB

Attaching 5.25″ floppies via USB

Floppy disks are a relic of the past these days. You might still see the odd 3.5″ floppy – and there are even still companies making 3.5″ USB drives you can plug into your system today. But 5.25″ floppy drives (360k and 1.2 meg variety) are much more scarce. So scarce, in fact, that you’re likely not to find any outside of old vintage computers. Most modern PC’s since the Pentiums don’t even have connectors or interfaces that support them and I know of no vendors that make USB 5.25″ drives.

So what is one to do if they have old 5.25″ floppies they need to read? Turns out others have had the same problem – so you’re not alone. You have the following options:

  1. Find a service that will convert them – Usually for a fee around $5-$10 per disk.
  2. Buy an old vintage pre-Intel Core based computer from eBay that has a working 5.25″ drive.
  3. Use a 5.25″ to USB converter.
    1. Kryoflux – https://www.kryoflux.com/ -the Holy Grail of floppy readers. Is able to read all formats. Save as raw stream, or export to common sector formats supporting: Acorn Electron, Apple, Amstrad CPC, Archimedes, Atari 8-bit, Atari ST, BBC, Commodore 64, Commodore Amiga, MSX, IBM PC, PC-8801, Sam Coupe, Spectrum, E-MU Emulator & Emulator II, DEC RX01 & RX02 and many, many others https://www.kryoflux.com/
    2. Device Side Data’s FC5025 –http://www.deviceside.com/fc5025.html – USB 5.25″ floppy controller plugs into any computer’s USB port and enables you to attach a 5.25″ floppy drive. Even if your computer has no built-in floppy controller, the FC5025 lets you read those old disks. And it’s not just for IBM PC disks – it also understands formats used by Apple, Atari, Commodore and TI, among others.
    3. Supercard Pro. – Here’s a review and this page which contains a lot of useful information.