Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No playback in Plex/slow speed #41

Closed
slimymiracle opened this issue Nov 28, 2015 · 14 comments
Closed

No playback in Plex/slow speed #41

slimymiracle opened this issue Nov 28, 2015 · 14 comments
Labels

Comments

@slimymiracle
Copy link

Hello!

I am first time user and I am having some trouble with playback in Plex using rar2fs - the playback doesn't start at all.
I also tried downloading a media file from within Plex and got a speed of ~90kb/s (internal network), which seems very low to me.

Any troubleshooting I can do? Is there anything I have missed?

rar2fs -V
rar2fs v1.21.0 (DLL version 7)    Copyright (C) 2009-2014 Hans Beckerus
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under
certain conditions; see <http://www.gnu.org/licenses/> for details.
FUSE library version: 2.9.4
fusermount version: 2.9.4
using FUSE kernel interface version 7.19

Compiled using unrarsrc-5.3.8.tar.gz.

Kernel: Linux server 4.2.0-18-generic
Dist: Ubuntu 15.10
CPU: Intel Core i7-4790K Quad-Core @ 4.0 GHz
Memory: 2 x 8GB DDR3 @ 1333 MHz

@slimymiracle
Copy link
Author

Now it seems to be running fine. Does it do any indexing when it is started the first time?

Thanks!

@hasse69
Copy link
Owner

hasse69 commented Nov 29, 2015

rar2fs performs no indexing as such. PLEX does that however while scanning your library. That can be a very slow process. Are you using the --seek-length=1 option to rar2fs? If not, try that. It will speed up the process a lot when traversing a huge library consisting of many multi-part archives.

@slimymiracle
Copy link
Author

I was running rar2fs with the 'd' flag just to see if I could get some info on what was happening. While Plex, according to the web interface, didn't perform a scan (indexing?), rar2fs seemed to go through all the dirs. That's why I was wondering about the indexing.

No, sadly the directory structure is a bit more complex than that.
Would it be faster to have multiple mount points (with --seek-length) instead of having one that includes everything?

@hasse69
Copy link
Owner

hasse69 commented Nov 29, 2015

PLEX is a bit secret sometimes. Judging from the specs of your system it think you would benefit a lot by splitting your library is different mount points. That in combination with --seek-length=1 should give you better performance. But I think PLEX is doing download of meta-data etc. in the background. The indexing is only the first step, but then it needs to read through all the archives too in order to collect information about each element. This is a slow process, but once it is done you should see a drastic drop of activity towards the file system. Also, if you have a lot of compressed archives it will need to decompress those in order to collect data which takes a lot more time than for non-compressed archives. Maybe you just have to be patient?

@slimymiracle
Copy link
Author

So I restarted my server and mounted it the same way as before (a big chunk) and got the same issue as previously.
After that I split it up in several mount points and the media started to play pretty quick, but then I got stuttering issues.

I will try again later and see if the stuttering goes away. From what I can see the CPU load doesn't go past 2% on any of the cores when playing media.

@hasse69
Copy link
Owner

hasse69 commented Nov 29, 2015

OK, I cannot really see how rar2fs in any would be the cause of slow network speed.
What are you trying to playback? Is it a compressed archive? What happens if you unpack a file and try first inside a rar2fs mount point (rar2fs handles regular files transparently) and then outside a rar2fs mount point. How are you sharing data? SMB or NFS, other method?

@slimymiracle
Copy link
Author

From what I can see from the Plex log files it's adding watchers to every directory - maybe that's the culprit?

RAR archive data, v14, flags: Archive volume

I'm not sure what you mean by sharing, but the compressed archives are located locally, i.e. on the same server.

@hasse69
Copy link
Owner

hasse69 commented Nov 29, 2015

What client are you using? If all files are located on the same physical server as PMS is running, then I understand even less why this should be a problem. I still did not get if the archive you try to playback is compressed or is only in store format? Is it created with -m0 or something else? You can use the unrar tool to check compression level. Also, how does it work if you unpack the file? There is no reason why rar2fs should affect your network performance, and if your CPUs are not doing much work, then the problem must be somewhere else.

What I meant by sharing is if your files are located on a remote server and shared to PMS using e.g. Samba or NFS. Obviously that is not the case.

@hasse69
Copy link
Owner

hasse69 commented Nov 29, 2015

Btw, to narrow this down a bit. Can you move the problematic archive to a folder of its own. Then point your PLEX library to that folder and ignore all other folders. Eg. make the library consist of only one file. Then try again. Do you still see the issues?

@slimymiracle
Copy link
Author

I tried with web (Chrome), Xbox One, iOS (iPhone, iPad) and all of them had the same issue.

Though I just tried to playback some media and it's working flawless now. When I check the PMS log I no longer see the notices about staring "watchers".

I wonder if it will work better (on startup) if I disable "Update my library automatically" and "Run a partial scan when changes are detected" - not sure if that works anyhow. I used PyarrFS before and it didn't work with that,

Thanks for taking your time!

@hasse69
Copy link
Owner

hasse69 commented Nov 29, 2015

I do not think the watchers as such should really cause an issue, but they might block something during initial indexing of your library. Trying playback while your complete library is being indexed is probably not something to recommend. But this will only be done once, even after server restart your library should be cached once a complete scan has been made.

And yes, you can probably turn off "Update my library automatically" because FUSE file systems does not report updates in a way that PLEX assumes and it will not work as expected. You should always make a manual scan when files are added to the library. It is not that hard to do, and it will be rather fast too since the reset of the library is untouched. Only the delta is handled.

@slimymiracle
Copy link
Author

The system is running flawless now. The rescan/indexing is so much faster compared to PyarrFS, so I am super happy.

I think I'll reboot the server this evening and I'll report back to you if it still has the initial "startup" issue after I disable the "Update .." function.

Thank you for this awesome filesystem! :)

@hasse69
Copy link
Owner

hasse69 commented Dec 1, 2015

Btw, I was wrong regarding FUSE and the VFS. My own tests show that inotify works just fine if you copy your data to the VFS mount point rather than your source folder(s). However, even though PMS is basing its notification/watchers on inotify I cannot make it work properly :(

I sent a question to the forums but still no answer.
https://forums.plex.tv/discussion/196508/inotify-and-automatic-library-updates-again#latest

@hasse69
Copy link
Owner

hasse69 commented Feb 3, 2016

Works just fine if you restart PMS after making sure mount point is read/write.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants