[mythtv-users] OT: Get off my SSD?!

Ronald Frazier ron at ronfrazier.net
Thu Sep 24 13:35:36 UTC 2009


It's worth looking at just how much writing is going on. Even if all
those blinks are writes (as already suggested they might be reads), it
may be a trivial amount of data being written. I don't know the specs
for your drive, but for the Intel drives, IIRC they say 20GB writes
per day will give you a minimum 5 year life. If all your writes amount
to nothing more than 1GB per day, then you could could reasonably
concluded your writes are insignificant to the life of the drive (your
write life will be 100 years....you'll discard the drive long before
it would wear out). Again, that's for the intel drive...you'll need to
find the rating for your drive.

You can get the stats of your disk by running cat /prod/diskstats.
When I do so, I get the following output (along with some other
irrelevant lines for ram and loop devices):
8    0 sda 1987369 109134 159093252 9925928 13279357 9901152 456536514
754281540 0 39602364 766224960
8    1 sda1 941968 69129 23277467 6688764 12327909 9863153 177983344
739389312 0 27904536 748097548
8    2 sda2 1045333 39457 135815169 3236324 951448 37999 278553170
14892228 0 12502708 18126564
8    3 sda3 32 258 290 360 0 0 0 0 0 280 360
8   16 sdb 3556876 398622 588801245 10811168 1759825 11427 543315308
20747024 0 22980656 31552160
8   17 sdb1 3556857 398604 588800949 10811088 1759825 11427 543315308
20747024 0 22980540 31552052

There you can see the stats of reads and writes for each drive (or
even individual partitions). Here are the meaning of the fields
(not...the number below don't count the first 3 columns, which are
major/minor device number, and device name
Field 1 -- # of reads issued
Field 2 -- # of reads merged, field 6 -- # of writes merged
Field 3 -- # of sectors read
Field 4 -- # of milliseconds spent reading
Field 5 -- # of writes completed
Field 7 -- # of sectors written
Field 8 -- # of milliseconds spent writing
Field 9 -- # of I/Os currently in progress
Field 10 -- # of milliseconds spent doing I/Os
Field 11 -- weighted # of milliseconds spent doing I/Os

The important field is 7...number of sectors. Multiply that by 512 to
get the number of bytes written since last boot. So from this, I can
see that sda has written 456536514*512/1024/1024/1024  -> 217GB of
data since bootup. With an uptime of 28.5 days, that comes to 7.6GB
per day.

If I were to look at partition sda1, I can see that it's 1.3GB per
day. That is the main partition for my master backend. It has the
entire OS, mysql database, logging, and everything else except video
and music files. Heck, it also contains the file systems for 2
diskless frontends (including their logging). At that rate, I'd have
no concerns putting that partition on an SSD with a write life similar
to an intel SSD. And again, that's the master backend+2 frontends. I'd
expect a single frontend machines to be way below that.

So check these stats on your SSD drive and you may find it to be a
trivial number of writes compared to your drive's lifetime wear
rating.

About the swap file, how much ram do you have? I've run diskless
frontends with 1GB and 2GB of memory and never had a problem with no
swap file.


-- 
Ron
Ronald Frazier Photography - http://www.ronfphoto.com/
Blogging About Photography - http://ronfrazier.blogspot.com/


More information about the mythtv-users mailing list