{"id":2112,"date":"2021-07-01T13:40:43","date_gmt":"2021-07-01T12:40:43","guid":{"rendered":"https:\/\/cdblog.cdstealer.com\/?p=2112"},"modified":"2021-07-01T13:50:01","modified_gmt":"2021-07-01T12:50:01","slug":"nvme-stats","status":"publish","type":"post","link":"https:\/\/cdblog.cdstealer.com\/?p=2112","title":{"rendered":"NVME Stats"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Checking NVMe Flash Health<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you move to newer generation NVMe-based flash storage,&nbsp;smartctl&nbsp;won\u2019t work anymore.  It looks like support for NVMe in&nbsp;<strong>Smartmontools<\/strong>&nbsp;<a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/www.smartmontools.org\/wiki\/NVMe_Support\">is coming<\/a>, and it would be great to get a single tool that supports both &nbsp;SATA and NVMe flash storage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the meantime, you can use the&nbsp;nvme&nbsp;tool available from the nvme-cli package. It provides some basic information for NVMe devices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To get information about the NVMe devices installed:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><pre>#nvme list<br>Node             SN                   Model                                    Namespace Usage                      Format           FW Rev  \n---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------\n\/dev\/nvme0n1     S4EWNG0M116212J      Samsung SSD 970 EVO Plus 1TB             1         713.05  GB \/   1.00  TB    512   B +  0 B   1B2QEXM7\n<\/pre><br><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To get SMART information:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><pre>#nvme smart-log \/dev\/nvme0<br>Smart Log for NVME device:nvme0 namespace-id:ffffffff<br>critical_warning : 0<br>temperature : 37 C<br>available_spare : 100%<br>available_spare_threshold : 10%<br>percentage_used : 0%<br>data_units_read : 13,820,831<br>data_units_written : 20,647,263<br>host_read_commands : 197,831,770<br>host_write_commands : 499,344,371<br>controller_busy_time : 1,663<br>power_cycles : 36<br>power_on_hours : 8,091<br>unsafe_shutdowns : 18<br>media_errors : 0<br>num_err_log_entries : 0<br>Warning Temperature Time : 0<br>Critical Composite Temperature Time : 0<br>Temperature Sensor 1 : 37 C<br>Temperature Sensor 2 : 34 C<br>Thermal Management T1 Trans Count : 0<br>Thermal Management T2 Trans Count : 0<br>Thermal Management T1 Total Time : 0<br>Thermal Management T2 Total Time : 0<\/pre><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Available Spare<\/strong>. Contains a normalized percentage (0 to 100%) of the remaining spare capacity that is available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Available Spare Threshold<\/strong>. When the Available Spare capacity falls below the threshold indicated in this field, an asynchronous event completion can occur. The value is indicated as a normalized percentage (0 to 100%).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Percentage Used<\/strong>. Contains a vendor specific estimate of the percentage of the NVM subsystem life used, based on actual usage and the manufacturer\u2019s prediction of NVM life.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(Note: the number can be more than 100% if you\u2019re using storage for longer than its planned life.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Data Units Read\/Data Units Written<\/strong>. This is the number of 512-byte data units that are read\/written, but it is measured in an unusual way. The first value corresponds to 1000 of the 512-byte units. So you can multiply this value by 512000 to get value in bytes. It does not include meta-data accesses.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Host Read\/Write Commands<\/strong>. The number of commands of the appropriate type issued. Using this value, as well as one below, you can compute the average IO size for \u201cphysical\u201d reads and writes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Controller Busy Time<\/strong>. Time in minutes that the controller was busy servicing commands. This can be used to gauge long-term storage load trends.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Unsafe Shutdowns<\/strong>. The number of times a power loss happened without a shutdown notification being sent. Depending on the NVMe device you\u2019re using, an unsafe shutdown might corrupt user data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Warning Temperature Time\/Critical Temperature Time<\/strong>. The time in minutes a device operated above a warning or critical temperature. It should be zeroes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Wear_Leveling<\/strong>. This shows how much of the rated cell life was used, as well as the min\/max\/avg write count for different cells. In this case, it looks like the cells are rated for 1800 writes and about 1100 on average were used<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Timed Workload Media Wear<\/strong>. The media wear by the current \u201cworkload.\u201d This device allows you to measure some statistics from the time you reset them (called the \u201cworkload\u201d) in addition to showing the device lifetime values.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Timed Workload Host Reads<\/strong>. The&nbsp;percentage of IO operations that were reads (since the workload timer was reset).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Thermal Throttle Status<\/strong>. This shows if the device is throttled due to overheating, and when there were throttling events in the past.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Nand Bytes Written<\/strong>.&nbsp;The bytes written to NAND cells. For this device, the&nbsp;<a target=\"_blank\" href=\"http:\/\/homerl.github.io\/2016\/07\/04\/Monitor-ssd-device\/\" rel=\"noreferrer noopener\">measured unit seems to be in 32MB values<\/a>. It might be different for other devices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Host Bytes Written<\/strong>. The bytes written to the NVMe storage from the system. This unit also is in 32MB values.&nbsp;The scale of these values is not very important, as they are the most helpful for finding the write amplification of your workload. This ratio is measured in writes to NAND and writes to HOST. For this example, the Write Amplification Factor (WAF) is 16185227 \/ 6405605 =&nbsp;<strong>2.53<\/strong>&nbsp;&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Checking NVMe Flash Health If you move to newer generation NVMe-based flash storage,&nbsp;smartctl&nbsp;won\u2019t work anymore. It looks like support for NVMe in&nbsp;Smartmontools&nbsp;is coming, and it would be great to get a single tool that supports both &nbsp;SATA and NVMe flash storage. In the meantime, you can use the&nbsp;nvme&nbsp;tool available from the nvme-cli package. It provides &hellip; <a href=\"https:\/\/cdblog.cdstealer.com\/?p=2112\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">NVME Stats<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[18,317],"class_list":["post-2112","post","type-post","status-publish","format-standard","hentry","category-gentoo","tag-linux","tag-nvme"],"_links":{"self":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/2112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2112"}],"version-history":[{"count":3,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/2112\/revisions"}],"predecessor-version":[{"id":2118,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/2112\/revisions\/2118"}],"wp:attachment":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}