Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Streaming playback from server pauses

Featured Replies

I've been fighting this since day one (about two years ago), and thought it might be my HTPC, but I recently acquired a Popcorn Hour and had the identical problem. It is infuriatingly difficult to troubleshoot because it seems random, and is very, very occasional.

 

When watching a program (streamed video, several different compression types), the video will pause for 8-12 seconds, the audio will pause for 6-8, the latter 2-4 seconds will have bad synch, then everything will be back to normal.  This typically happens once every 1-3 movies. It never happens in the same place twice - you can't reproduce it by rewinding or by restarting. It may happen anywhere in the playback - beginning middle or end.

 

Just today I happened to be on my laptop while watching a movie.  I went to open a file on the server.  The computer paused for about 10 seconds while that particular disc spun up - a common occurrence. The video paused about 3 seconds into the file access pause (spin up), and then the audio picked up EXACTLY at the explorer window I was in showed the folder contents.  In an "oh $#+!" moment, I pulled up the web manager and spun down all the drives (naturally the video drive being accessed didn't spin down).  I then tried to browse to the non-spinning drives.  Of the three I tried, one access caused the same issue - the video paused and the delayed explorer window listing came up exactly as the audio resumed. 

 

I tried the same cycle again...spin down and access via explorer. None of the discs spinning up caused the hiccup, but thinking back to my above "test" the spin-down, spin-up only cause the hiccup on the drive which had _not_ been recently accessed. It makes me think that something in the long-term sleep mode might be affecting the streaming. Of course, it could be tied up in the way windows caches recently used network directories, too, but that's beyond my understanding of windows for sure.

 

I'm currently running 4.3b6.  Any suggestions on what this might be, and/or tracing this down (log files, ??)?

 

 

I guess this is the same phenomena:

http://lime-technology.com/forum/index.php?topic=2463.msg19301#msg19301

 

I really hope this can be solved as it really ruins the Media Center experience. I just bought another unRAID server from Lime Technology in hope that the hardware in my first server was causing this problem. But the same problem is present in the MD-1510 model.

So it's not the hardware...

I have watched lots of movies from the server and never had stuttering.

 

When I am watching a movie I am sometimes copying a file to my cache drive in the background.

 

I have my spindown timer set at 5 hours, so once a drive comes up for the evening, it stays up.  It is pretty uncommon that a drive would spinup or down while a movie is playing (although it has to have happened in the year since I've been using unRAID - I can't ever remember a movie stutter).

 

I also don't run any cron jobs that cache directory entries or do other housekeeping tasks.  No torrent downloads either.

 

I might suggest upping your spindown timers and see if the problems go away.

 

Problem is that (when using Media Center software) drives is sometimes read for updating movies/musiv in library. And if you like me have a couple of HTPCs in diffrent rooms you can't really "plan" to start media playback at the same time..

Having recently purchased a server from Limetech, your ability to get Tom's attention on this issue may be pretty good.  I'd suggest sending him an email reporting this as a bug and see what he says.

  • Author

RichardK

 

That sounds very similar to my experience. I don't have any problems once the drive is spun up, only in the initial spin. It's almost worse that I can't force a spin-down and spin up and make it happen, the drive has to be "asleep" of its own volition - so I can't reliably test it.   I think at one point I turned spin-down off, but I presume that didn't fix the problem as I set the time back to (3 hours?) so I wasn't running all 7 drives 24/7 for the typical access which might only happen once every 2-3 days (I don't DVR to this array).  It's not really a bandwidth issue, as it occurs on a 700kb DiVX encode as often as a 7GB DVD rip or a 12Gb HD movie.

 

Let us know if you hear anything back.

I got an answer. He had reproduced the problem and is working on a fix.

  • Author

Awesome! You just made my UnRaid Favorite People list (an exclusive club I assure you).  Of course, now my 6 year daughter old can't turn to her friends (or visiting adult) during the rare pause and say - with a straight face - "Don't worry, it will start up in a couple of seconds; one of the drives is coming on line."  I might actually miss that part. :-)

I got an answer. He had reproduced the problem and is working on a fix.

 

Great!  You can be our official liaison with Tom on bugs.  ;)

 

I know that a number of people have been complaining about this issue.

Of course, now my 6 year daughter old can't turn to her friends (or visiting adult) during the rare pause and say - with a straight face - "Don't worry, it will start up in a couple of seconds; one of the drives is coming on line."  I might actually miss that part. :-)

 

That would be priceless!  You really should have that on video.

Awesome! You just made my UnRaid Favorite People list (an exclusive club I assure you).  Of course, now my 6 year daughter old can't turn to her friends (or visiting adult) during the rare pause and say - with a straight face - "Don't worry, it will start up in a couple of seconds; one of the drives is coming on line."  I might actually miss that part. :-)

 

unRAID server ...  $300 to $3000, depending on number of hard disks installed.

DVD collection ...  $5.00 to $50,000 or more, depending on number number of movies in your collection

Labor cost to load server ... free (a true labor of love)

Having your 6 year old daughter explain to friends how the disks need to spin up as they come on-line ... priceless.

 

I don't have any kids, so in my case it was:

Having your wife ask you to put a LAN connection in the bedroom so she can watch movies from the unRAID server on the bedroom TV ... priceless.

Joe L.

I wrote about this back in september with no response from users with the same experience, so I was convinced that the problem was with my setup.

 

I'm basicly running a HTPC in every room of my home right now, sharing my 2 unRAID server.

 

So I encounter this problem many times a week. Not just when watching video. Actually, listening to music is even worse as these "pauses/drop-outs"  make Windows Media Center (Vista/Windows7) stall (hang) for minutes at times.

 

As I'm not willing to let 30 disks spin 24/7 just to avoid this, I really hope there is a quick fix.

 

I'm experiencing this as well when playing an ISO on Popcorn Hour and spinning up a second disk.  I also have the new MD-1510/LC that's only a few months old.  Hopefully this can be resolved soon, otherwise, I'll have to ask Jordan's 6 year-old daughter to teach my 3 year-old daughter that line... :)

