Search

A technology, a device or an article

One SSD command: calculating the NVMe MDTS limit

MDTS encodes a power of two scaled by CAP.MPSMIN. Transfer-size calculations, the special zero value, and other SSD command limits.

A long strip of blocks passes through a gauge beside a conceptual SSD.
ITNWS AI-generated conceptual illustration. A metaphor for one transfer limit, not namespace capacity or NAND layout.ITNWS · image_gen · Original ITNWS AI-generated conceptual editorial illustration

The number 5 in the MDTS field does not mean five bytes, nor does it mean five megabytes. It is a power-of-two exponent; the resulting value must still be multiplied by a defined scale. For NVMe, such a compact notation is convenient: the controller reports the transfer limit without taking up a large field for the complete byte count. For someone reading Identify Controller, it creates a problem of units. Before comparing the metric to the application request size, you need to restore the unit. Otherwise, a correctly read protocol byte turns into a completely incorrect SSD operating limit.

Consider the common case of NVMe over PCIe with a CAP register and a non-zero MDTS. In NVM Express Base Specification 2.0e dated July 29, 2024, MDTS is specified in units of the minimum controller memory page size, CAP.MPSMIN. MPSMIN itself is also encoded as an exponent: the minimum page contains 2 to the power (12 + MPSMIN) bytes. This is not the selected namespace logical block size. The fields refer to different sides of the exchange and have different units.

We denote MDTS by the letter d, and MPSMIN by the letter m. When d is greater than zero, we calculate the limit T = 2^d × 2^(12 + m) bytes. You can combine powers: T = 2^(d + 12 + m) bytes. This form allows you to check the dimension before substitution. The first power gives the number of minimum pages, the second – bytes per page. Their product gives the bytes of one transmission. If you put the drive capacity or sector size instead of the second multiplier, you will get another number without any basis in the field definition.

First, let’s restore the unit

Let m be 0. Then the minimum page is 4096 bytes, that is, 4 KiB. With d equal to 5, we get 32 such pages: 32 × 4096 = 131072 bytes, or 128 KiB. This is a hypothetical calculation, not reading the parameters of a specific SSD. It states what a given pair of fields means, but does not say anything about the speed of execution of the command. Size limit and processing time are different physical quantities. You cannot infer the second quantity from the first without additional conditions.

MPSMIN in the example MDTS in the example Minimal page Transfer limit
0 5 4096 bytes 131072 bytes
0 6 4096 bytes 262144 bytes
1 5 8192 bytes 262144 bytes

The table shows two independent reasons for the same result. Increasing d by one doubles the number of minimum pages allowed. Increasing m by one doubles the size of each such page. Using the resulting 262144 bytes, it is impossible to unambiguously restore the original pair. Therefore, it is useful to save both the raw fields and the calculated value in the diagnostic snapshot. Then the reviewer will be able to reproduce the conversion and notice exactly what scale the parser used. One beautiful number in KiB hides this story.

It is especially easy to make the mistake of using the actual page configured in CC.MPS instead of the minimum one from CAP.MPSMIN. The controller can support a range of sizes, and the selected value does not have to be the same as the lower limit. The MDTS definition refers specifically to the minimum. If you replace the base with a larger selected size, the program will overestimate the allowed transmission. Similar field names are not a sufficient clue here. The formula needs the parameter that the specification directly points to, and not the nearest available number about pages in general.

The nvme_id_ctrl structure in libnvme stores mdts as a separate eight-bit Identify Controller field. This helps distinguish reading a raw value from a ready-made driver limit. When the utility displays mdts: 5, it can be showing the exponent itself. When the system interface shows the request limit in kilobytes, the conversion has already occurred. Repeatedly raising such a result to a power is just as wrong as not converting the raw MDTS. The name and output unit must be read together.

Zero stops the formula

It is mathematically possible to substitute d = 0 into the written power: you get one minimal page. But the protocol assigns a special meaning to MDTS zero: the maximum transfer size is not set by this field. Therefore, the d = 0 case must be handled before applying the general formula. This is a typical case when the encoding of a number contains a control value. Arithmetic continuity is convenient for humans, but does not negate the semantics of the interface. The exponent is valid only in the specified non-zero region.

"Not set by this field" does not equal an unlimited request. What remains are the command field sizes, the rules of the corresponding command set, transport and host restrictions. If the monitoring interface wrote "unlimited" with MDTS = 0, the label should preserve this scope. Otherwise, a person may mistake the absence of one specific limitation for the absence of all limitations in general. The limit of permissible work is obtained from the jointly acting conditions. Removing one condition leaves the others in place, even when the advertising word suggests forgetting about them.

Amber glass blocks are divided into short groups by transparent partitions.
ITNWS AI-generated conceptual illustration. A large operation may be split into smaller commands; group sizes are not device measurements. — ITNWS · image_gen · Original ITNWS AI-generated conceptual editorial illustration

Let’s go back to the non-zero example with T = 131072 bytes and choose the normal format with 4096 bytes of user data per logical block, without metadata. Then one transmission according to this limitation accommodates 32 blocks. The NLB field for regular Read and Write encodes the number of blocks starting from zero, so for 32 blocks it will be 31. If you confuse the number with the encoded field, an error of one will appear. And if you substitute a minimal page instead of a block simply because both in this example are equal to 4096, the error will remain hidden until a different format is used.

