Here we go. The Disk Mount Conditioner “is a kernel provided service that can degrade the disk I/O being issued to specific mount points, providing the illusion that the I/O is executing on a slower device.” You won’t often find that the system decides to slow throughput to a device very often. But it happens, and equally as useful you can spoof a different type of device, quite helpful when troubleshooting.
It’s like that. You can run the dmc command to control and view the status of the dmc service, at /usr/bin/dmc. To see how to use dmc, simply run dmc with the help verb:
/usr/bin/dmc help
Sucker M.C.s can see a list of mounts that can be controlled using the list verb:
0: Faulty 5400 HDD
1: 5400 HDD
2: 7200 HDD
3: Slow SSD
4: SATA II SSD
5: SATA III SSD
6: PCIe 2 SSD
7: PCIe 3 SSD
Is it live? Many of the above aren’t available, but if you look at your hard drive, you can check the status of it (or multiples if you have multiple supported controllers in your computer). To check the status simply use the list verb following the integer of your mount:
/usr/bin/dmc list
Pause. Once you have the list, you can check the status of each until you find the one you need. To check the status simply use the status verb following the integer of your mount:
/usr/bin/dmc status 1
If you run a status check against a mount that is not available (Peter Piper), you’ll get something similar to the following:
DISK_CONDITIONER_IOC_GET error: No such file or directory
If you run the status check on a supported mount (in my case rock box), you’ll get output similar to the following:
Disk Mount Conditioner: OFF
Profile: Custom
Type: HDD
Access time: 0 us
Read throughput: 0 MB/s (unlimited)
Write throughput: 0 MB/s (unlimited)
I/O Queue Depth: 0
Max Read Bytes: 0
Max Write Bytes: 0
Max Read Segments: 0
Max Write Segments: 0
It’s tricky. Note that the Profile is listed as Custom. There’s a funky thing with this command, where if you want to see how the profile that is applied to a given device is configured – you use the characters assigned to the list number:
/usr/bin/dmc show 1
Sorry, I talk too much. The output would be similar to the following:
Profile: 5400 HDD
Type: HDD
Access time: 26111 us
Read throughput: 100 MB/s
Write throughput: 100 MB/s
I/O Queue Depth: 32
Max Read Bytes: 33554432
Max Write Bytes: 33554432
Max Read Segments: 256
Max Write Segments: 256
Walk this way – if you start the Disk Mount Conditioner for that device, you’d apply the profile of another in order to do so. So, let’s say you want to slow the device down with a given set of settings:
sudo dmc start 1
What’s it all about? Let’s say I wanted to spoof a PCIe 3 SSD. First I’d need to stop the conditioning service:
sudo dmc stop 1
Ooh, whatcha gonna do? Let’s run the start again with the mount followed by the profile index to invoke:
sudo dmc start 1 "PCIe 3 SSD"
Yah… And of course, to stop again, simply run the stop for the device again:
sudo dmc stop 1
But do be careful to revert back when you run dmc… Hard Times, right?