Jump to content

I keep having stuttery video playback when unpacking files in SABnzbd


Recommended Posts

This is not new to beta12.  I've had this as long as I can remember.  After a file finishes, and starts unpacking, every so often (every 10 to 90 seconds), video playing back stutters/repeats for half to a second or so. 

 

I'm not sure I understand why, since the video is playing back from an array drive, and any new files should be using only the cache drive, so it should not be a simultaneous disk access issue.

 

The video playback problem happens both when playing back the video in a Windows VM, or playing back on a laptop connected to the server via wifi.

 

I know I've seen others report similar issues, but never seen a solution.

 

How might I fix this annoying issue?  I have attached my syslog.  I don't see anything other than disk spindown of other disks.

 

Thanks for looking.

syslog.zip

Link to comment

Possibly, I'd have to check for sure, but even if I do, I couldn't change it.

 

I have a motherboard with 10 SATA III connectors, and a PCI SATA III card with 4 connectors.  I'm 90% sure the parity, the cache and an SSD (mounted outside the array, where my windows VM resides) are the only things on the SATA card, and all array drives are using the Motherboard.

 

However, this issue occurs whether it's the windows VM (SSD) playing the video, or my laptop connecting directly to the array via mapped drives in windows.

Link to comment

I had the same basic problem originally.  Mine turned out to be my CPU tuning.  When you have a download and video playing, run "watch -n .5 grep \"cpu MHz\" /proc/cpuinfo" from the command line and watch your CPU speeds as it starts unpacking and as it is unpacking.  Change it from .5 to .1 to speed up the check.  Use cntrl-c to exit.

 

Even though I had activity, the CPUs were never ramping up from the lower speed settings and staying ramped up.  I used the following tuning options to tweak my CPU.

 

Not saying you have the same issue, but it sounds like it.

 

echo -n 35 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo -n 45 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

 

This is the full section of code I run at bootup

Note, I run before and after commands a lot of times to capture the data in syslog during the bootup.

 

# From http://lime-technology.com/forum/index.php?topic=25127.msg218295#msg218295
# More info https://wiki.archlinux.org/index.php/CPU_frequency_scaling
#
modprobe acpi-cpufreq
modprobe cpufreq_ondemand

# To verify the sampling down factor after changes
cat /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
#
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
#
#
echo -n 35 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo -n 45 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

# To verify the sampling down factor after changes
cat /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
#
#
# To monitor cpu speed in real time, run in command window:
# watch grep \"cpu MHz\" /proc/cpuinfo
# ^C to exit

 

Modification:

 

To show the available governors you can use.

 

sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

 

 

More info here, its old, but good.

http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html

Link to comment

I had the same basic problem originally.  Mine turned out to be my CPU tuning.

 

Very interesting.

 

I ran

watch -n .5 grep \"cpu MHz\" /proc/cpuinfo

 

and it showed all 4 CPU's bouncing around 3000 to 3100 MHz.  I'm not currently downloading anything, nor unpacking anything.

 

I am, however, remuxing an mkv (actually merging bits of 2 mkv files) stored on the server, from my laptop, so it's moving the data over the wifi network.  I don't think that should cause all 4 CPU's to run that hard, but maybe.

 

It sounds like lots of people are having this issue, and that limetech is looking into it.  I'll look into this possibility again next time I need/want to download something.

 

Hopefully, this kind of CPU management can be built into unRAID, since having to do this much customization is not for everyone.

 

Thanks again for the input.

Link to comment

This is not new to beta12.  I've had this as long as I can remember.  After a file finishes, and starts unpacking, every so often (every 10 to 90 seconds), video playing back stutters/repeats for half to a second or so. 

 

I'm not sure I understand why, since the video is playing back from an array drive, and any new files should be using only the cache drive, so it should not be a simultaneous disk access issue.

 

The video playback problem happens both when playing back the video in a Windows VM, or playing back on a laptop connected to the server via wifi.

 

I know I've seen others report similar issues, but never seen a solution.

 

