[mythtv-users] Storage Group Priorities
Drew Tomlinson
drew at mykitchentable.net
Mon Apr 28 19:57:17 UTC 2008
Chris Pinkham wrote:
> * On Sat Apr 26, 2008 at 03:30:43PM -0700, Drew Tomlinson wrote:
>
>> Thanks for your reply but I remain a bit confused. If I understand what
>> you're saying and I wanted the default values, I would just add the
>> following rows to the Settings table:
>>
>> VALUE DATA HOSTNAME
>> SGweightPerRecording 10
>> SGweightPerPlayback 5
>> SGweightPerCommFlag 5
>>
>
> No, you shouldn't need to touch those.
>
> What you want is some rows that look like this:
>
> mysql> select * from settings where value like "%weightper%";
> +-----------------------------------------------------+------+----------+
> | value | data | hostname |
> +-----------------------------------------------------+------+----------+
> | SGweightPerDir:yakko:/nas/video5/mythtv/recordings | 30 | NULL |
> | SGweightPerDir:alive:/nas/video1/mythtv/recordings | 10 | NULL |
> | SGweightPerDir:yakko:/nas/video4/mythtv/recordings | 30 | NULL |
> | SGweightPerDir:alive:/nas/video4/mythtv/recordings | 30 | NULL |
> | SGweightPerDir:mythtv:/nas/video3/mythtv/recordings | 20 | NULL |
> | SGweightPerDir:mythtv:/nas/video2/mythtv/recordings | 20 | NULL |
> | SGweightPerDir:mythtv:/nas/video5/mythtv/recordings | 30 | NULL |
> +-----------------------------------------------------+------+----------+
> 7 rows in set (0.00 sec)
>
> These basically set starting weight offsets for the particular host and
> directory specified.
>
> A recording has a default weight of 10 as you show above. So in a
> scenario where you have 1 host with 3 drives and you only want to use
> the one external drive as a last resort, you could do something like
> this:
>
> +-----------------------------------------------------+------+----------+
> | value | data | hostname |
> +-----------------------------------------------------+------+----------+
> | SGweightPerDir:host1:/nas/video3/mythtv/recordings | 20 | NULL |
> +-----------------------------------------------------+------+----------+
>
> That would give the 3rd drive a starting weight of 20 which means that
> Myth acts as if it already has the equivalent of 2 recordings already
> going to it. That would cause the storage scheduler to prefer the other
> two drives for the first 4 active recordings and then the 5th would be
> scheduled based on which drive had the most free space. If you wanted
> the fifth active recording to go to this drive then set the value to 19
> instead. Playback, transcoding, and commercial flagging also have
> weights assigned that are counted towards the total, so if you have
> those running during recording it can also affect where active
> recordings are stored. If you only want this large external storage to
> be used as a last resort, I'd keep it's starting weight set at 20 or
> above. I use 30 on some of my weights as you see above.
>
> Because the Storage Group code will find the file when it needs it, you
> can move these files from the local fast storage to the slower external
> storage without having to update the database at all as long as your
> Storage Group is configured to see all the right directories. You
> could even setup a user Job to move the recordings around automatically
> for you if you wanted. Eventually there will be a builtin job for this,
> but I haven't fully tested my patch to do that and haven't written any GUI
> glue for it either. It's been put on the back burner behind other
> things right now.
Thank you. Now I think I understand. I'll experiment.
Cheers,
Drew
--
Be a Great Magician!
Visit The Alchemist's Warehouse
http://www.alchemistswarehouse.com
More information about the mythtv-users
mailing list