libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvme(9) β€” struct nvme_id_psd πŸŽ€

okay bestie, buckle up, because this is a page from the API Manual for libnvme, and today's main character is the Power Management data structure. yes, that one. it's giving "the receipt for how much juice your SSD slurps in each power state" and honestly? kind of iconic. ✨


🌸 NAME 🌸

struct nvme_id_psd β€” Power Management data structure 🫢


✨ SYNOPSIS ✨

struct nvme_id_psd {
    __le16 mp;
    __u8 rsvd2;
    __u8 flags;
    __le32 enlat;
    __le32 exlat;
    __u8 rrt;
    __u8 rrl;
    __u8 rwt;
    __u8 rwl;
    __le16 idlp;
    __u8 ips;
    __u8 rsvd19;
    __le16 actp;
    __u8 apws;
    __u8 epfrt;
    __u8 fqvt;
    __u8 epfvt;
    __u8 epfr_fqv_ts;
    __u8 epfvts;
    __u8 mbw;
    __u8 mbws;
    __le16 miiell;
};

twenty-two fields, one struct, zero chill. let's go through them one by one because literally every single one matters πŸ’œ


🌈 Members 🌈

πŸ’– the power-y ones

  • mp β€” Maximum Power, aka the sustained max power this NVM subsystem eats in this power state. the Watts are the value in this field times whatever scale the Max Power Scale bit says (peep enum nvme_psd_flags). and a value of 0 means Maximum Power is not reported β€” it's a shrug, not a zero. πŸ™ˆ
  • rsvd2 β€” Reserved. nothing to see here, moving on ✨
  • flags β€” extra decoding flags, go look at enum nvme_psd_flags iykyk
  • enlat β€” Entry Latency: the max latency, in microseconds, to get into this power state. 0 means it's not reported πŸ¦‹
  • exlat β€” Exit Latency: the max latency, in microseconds, to get out of this power state. 0 means not reported either πŸ™ˆ

πŸŽ€ the relative-rank girlies

  • rrt β€” Relative Read Throughput: the read throughput rank of this power state compared to the others. the value here is less than the number of supported power states β€” always, no cap.
  • rrl β€” Relative Read Latency: the read latency rank of this power state relative to the rest. again, value is less than the number of supported power states.
  • rwt β€” Relative Write Throughput: the write throughput rank versus the other power states. value is less than the number of supported power states.
  • rwl β€” Relative Write Latency: the write latency rank versus the other power states. value is less than the number of supported power states.

they're all just little ranking besties, four of them, ranked, relative, less than the number of supported power states. periodt. πŸ’…

πŸ¦‹ the idle / active power section

  • idlp β€” Idle Power: the typical power the NVM subsystem consumes over 30 seconds in this power state while idle. cozy.
  • ips β€” Idle Power Scale: the scale for struct nvme_id_psd.idlp. check enum nvme_psd_ps to decode this field πŸ”₯
  • rsvd19 β€” Reserved again. we love a filler byte 🌸
  • actp β€” Active Power: the largest average power the NVM subsystem consumes over a 10 second period in this power state, with the workload set by the Active Power Workload field. busy girl energy.
  • apws β€” this one's a two-for-one, bestie:
    • Bits 7-6: Active Power Scale (APS) β€” the scale for struct nvme_id_psd.actp, decode it with enum nvme_psd_ps
    • Bits 2-0: Active Power Workload (APW) β€” which workload was used to calculate max power for this power state, decode with enum nvme_psd_workload ⭐

🧚 emergency power fail vault time squad

  • epfrt β€” Emergency power fail recovery time
  • fqvt β€” Forced quiescence vault time
  • epfvt β€” Emergency power fail vault time
  • epfr_fqv_ts β€” scales for the above, packed together:
    • Bits 7-4: Forced quiescence vault time scale
    • Bits 3-0: Emergency power fail recovery time scale
  • epfvts β€” Bits 3-0: Emergency power fail vault time scale

okay so these are the "when the lights go out, save the data to the vault" fields and they're lowkey the most dramatic part of the struct 😭

πŸ‘‘ bandwidth & latency limits

  • mbw β€” Max Bandwidth: the max bandwidth attainable in this power state when you submit MDTS-length sequential read commands at a queue depth of the Optimal Aggregated Queue Depth field. the bandwidth is the value in this field multiplied by the scale in the Max Bandwidth Scale field. a value of 0 means no maximum bandwidth is reported. slay.
  • mbws β€” Bits 2-0: Max Bandwidth Scale (MBWS), the scale for struct nvme_id_psd.mbw. decode it with enum nvme_psd_mbws πŸ’«
  • miiell β€” Minimum Idle I/O Exit Latency Limit. here's the tea: if the Idle I/O Exit Latency Limit capability is supported (that's enum nvme_id_ctrl_ctratt.NVME_CTRL_CTRATT_IIELLSS) for this operational power state, then a non-zero value means the minimum supported Idle I/O Exit Latency Limit in units of 100 microseconds, and a value of 0h means there's no minimum. it gets cleared to 0h for a non-operational power state, or if the capability isn't supported at all. 🫢

🌟 friendly reminder bestie: those 0 and 0h values aren't always "zero" β€” a lot of them literally mean "not reported" or "not supported". read the field, not just the number πŸ’–

and that's the whole struct, every field, not a single one skipped, we ate and left no crumbs πŸ’…βœ¨

this page came from the API Manual, struct nvme_id_psd, dated October 2026 β€” see you in the next power state, bestie πŸ¦‹πŸŽ€πŸ’œ

πŸ“¦ where this page comes from