How might I fix this annoying issue?  I have attached my syslog.  I don't see anything other than disk spindown of other disks.

 

Thanks for looking.

 

http://wiki.sabnzbd.org/configure-switches-0-7 Bottom of page: Nice, IONice and the multi-core par2 options.

Link to comment
  • 2 weeks later...

Sorry, this didn't fix the problem.  I still get stuttery playback when watching video in JRiver, streaming from unRAID.  I believe it's related to SABnzbd downloading/unpacking while watching, but I can't guarantee that's the cause.

 

I made the following changes to my SAB setup (all 3 fields were blank previously)...

 

Extra PAR2 Parameters  >  -t-

Nice Parameters  >  -n10

IONice Parameters  >  -c2 -n4

 

The stuttering continues, and even happens during downloading (possibly when changing from downloading one 'part' of a file to the next)

Link to comment

Ah, okay, i'll have a look.

 

While trying to investigate on my own, I saw this...

 

It seems to indicate I/unRAID/docker author need(s) to do something to enable multicore.  The "Enable Multicore par2" box is unchecked, and greyed out on my system, seeming to indicate i can't use multicore, so the switches I've modified might not even be implemented.

 

Not sure if the fix you suggest is separate, or requires multicore to work, but it seems we don't have all the possible benefit of SAB.

 

I could be misunderstanding though.

Link to comment

these stutters usually last less than a second.  it's like counting to 3 or 4 as fast as you can, then the video continues just fine.  It's not like a 5 or 10 second delay while a disk spins up.

 

I think others have experienced this, but it doesn't seem to be very common, or at least, not that many people chime in about suffering this also.

 

I actually have the VM running JRiver on an SSD, outside the array, so i don't think it's JRiver, or even windows, as they should both have plenty fast access to the drive they're running on.  I think it's a problem accessing the array/video file; but how to fix?

Link to comment

In your syslog I'm seeing the following:

 

Relating to your ata11.00: ATA-9: ST4000DM000

 

Dec  2 01:50:43 media kernel: ata11.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Dec  2 01:50:43 media kernel: ata11.00: failed command: IDENTIFY DEVICE
Dec  2 01:50:43 media kernel: ata11.00: cmd ec/00:01:00:00:00/00:00:00:00:00/00 tag 8 pio 512 in
Dec  2 01:50:43 media kernel:         res 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Dec  2 01:50:43 media kernel: ata11.00: status: { DRDY }
Dec  2 01:50:43 media kernel: ata11: hard resetting link
Dec  2 01:50:44 media kernel: ata11: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Dec  2 01:50:44 media kernel: ata11.00: configured for UDMA/133
Dec  2 01:50:44 media kernel: ata11: EH complete

 

And this relating to your ata12.00: ATA-7: SAMSUNG HD102UJ

 

 ata12.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Dec  1 03:38:59 media kernel: ata12.00: failed command: SMART
Dec  1 03:38:59 media kernel: ata12.00: cmd b0/d0:01:00:4f:c2/00:00:00:00:00/00 tag 6 pio 512 in
Dec  1 03:38:59 media kernel:         res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Dec  1 03:38:59 media kernel: ata12.00: status: { DRDY }
Dec  1 03:38:59 media kernel: ata12: hard resetting link
Dec  1 03:38:59 media kernel: ata12: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Dec  1 03:38:59 media kernel: ata12.00: configured for UDMA/133
Dec  1 03:38:59 media kernel: ata12: EH complete
Dec  1 03:52:41 media kernel: ata12.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Dec  1 03:52:41 media kernel: ata12.00: failed command: IDENTIFY DEVICE
Dec  1 03:52:41 media kernel: ata12.00: cmd ec/00:01:00:00:00/00:00:00:00:00/00 tag 22 pio 512 in
Dec  1 03:52:41 media kernel:         res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Dec  1 03:52:41 media kernel: ata12.00: status: { DRDY }
Dec  1 03:52:41 media kernel: ata12: hard resetting link
Dec  1 03:52:42 media kernel: ata12: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Dec  1 03:52:42 media kernel: ata12.00: configured for UDMA/133
Dec  1 03:52:42 media kernel: ata12: EH complete
Dec  1 05:52:20 media kernel: ata12.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Dec  1 05:52:20 media kernel: ata12.00: failed command: SMART
Dec  1 05:52:20 media kernel: ata12.00: cmd b0/d0:01:00:4f:c2/00:00:00:00:00/00 tag 6 pio 512 in
Dec  1 05:52:20 media kernel:         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Dec  1 05:52:20 media kernel: ata12.00: status: { DRDY }
Dec  1 05:52:20 media kernel: ata12: hard resetting link
Dec  1 05:52:20 media kernel: ata12: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Dec  1 05:52:21 media kernel: ata12.00: configured for UDMA/133
Dec  1 05:52:21 media kernel: ata12: EH complete
Dec  1 07:41:16 media kernel: ata12.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Dec  1 07:41:16 media kernel: ata12.00: failed command: SMART
Dec  1 07:41:16 media kernel: ata12.00: cmd b0/d1:01:01:4f:c2/00:00:00:00:00/00 tag 3 pio 512 in
Dec  1 07:41:16 media kernel:         res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Dec  1 07:41:16 media kernel: ata12.00: status: { DRDY }
Dec  1 07:41:16 media kernel: ata12: hard resetting link
Dec  1 07:41:16 media kernel: ata12: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Dec  1 07:41:16 media kernel: ata12.00: configured for UDMA/133
Dec  1 07:41:16 media kernel: ata12: EH complete
Dec  1 14:07:46 media kernel: ata12.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Dec  1 14:07:46 media kernel: ata12.00: failed command: IDENTIFY DEVICE
Dec  1 14:07:46 media kernel: ata12.00: cmd ec/00:01:00:00:00/00:00:00:00:00/00 tag 27 pio 512 in
Dec  1 14:07:46 media kernel:         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Dec  1 14:07:46 media kernel: ata12.00: status: { DRDY }
Dec  1 14:07:46 media kernel: ata12: hard resetting link
Dec  1 14:07:47 media kernel: ata12: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Dec  1 14:07:47 media kernel: ata12.00: configured for UDMA/133
Dec  1 14:07:47 media kernel: ata12: EH complete

 

Your controller has lost communication with those two drives, and has reset the link to re-establish communication.  If the movie you're playing happens to be on the drive that's being reset, then a stutter will most likely happen.  I'm not sure, but its certainly possible that the entire controller might pause all activity while its waiting for the drive to finish resetting.  (IE, the movie is on another drive attached to the same controller)

 

These errors are usually related to bad or loose cabling, or possibly a weak power supply.  Another suspect but unlikely is interference on the data line caused by another data line running parallel in close proximity to it (ie, tie-strapped)

 

Maybe next time you get the stutter grab another syslog so it can be analysed.

 

NB (I had a WD drive that every few months I have to reseat it in its hot-swap bay to avoid these errors)

Link to comment

On the note of inadequate power supply, what is the maximum and typical of how many HDDs can be powered by splitting the output from PSU? If you have a single rail PSU like what I and Justin have, does it matter on how many HDDs we serial chain from a single PSU connector?

 

...

 

These errors are usually related to bad or loose cabling, or possibly a weak power supply.  Another suspect but unlikely is interference on the data line caused by another data line running parallel in close proximity to it (ie, tie-strapped)

 

Maybe next time you get the stutter grab another syslog so it can be analysed.

 

NB (I had a WD drive that every few months I have to reseat it in its hot-swap bay to avoid these errors)

Link to comment

You really want to avoid splitters whenever possible because every splitter has a maximum current draw which it can handle and they also have their own resistance. 

 

Check out the power supply thread.

 

On my modular antec supply, it didn't come with enough Molex connectors for all of my hot swap bays so i emailed the company and they supplied me free of charge with extra molex modular cables to replace the sata cables.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...