I hope they will give this problem a high priority. While I understand that most people is not affected on a daily basis (or maybe not at all), it's kind of a deal breaker for us that are using our servers to provide multiple clients with video and music.

The problem reported by the first poster, Jordan, is easily reproduced: Have all drives spun down & then fire up video stream.  There will be a pause while that disk is spun up and then the video will start.  Next do anything on that same machine which causes another disk to spin up, for example, fire up another video stream or simply browse the files on another disk (whose directory contents have not been cached).  The result will be a pause in the first video.

 

I don't think this particular case is solvable.  This is because on the linux-side Samba allocates one process per client to handle I/O for that client.  In this case the linux-side client process is busy with I/O requests for the first video stream, when it gets a request to access data on another disk.  This access will be serialized, hence the entire client process pauses waiting for the other disk access to complete, which is delayed by disk spin-up.

 

This is probably not a big issue if you are aware of it.  For example, if you have dual monitors where video is playing on one monitor & the desktop is on the other monitor, if you do anything via the desktop to cause a disk to spin up, then it will pause the video.  Similar effect can happen if you have a background task running that might access spun-down drives, e.g., media scan.

 

However - I don't think this is the same problem rickardk is reporting.  In this case there are separate machines accessing separate disks on the unRAID server, causing video streams to pause during disk spin up.  I have not been able to reproduce this exactly.  In one test, I had a WinXP machine displaying video using VLC media player.  While this was happening, I tried accessing a spun down-down disk via Win2000 machine.  The Win2K machine 'paused' waiting for the disk to spin up, but the WinXP video just kept on running fine with no hiccups.

 

So, rickardk, can you make this happen "at will"?  If so, how exactly do you make it happen?

This is a big *if* but *if* unRAID did some sort of directory caching, and *if* it could see a each hit to that cache, you might be able to implement a "spin up on directory hit" that would be an aggressive spin-up strategy, and could be handled in its own thread outside of Smaba.

This is a big *if* but *if* unRAID did some sort of directory caching, and *if* it could see a each hit to that cache, you might be able to implement a "spin up on directory hit" that would be an aggressive spin-up strategy, and could be handled in its own thread outside of Smaba.

I'm sure that might help, but the effect would be a spin-up of nearly every drive in my array any time I went to look at a listing of my Movies.

 

My disks each have a "Movies" share, and if the processes detected a directory listing of "Movies" and acted as you suggest, it would spin up every data disk in the array thinking I *might* want to play one.

 