In NVM Command Set Specification 1.3 dated July 31, 2026, commands have their own field and constraint definitions. For a regular 16-bit zero-based NLB, the maximum representable number is 65536 blocks. This is a separate limit that also applies when MDTS = 0. In our small example, MDTS is triggered first. For another pair of parameters the relationship may change. Therefore, one and the same indicator cannot always be considered the only main limiter.

If the user block size is 512 bytes at the same T, the arithmetic will give 256 blocks. The number of bytes remained the same, the number of blocks changed eight times. It is this difference that shows why MDTS cannot be read as a fixed number of sectors without knowledge of the format. The command uses blocks, whereas MDTS specifies a byte limit. Conversion between them is legal if it is established in advance what data is being transferred and what additional bytes need to be taken into account.

For interleaved metadata, the specification includes its length in MDTS. Then the calculation based on user-data bytes alone may overestimate the permissible number of blocks. In an illustrative example with 4096 bytes of data and 16 bytes of metadata transferred together, one block takes up 4112 bytes in the transfer. 31 such blocks will fit into the limit of 131072, and 32 will already give 131584. This is not a characteristic of a real namespace. The example shows how a small addition crosses the boundary, although the nominal user data fits exactly without it.

Device commands and application requests have different scales

Now imagine an application reading 1 MiB. It is not required to create one SSD command of the same size. The driver and block layer can divide the work into multiple valid requests. For a simple case without other restrictions, eight transfers of 128 KiB will make up the required megabyte. But this is a description of possible splitting, not a promise of eight commands in any system: merging, alignment, memory segments, and intermediate layers can change the actual picture. The size of a system call does not map directly to an NVMe command field.

In Linux NVMe driver source you can see the conversion of maximum transfer into queue limits. This document is read as the current implementation branch, and not as confirmation of the code of any installed kernel. The driver may have its own ceiling and take into account other possibilities. Therefore, the host’s sysfs value is not necessarily equal to the arithmetic of one mdts. Its difference requires research into the chosen path, rather than automatically concluding that the SSD reported incorrect data or the utility has lost half its speed.

Linux Block Device Queues documentation distinguishes between max_hw_sectors_kb and max_sectors_kb in particular. Even the names of similar restrictions indicate different levels. For the observed request splitting, the limit that actually applies to the selected queue is important. When there are other devices or mappings between the application and the SSD, additional limitations arise. Practical diagnostics begin by saving this chain, and not by trying to derive all machine requests from a single Identify Controller field.

The transfer size is not equal to the queue depth. Several valid commands can be in operation at the same time, each with its own byte count. Increasing their number does not expand the MDTS of an individual command. Conversely, a large MDTS does not promise a large number of concurrent requests. These are different areas of work organization. You cannot multiply the transfer limit and an arbitrary queue depth and then call the result a guaranteed internal buffer or the amount of data already written. That product describes only the chosen model of outstanding work.

Not every instruction with a large logical range transfers the corresponding amount through host memory. The Base Specification specifically excludes commands without such transfer, such as Write Zeroes, from the scope of this definition. Therefore, trying to apply MDTS as a universal limit on the length of any action on a namespace is incorrect. Such commands still have their own fields and restrictions that must be read separately. Our calculation refers to the agreed data transfer and not to any reference to the number of blocks in the drive interface.

In the parser code, exponentiation also requires a fairly wide type and a range check before the shift. An eight-bit input field does not mean that any shift of the integer value one by its value is valid. A reliable program limits the computation to its representation and handles unsupported or inconsistent values explicitly. This is a matter of correct decoding, and not an attempt to imagine an existing SSD with a fantastic command capacity. The formula has a mathematical domain; the machine implementation additionally has a finite bit width.

Calculating the number of blocks generally uses the integer part of the ratio of valid bytes to the size of the transferred block. The remainder cannot be converted into a fractional Read command for part of a logical block. If the transfer has additional alignment requirements or special format-specific restrictions, these may reduce the result even further. Therefore, arithmetic division gives an upper bound in our simple model, and the validity of the finished command is still checked against all its fields. This maintains the distinction between the dimension of the calculation and the full rule of the protocol.

There is also a subtle reason not to confuse MDTS with atomicity. A permitted multi-block command is not required to provide an indivisible update to all of those blocks during a power failure. Atomicity has its own fields and conditions. Likewise, completion of a transfer does not in itself establish the required content durability under any caching policy. The size determines the permissible size of the command; the other promises do not automatically grow with it. A large limit can be useful for breaking up work without saying anything about what intermediate failure states are allowed.

Sources were checked on November 6, 2026. Specification dates are recorded separately; no SSD measurements or configuration changes were performed. The original field retains the number 5, but is now associated with a unit, the nonzero-value condition, and a scope. A useful request limit arises after this reconstruction and comparison of the remaining limits. The formula gives an exact answer to its question: how many bytes does MDTS allow for one intended transfer. Speed, atomicity and data integrity require their own definitions.

Sources & documentation

  1. NVM Express Base Specification 2.0e, 29 July 2024 ↗
  2. libnvme: nvme_id_ctrl, June 2026 ↗
  3. Linux NVMe host core implementation ↗
  4. NVM Express NVM Command Set Specification 1.3 ↗
  5. Linux block queue sysfs interfaces ↗