[mythtv-users] best use of limited RAM

Mike Hodson mystica at gmail.com
Wed Nov 22 21:13:21 UTC 2017


Hello again Marius,

Looking at the SMART data, it is indeed a Sandforce drive;  these have the
added benefit of lessened write-cycles due to onboard LZO(or similar; its
proprietary but seems like LZO to me) compression internal to the chipset
firmware.

Thats where these 5 values come into play:

231 SSD_Life_Left           0x0013   100   100   010    Pre-fail  Always
   -       0
233 SandForce_Internal      0x0032   000   000   000    Old_age   Always
   -       1445
234 SandForce_Internal      0x0032   000   000   000    Old_age   Always
   -       729
241 Lifetime_Writes_GiB     0x0032   000   000   000    Old_age   Always
   -       729
242 Lifetime_Reads_GiB      0x0032   000   000   000    Old_age   Always
   -       189

233 is "actual bytes over the SATA Bus written"; 234 is "bytes after
compression" and it should almost always match 241 "Lifetime Writes" which
is directly to the NAND. Reads is even lower.

231 is the Sandforce numbered metric similar to the aforementioned 233
Media_Wearout_Indicator metric.  Different numbers, same basic principle.
You're still at 100/100 which is still "pretty close to new" in the grand
scheme of things.

My own 60GB Sandforce drive has way more writes/reads than yours, nearly
triple for 1/2 the amount of NAND Onboard.

195 ECC_Uncorr_Error_Count  0x001c   120   120   000    Old_age   Offline
    -       0/0
196 Reallocated_Event_Count 0x0033   100   100   000    Pre-fail  Always
   -       0
231 SSD_Life_Left           0x0013   100   100   010    Pre-fail  Always
   -       0
233 SandForce_Internal      0x0000   000   000   000    Old_age   Offline
    -       3520
234 SandForce_Internal      0x0032   000   000   000    Old_age   Always
   -       3904
241 Lifetime_Writes_GiB     0x0032   000   000   000    Old_age   Always
   -       3904
242 Lifetime_Reads_GiB      0x0032   000   000   000    Old_age   Always
   -       10944

As this shows, my write-load hasn't been so easily LZO compressed, and
internal wear-leveling has made the 'write amplification' about 1.1 the
input bytes.  3.9TiB written to the flash, over its lifecycle with only 3.5
TiB of input data.   Yours shows the approximate 1/2 write reduction
possible when the majority of files on the drive are textual or easily
compressed.  I've written a lot of already-compressed data to the disk over
its lifetime, doing many Gentoo package updates and compiles, which implies
a ton of bz2/xz files written over the years.

Both of our 'worst case scenario' disks should still last long into next
decade as long as the electronics don't die first :)

Mike


On Wed, Nov 22, 2017 at 1:57 PM, Marius Schrecker <marius.schrecker at lyse.net
> wrote:

>
> On Wednesday, November 22, 2017 19:01 CET, Keith Pyle <kpyle at austin.rr.com>
> wrote:
>
>
> On 11/22/17 08:17, Marius Schrecker wrote:
> > ? I am repurposing an old, box that was previously used as a combined
> mythtv backend/frontend, Logitech Media Server and nfs fileserver as a
> mythtv backend only.
> >
> > The system has a maximum of 8GB RAM, a quite well used 120GB SSD (no
> signs of failure yet) and I just replaced the 3TB media storage spindle
> drive with a new 4TB unit.
> >
> > My main concern is offloading the SSD as much as possible to prolong its
> life.
>
> Marius,
>
> Mike's comments are quite correct. Look in your smartctl output for a
> line similar to this:
>
> ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE
> UPDATED WHEN_FAILED RAW_VALUE
>
> 233 Media_Wearout_Indicator 0x0032 098 098 000 Old_age
> Always - 0
>
> Many SSD's include this metric as an indicator of how much wear leveling
> has been done (strictly speaking, it's a NAND erase cycle metric).
> Intel defined this metric for their SSD's, but I've seen it on non-Intel
> drives too. A new drive should show a value of 100. A value of 1
> means the drive has reached its designed write cycle limit, but it may
> well continue working past that point. The value is a linear function
> of the write/erase cycle count.
>
> The line above is for an 80 GB Intel MLC SSD that has 72000 hours of use
> (8 years) in my Myth backend as the OS and DB drive. It shows total
> writes of just under 7 TB. It was at ~62000 hours of use that it
> dropped from 99 to 98. So, for a pure backend, a decent SSD will work
> fine for a very long time. It may well die due to other failures long
> before reaching a write limit. For my backend workload, this drive's
> flash should have another 300+ years. :-)
>
> With regard to memory, Linux will happily use whatever you provide for
> caching. The right amount of caching is highly dependent on what you
> run. If your workload involves frequently reading the same data many
> times, you'll benefit from having enough memory to keep that frequently
> accessed data in cache. For a Myth backend that runs commflag jobs, it
> can help to have the video data still in memory rather than re-reading
> it from disk.
>
> My backend runs Myth, mysql, and apache. It has 4 GB and typically has
> 1.0-1.5 GB in the "used" category. That leaves 2.5-3.0 GB being used
> for cache and I don't see any signs of the system being resource stressed.
>
> Keith
>
>
> Thanks Keith,
>
>   My drive doesn't seem to display that metric, but one or two others seem
> to suggest that there'e plenty of life left. Here's the table again:
> ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED
> WHEN_FAILED RAW_VALUE
>   1 Raw_Read_Error_Rate     0x0033   120   120   050    Pre-fail
> Always       -       0/0
>   5 Retired_Block_Count     0x0033   100   100   003    Pre-fail
> Always       -       0
>   9 Power_On_Hours_and_Msec 0x0032   084   084   000    Old_age
> Always       -       14095h+59m+25.710s
>  12 Power_Cycle_Count       0x0032   100   100   000    Old_age
> Always       -       103
> 171 Program_Fail_Count      0x000a   000   000   000    Old_age
> Always       -       0
> 172 Erase_Fail_Count        0x0032   000   000   000    Old_age
> Always       -       0
> 174 Unexpect_Power_Loss_Ct  0x0030   000   000   000    Old_age
> Offline      -       37
> 177 Wear_Range_Delta        0x0000   000   000   000    Old_age
> Offline      -       1
> 181 Program_Fail_Count      0x000a   000   000   000    Old_age
> Always       -       0
> 182 Erase_Fail_Count        0x0032   000   000   000    Old_age
> Always       -       0
> 187 Reported_Uncorrect      0x0012   100   100   000    Old_age
> Always       -       0
> 189 Airflow_Temperature_Cel 0x0000   017   043   000    Old_age
> Offline      -       17 (Min/Max 8/43)
> 194 Temperature_Celsius     0x0022   017   043   000    Old_age
> Always       -       17 (Min/Max 8/43)
> 195 ECC_Uncorr_Error_Count  0x001c   120   120   000    Old_age
> Offline      -       0/0
> 196 Reallocated_Event_Count 0x0033   100   100   003    Pre-fail
> Always       -       0
> 201 Unc_Soft_Read_Err_Rate  0x001c   120   120   000    Old_age
> Offline      -       0/0
> 204 Soft_ECC_Correct_Rate   0x001c   120   120   000    Old_age
> Offline      -       0/0
> 230 Life_Curve_Status       0x0013   100   100   000    Pre-fail
> Always       -       100
> 231 SSD_Life_Left           0x0013   100   100   010    Pre-fail
> Always       -       0
> 233 SandForce_Internal      0x0032   000   000   000    Old_age
> Always       -       1445
> 234 SandForce_Internal      0x0032   000   000   000    Old_age
> Always       -       729
> 241 Lifetime_Writes_GiB     0x0032   000   000   000    Old_age
> Always       -       729
> 242 Lifetime_Reads_GiB      0x0032   000   000   000    Old_age
> Always       -       189
>
>
> BR.
>
> -Marius--
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20171122/fe5177dd/attachment-0001.html>


More information about the mythtv-users mailing list