SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-28-2009, 03:37 PM
MrVining MrVining is offline
Sage Advanced User
 
Join Date: May 2009
Location: Minnesota
Posts: 96
How does SageTV software decide what drive to use?

In a multi HDD set-up how does SageTV software pick the drive it will use to store a show?
Reply With Quote
  #2  
Old 07-28-2009, 03:46 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
This is covered in Appendix C of the SageTV PDF manual.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #3  
Old 07-28-2009, 03:49 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Right now? Not so smart.

Sage just picks the HD with the most free space and then records to it. Obviously, the big drawback of this is that if you have one drive with a lot of free space Sage will *exclusively* record to that drive with *all your tuners* until it reaches equilibrium capacity with the other drives. Some people have no problem with this, I think it causes sluggishness, it really depends on a lot of factors. (Just this week I caught Sage recording 5 HD shows to the same drive at the same time while my other 3 recording drives sat idle)

Currently, the only thing you can do to change this is to force specific tuners to record to specific drives (forced_video_storage_path_prefix). But, this has its own nasty side effect where-in when one of your tuners fills up it's drive it'll start deleting shows even though you have plenty of free space on other drives.

I submitted a bug about a year ago about this, and they say they have a much more robust solution ready to go, but they didn't want to mess with it during the last 2 beta rounds. So hopefully we'll see something about it in the next one.

Last edited by evilpenguin; 07-28-2009 at 03:52 PM.
Reply With Quote
  #4  
Old 07-28-2009, 07:08 PM
FreshOne FreshOne is offline
Sage Advanced User
 
Join Date: Dec 2007
Posts: 80
Quote:
Originally Posted by evilpenguin View Post
Right now? Not so smart.
they say they have a much more robust solution ready to go, but they didn't want to mess with it during the last 2 beta rounds. So hopefully we'll see something about it in the next one.
I recently upgraded my Sage setup to 2 HDHRs (4 tuners) and would welcome an easier and more intelligent way to split the recordings among multiple HDs.
Reply With Quote
  #5  
Old 07-29-2009, 04:13 AM
nick_l's Avatar
nick_l nick_l is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Pgh, PA
Posts: 257
Eenie Meenie Miney Moe (sorry, couldnt resist)
Reply With Quote
  #6  
Old 07-29-2009, 04:47 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
I would love more of a round robin system to drive selection, where it chooses the unused drive with the most free space. Then, if there isn't an unused drive, it chooses the single use drive with the most space. If still no go, it chooses the dual use drive with the most space, and so on. This should do a pretty good job of evening the load. Drive use should get a point for each recording in progress to it, and each playback. Perhaps something where HD gets 2 points, and SD gets 1, so you could even out the load a bit. Would certainly be a GREAT improvement over the current system.

I would also like to see a drive leveling system in place, where it would periodically analyse the drives, and look for recordings that can be moved to even out the free space among the drives. This would help in the drive selection system.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #7  
Old 07-29-2009, 08:17 AM
briands briands is offline
Sage Icon
 
Join Date: Aug 2004
Location: Bloomington, IN
Posts: 1,093
Warning... Monkey wrench....

What does WHS pooling do to the mix? If all recordings are going to the pool, I suspect Sage does nothing special since it appears to only have one drive available. What if you have a share in the pool and other drive(s) outside the pool?
Reply With Quote
  #8  
Old 07-29-2009, 09:43 AM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
Quote:
Originally Posted by briands View Post
What does WHS pooling do to the mix? If all recordings are going to the pool, I suspect Sage does nothing special since it appears to only have one drive available. What if you have a share in the pool and other drive(s) outside the pool?
If Sage is configured for the pool drive it is only writing to one drive in WHS (the pool drive) and has nothing to calculate. If it is configured for a the pool drive and a drive out of the pool it would write to the drive with the most free space I would think. For a better understanding of how WHS works google for the Technical Brief Windows Home Server Drive Extender document. Here is a partial explanation how WHS handles it.
Quote:
The Windows Home Server Drive Extender Filter determines which hard drive to initially write a file to. One goal of the algorithm the Filter uses is to keep related files together on the same hard drive. Copying music from a CD to a hard drive illustrates why this is important. If a single secondary hard drive failed, it is more convenient to lose all the music from a few CDs and then re-copy those CDs than to insert hundreds of CDs to re-create one track from each. One way to achieve this is to ensure that a set of files created around the same time are stored on the same secondary hard drive.

An obvious method for choosing the secondary hard drive would be to use the one with the most space free, but that would result in sometimes alternating among secondary hard drives. Consider the CD scenario again. A moment ago, the second hard drive had the most space available, so Track 1 of this CD was saved there. Now that the second hard drive has this new file on it, the third hard drive has the most room to hold Track 2, but we would really prefer to store it on the second hard drive with Track 1. Choosing the hard drive with the least available space is a good choice because the hard drive with the least free space tends to remain the hard drive with the least free space for a long time, and the same secondary hard drive will be chosen.

The Drive Extender Migrator service uses the secondary data partitions with the most free space to store the secondary or alternate shadows of new files. When Folder Duplication is enabled, the Migrator service fills the secondary data partitions with the most free space, and uses the primary data partition as a last resort.

Another goal in selecting the secondary hard drive for a file is to ensure that migrated files have room to grow. If a migrated file is later opened and data is added to it, you need enough free space on the secondary hard drive to hold that new data. This suggests that there should be a buffer of free space remaining on the lowest-space secondary hard drive before placing a shadow file on it. The Drive Extender Migrator service will attempt to keep a buffer of 10 GB on each hard drive and increase that buffer to 20 GB of free space, by migrating files to other secondary hard drives that have 20 GB or more free space available.

If all of the secondary hard drives are so full that there may not be room for existing shadow files to grow, the Migrator service may move some shadow files to the primary data partition or alert the user that the home server is running low on storage. The Migrator service makes the appropriate updates to the tombstones whenever it moves a shadow from one secondary data partition to another or from a secondary data partition to the primary data partition.
Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.

Last edited by gplasky; 07-29-2009 at 09:45 AM.
Reply With Quote
  #9  
Old 07-29-2009, 10:03 AM
RobJ RobJ is offline
Sage Advanced User
 
Join Date: Jan 2007
Location: Tampa, FL
Posts: 97
Quote:
Originally Posted by Fuzzy View Post
I would love more of a round robin system to drive selection, where it chooses the unused drive with the most free space. Then, if there isn't an unused drive, it chooses the single use drive with the most space. If still no go, it chooses the dual use drive with the most space, and so on. This should do a pretty good job of evening the load. Drive use should get a point for each recording in progress to it, and each playback. Perhaps something where HD gets 2 points, and SD gets 1, so you could even out the load a bit. Would certainly be a GREAT improvement over the current system.

I would also like to see a drive leveling system in place, where it would periodically analyse the drives, and look for recordings that can be moved to even out the free space among the drives. This would help in the drive selection system.
I agree, and would like to see what Sage has come up with, for load balancing.

For now, I do drive leveling manually. I make sure that 2 local drives always have the most space, and stay within 1GB of each other. I manually move recordings elsewhere, to my desired destination for that recording, and then move recordings between these 2 drives to balance them. Works great. I never have more than 2 recordings happening to the same drive at the same time.
Reply With Quote
  #10  
Old 07-29-2009, 10:32 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
It's ridiculous that I have 5 sage storage drives, and 5 tuners, and still, on occasion, have 3 recordings on one drive...
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #11  
Old 07-29-2009, 11:31 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Fuzzy View Post
I would love more of a round robin system to drive selection, where it chooses the unused drive with the most free space. Then, if there isn't an unused drive, it chooses the single use drive with the most space. If still no go, it chooses the dual use drive with the most space, and so on. This should do a pretty good job of evening the load. Drive use should get a point for each recording in progress to it, and each playback. Perhaps something where HD gets 2 points, and SD gets 1, so you could even out the load a bit. Would certainly be a GREAT improvement over the current system.
I think you need to be careful about making the rules too complicated. There's a wide variety of disk hardware out there, and what looks like a single drive to Sage could in fact be a RAID array or NAS device with its own internal load-leveling logic. Even single drives these days have internal command queuing logic to optimize throughput. Layering another set of rules on top of that without knowing what the device itself is doing could actually degrade performance in some cases. For instance I can imagine a case where writing two streams to the same fast internal disk gives better overall performance than offloading one of them to a lower-speed external drive or network device.
__________________
-- Greg
Reply With Quote
  #12  
Old 07-29-2009, 11:42 AM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Quote:
Originally Posted by GKusnick View Post
I think you need to be careful about making the rules too complicated. There's a wide variety of disk hardware out there, and what looks like a single drive to Sage could in fact be a RAID array or NAS device with its own internal load-leveling logic. Even single drives these days have internal command queuing logic to optimize throughput. Layering another set of rules on top of that without knowing what the device itself is doing could actually degrade performance in some cases. For instance I can imagine a case where writing two streams to the same fast internal disk gives better overall performance than offloading one of them to a lower-speed external drive or network device.
Yeah, but *some* new rules are needed cause the current implementation could end up witting two streams to the slower drive while the faster one sits idle.
Reply With Quote
  #13  