I experienced the same two of the same "multi-second-pauses" while watching a movie from the server a week ago.  (and got the same questions from my wife "Why did it "pause" like that?")  Now I cannot guarantee that another PC on my LAN did not decide on its own to scan the visible shares on the unRAID server, but I sure did not initiate one, as no other  PC was in use. (We were all watching the movie with our guests, and we don't have a 6 year old to supply the answer  :(

 

The only other process that was scanning the shares was the periodic "ls -R /mnt/user/Movies >/dev/null" I have running every 10 seconds to keep the directory entries in cache.  It is possible that one of the needed directory entries was freed (reused as we were playing the movie) and the affiliated disk needed to be spun up.  That spin-up could have caused the interruption.  I still think it might be an exclusive lock on some resource shared by the network drive and the disk driver while it is spinning up...It may even depend on the specific network driver involved. Who knows...  (where's a 6 year old when you need one ???  ;D)

 

Joe L.

As I said, it is an "aggressive" spin-up algorithm!  I personally wouldn't likely use it either, but I was just thinking out loud.

 

For a home user who is just playing movies, aggressively keeping disks spun down to save power and wear-and-tear on the disk is not a big deal.... but stuttering is.

 

Another aggressive strategy would be to spin up all drives when any drive is experiencing I/O.  (this would be doable w/o dealing with a whole new caching system).

 

A config option:

 

- Spindown Strategy:

 

  - PowerSave (disks will be spun down when idle, to minimize power -- but this may result in occasional pauses in playing back media if two programs access the server at the same time)

 

  - FastResponse (disks will be spun up when any disk is being read/written -- this will minimize any occasional pauses in playing back media, but the server will use more power).

Just an observation ... I don't remember seeing these reports with 4.3.3, which depended on the drives to spin themselves up and down.

 

Based on Joe L.'s recent scenario, the drive spin up theory may not explain these delays.  Especially if Tom is right and the spin up request must come from THE SAME workstation in order to cause the stutter.  It is looking likely that there is some other factor in play here.

 

I would recommend that people that see this happen quickly look at unRAID for some unexpected disk spinning.  It might offer some clues.  If only the drive playing the movie is spinning - the Twilight Zone music might start playing in your head!

 

For people consistently seeing the stutter, try increasing your spin down delays (i.e., 4+ hour delays before spindown) and see if it helps.

 

Note that, in the 4.4.2 version, there was a possibility that unRAID would think a drive was spinning that had been put to sleep in some other way (e.g., by running hdparm on the server).  In this scenario, unRAID would unknowingly spin up a drive to get its temperature to display in the unRAID Web GUI.  This has been reported fixed in 4.5b2 (although I haven't tested it out yet).  Not sure if this could be related.

 

Final thought, aggressive spin up strategies that cause all the drives to spin up at once are going to put significant stress on PSUs.

Final thought, aggressive spin up strategies that cause all the drives to spin up at once are going to put significant stress on PSUs.

 

True.  The assumption is that they would be staggered by a few seconds.  The gist is that if any drive is being actively accessed, you would launch an independent thread to spin up sleeping disks (staggered) and keep them spun up while any disk is being actively accessed.  Once active access ends, the spin-down times would begin to run normally.

  • Author

Okay, this may address some or most of the issues I had, though I "found" the spinup issue when I accessed a non-spinning drive from a machine other than the one that was playing the video. It was _not_ continuously repeatable, as the only pause occurred when the drive spun up from a sleep state (for lack of the proper term - the drive had been spun down and was cold for likely hours), but when spun up after hitting "spin down" on the http control panel no hiccup occurred.

 

This may be a silly question, but I don't have the machine in front of me to check - can you require all discs spin up together when any disc is accessed, but still allow the array to spin down once it has been idle for a set period of time?  For those with large arrays it may not be ideal, but I can handle my 6-7 discs all spinning when I need access.

This may be a silly question, but I don't have the machine in front of me to check - can you require all discs spin up together when any disc is accessed, but still allow the array to spin down once it has been idle for a set period of time?

 

You can't at this time... but that was the suggestion that I made.

Some type of caching of where files are would be a huge improvement.  For a share that spans multiple disks it would be great to have a file that might keep track of were certain files are.  That way if i want to see a movie that is in my movies share but is physically on disk2 it will only spin up disk2 instead of all the disk in my movies share.  Since unRAID calculates parity whenever a file is written to the drive it should be able to update this cache file at the same time.

 

I think I am dumbing it done quite a bit but hopefully everyone gets the point.

Maintaining buffers seems easy in concept, but gets messy in practice.  What works for a system with a thousand 1GB VOB files per TB (a trivial size for the cache) suddenly will run out of memory and crash a 500MB RAM system where there are a million small files.  Plus you have the inherent issues with Samba's own buffers.

 

Maintaining buffers seems easy in concept, but gets messy in practice.  What works for a system with a thousand 1GB VOB files per TB (a trivial size for the cache) suddenly will run out of memory and crash a 500MB RAM system where there are a million small files.  Plus you have the inherent issues with Samba's own buffers.

 

 

True, and I tend to overlook the breakdown of things like DVDs and the like.  I keep all my movies in ISO format so I do not have to deal with the many many files.  I guess what would be optimal is if we could specify the depth we would like a certain share to go to.  Like for my movies share i would want it to cache/buffer something to the effect of:

MOVIE1.ISO = /mnt/disk1/movies/MOVIE1.ISO
MOVIE2.ISO = /mnt/disk1/movies/MOVIE2.ISO
MOVIE3.ISO = /mnt/disk2/movies/MOVIE3.ISO

 

So my thinking is that when i request to see the movies share I end up seeing this buffer so that 1) not all disks are spun up and 2) The display is almost instantaneous.  And if say i wanted to play a movie from my movies share (MOVIE3.ISO for instance) it would only spin up disk2.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.