News for hackers. Stuff that matters.
Re:Ask HN: Has the Apple Silicon excessive disk read/write i... by tzs on Thursday September 29, 2022 @10:49PM (#33030298)
Wow...looks like I don't do much disk I/O compared to most people here. I'm on a 2017 iMac that I use for both personal stuff and work. It seems like most people here can do in a few months what it took me 5 years to do.

  Critical Warning:                   0x00
  Temperature:                        39 Celsius
  Available Spare:                    100%
  Available Spare Threshold:          10%
  Percentage Used:                    2%
  Data Units Read:                    163,453,178 [83.6 TB]
  Data Units Written:                 96,776,875 [49.5 TB]
  Host Read Commands:                 4,760,816,278
  Host Write Commands:                3,237,489,546
  Controller Busy Time:               7,045
  Power Cycles:                       16,947
  Power On Hours:                     2,307
  Unsafe Shutdowns:                   109
  Media and Data Integrity Errors:    0
  Error Information Log Entries:      0
I've got 64 GB of RAM so don't have much swap usage which probably helps.

I see everyone posting data for M1 Macs has an "Available Spare Threshold" of 99% whereas I've got 10%. What's the story there?

My understanding is that you want "Available Spare" to be as high as possible, and "Available Spare Threshold" is how low "Available Spare" can go before it is considering to be a failure, so the lower "Available Spare Threshold" the better.

Re:Ask HN: Has the Apple Silicon excessive disk read/write i... by pelagicAustral on Friday September 30, 2022 @05:22AM (#33032767)
I'm an 2017 iMac as well, use it every day for work and personal stuff... sometimes literally hammer the stuff and my numbers look nothing like some the other ones displayed here... bit of a shocker.

   === START OF SMART DATA SECTION ===
   SMART overall-health self-assessment test result: PASSED
   
   SMART/Health Information (NVMe Log 0x02)
   Critical Warning:                   0x00
   Temperature:                        36 Celsius
   Available Spare:                    100%
   Available Spare Threshold:          10%
   Percentage Used:                    1%
   Data Units Read:                    27,459,395 [14.0 TB]
   Data Units Written:                 34,559,091 [17.6 TB]
   Host Read Commands:                 864,546,880
   Host Write Commands:                1,257,234,100
   Controller Busy Time:               3,486
   Power Cycles:                       4,595
   Power On Hours:                     1,882
   Unsafe Shutdowns:                   74
   Media and Data Integrity Errors:    0
   Error Information Log Entries:      0
   Warning  Comp. Temperature Time:    0
   Critical Comp. Temperature Time:    72858
Re:Ask HN: Has the Apple Silicon excessive disk read/write i... by cool_hw on Friday September 30, 2022 @07:39AM (#33033567)
Thank you for the data point, and your usage on an M1 will probably yield crazier numbers. This is why I asked, Apple silicon machines look like they're using the disk far more than older macs.
Re:Ask HN: Has the Apple Silicon excessive disk read/write i... by jiripospisil on Friday September 30, 2022 @06:24AM (#33033101)
I'm surprised by the numbers here as well. I have a late 2016 MBP 512GB (used daily) and the numbers are nowhere similar. It's a bit worrying though that I'm the only one in this thread with error log entries.

  SMART/Health Information (NVMe Log 0x02)
  Critical Warning:                   0x00
  Temperature:                        30 Celsius
  Available Spare:                    100%
  Available Spare Threshold:          10%
  Percentage Used:                    3%
  Data Units Read:                    59,731,850 [30.5 TB]
  Data Units Written:                 78,972,837 [40.4 TB]
  Host Read Commands:                 1,676,492,248
  Host Write Commands:                2,466,236,096
  Controller Busy Time:               3,456
  Power Cycles:                       42,547
  Power On Hours:                     2,616
  Unsafe Shutdowns:                   131
  Media and Data Integrity Errors:    0
  Error Information Log Entries:      16
Re:Ask HN: Has the Apple Silicon excessive disk read/write i... by cool_hw on Friday September 30, 2022 @07:40AM (#33033584)
Is there a way to look up that error log?
Re:Ask HN: Has the Apple Silicon excessive disk read/write i... by jiripospisil on Saturday October 01, 2022 @05:12AM (#33045186)

  Error Information (NVMe Log 0x01, 16 of 64 entries)
  Num   ErrCount  SQId   CmdId  Status  PELoc          LBA  NSID    VS
    0         16     0  0x0000  0x4016  0x004            0     1     -
    1         15     0  0x0000  0x4016  0x004            0     1     -
    2         14     0  0x0000  0x4016  0x004            0     1     -
    3         13     0  0x0000  0x4016  0x004            0     1     -
    4         12     0  0x0000  0x4016  0x004            0     1     -
    5         11     0  0x0000  0x4016  0x004            0     1     -
    6         10     0  0x0000  0x4016  0x004            0     1     -
    7          9     0  0x0000  0x4016  0x004            0     1     -
    8          8     0  0x0000  0x4016  0x004            0     1     -
    9          7     0  0x0000  0x4016  0x004            0     1     -
   10          6     0  0x0000  0x4016  0x004            0     1     -
   11          5     0  0x0000  0x4016  0x004            0     1     -
   12          4     0  0x0000  0x4016  0x004            0     1     -
   13          3     0  0x0000  0x4016  0x004            0     1     -
   14          2     0  0x0000  0x4016  0x004            0     1     -
   15          1     0  0x0000  0x4016  0x004            0     1     -
  ... (48 entries not read)
To be honest I'm not sure how to interpret it. There are some tools on Linux to read this information but the output doesn't really seem more useful.
Re:Ask HN: Has the Apple Silicon excessive disk read/write i... by cool_hw on Saturday October 01, 2022 @07:14AM (#33045702)
I did a quick search earlier and it seems these are informational only and not necessarily persistent warnings. Some discussion suggested that some unsupported requests to the disk can result in these, but I don't know for sure.
Re:Ask HN: Has the Apple Silicon excessive disk read/write i... by petercooper on Friday September 30, 2022 @06:36AM (#33033182)
I had a 16GB M1 MBP for about 9 months and I was very happy with it, but once I started using Docker, I decided I needed more RAM. Bought a 64GB one and.. wow.. it's the same CPU but the machine feels so much snappier (and it's not a clean install). macOS really seems to like having all that RAM about even if it claims to not be leaning on it heavily.
Re:Ask HN: Has the Apple Silicon excessive disk read/write i... by cool_hw on Friday September 30, 2022 @07:40AM (#33033576)
Perhaps one day when Apple prices the RAM upgrades reasonably..
Re:Ask HN: Has the Apple Silicon excessive disk read/write i... by cool_hw on Friday September 30, 2022 @07:37AM (#33033560)
I noticed that on my linux machine the available spare threshold number is 10% too.

Thank you for posting, this (and the sibling posts and some google searching) confirms to me that older macs were not using disks this much for the same tasks.

I still may be wrong about this, but I am yet to see a counterpoint from Apple Silicon machines.