Old 07-29-2009, 11:45 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
A system could easily be made that assigned 'points' not only to the stream, but to the drive itself. The local RAID could be assigned more 'points' and therefore could receive more than one HD stream at a time before rotating to the next.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #14  
Old 07-29-2009, 01:00 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
I agree that the current scheme is less than ideal, and that it's not hard to come up with new rules that sound better on paper. The hard part is knowing how well the proposed rules will perform in real life on a variety of user hardware. Maybe the ultimate answer is for the Config Wizard to run performance benchmarks on each configured recording directory to try to measure how much throughput it can take under various conditions. That seems preferable to a scheme that requires users to configure drive priorities manually in order to get good performance.
__________________
-- Greg
Reply With Quote
  #15  
Old 07-30-2009, 09:54 AM
PAF PAF is offline
Sage User
 
Join Date: Jul 2008
Location: Chicago
Posts: 48
With 64K clusters, is this really important? I remember having this discussion before and it ended up being that you need about 10 HD streams to top out the bandwidth of a 7200 RPM hard drive (or something along those lines)...

Has anyone actually tested this as an issue? Something like record 1 stream for 5 minutes... then 2 streams for 5 minutes... etc. until stuttering is seen or artifacts or any other weird stuff. I tried 3 streams to 1 hard drive and I haven't seen that much difference, has anyone tried this with other results?

Is there a way to document these kinds of anomalies?
Reply With Quote
  #16  
Old 07-30-2009, 10:14 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
if everything was ideal, sure, a hdd could handle a lot, however, many have experienced the inconsistent results with as little as 3 recordings on a single drive. Maybe this could be fixed by some better buffering systems, but the better method would be to just fix the drive selection.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #17  
Old 07-30-2009, 11:10 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
The problems arise not so much from multiple simultaneous recordings, as from recording to and playing back from the same disk at the same time. With multiple recordings, the OS can interleave the files in the same area of the disk to minimize seeks and maximize throughput. When playing back, though, it has no choice but to read from wherever the file happens to be stored, which entails more seeking and therefore lower throughput than a pure recording scenario. So ideally you'd like Sage to choose for recording a disk that's not already being used for playback.

It might also be handy to be able to specify that (for instance) my programs should be recorded to a different disk than my wife's programs, in order to minimize the chances of multiple simultaneous playback streams from the same disk.
__________________
-- Greg
Reply With Quote
  #18  
Old 08-08-2009, 11:38 PM
MrVining MrVining is offline
Sage Advanced User
 
Join Date: May 2009
Location: Minnesota
Posts: 96
Seems like over time the current system would work great, because the longer it runs the more random the show size and space one each drive becomes (especially with more and more drives). At any rate the only other option for right now is a hefty raid card. Even then I wonder what kind of throughput a person would really end up with...
Reply With Quote
  #19  
Old 08-09-2009, 02:28 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
a good PCI-e raid card should provide pretty good performance, especially in striped mode. I've even had decent results using windows built-in striping (well, not QUITE so built in, as it required some hacking to enable), though it did end up hitting a wall on throughput because I was limited by the simple SATA controller on the board.

The best option remains Sage actaully improving the selection system.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #20  
Old 08-22-2009, 01:04 AM
MrVining MrVining is offline
Sage Advanced User
 
Join Date: May 2009
Location: Minnesota
Posts: 96
I wont do striped mode, it's too risky. Besides a good raid card will write raid 5/6 just or near as fast as on board raid or software raid.

I guess I'm just going to have to get out the pen n paper and do some math. I'm looking to record upwards of 10-12 HD streams at once, 2-3 shows on playback, and one of these days I'll have to look into getting the com skip going.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't decide. indytbf Hardware Support 2 12-12-2007 10:08 PM
Can't decide on HD source? akenis Hardware Support 20 05-23-2007 07:07 PM
Trying to decide on buying SageTV... issues giving me pause... IncredibleHat SageTV Software 15 05-08-2006 02:56 PM
Help decide between 2 systems Lonc_25 Hardware Support 13 12-19-2004 03:35 PM
Trying to decide which HW to get m1abrams Hardware Support 3 11-23-2004 04:06 PM


All times are GMT -6. The time now is 10:52 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.