Closed mingomingo closed 1 year ago
I'm not sure what to say or suggest really. You're using a FUSE fs over several FUSE fs and turn off async reads which means it has to actively order reads. mergerfs only does things it's asked of... so it's using CPU or reading from disk it's because something is asking it to. You have caching on so maybe you're running out of memory? Have you turned it off? Without knowing why mergerfs is busy I can't comment. Have you read the docs on performance and caching?
I was hoping to get tips on how I can lower the IOWait on the setup and overall imrprove it.
I have 64Gb ram on the system, so far it isnt being fully utilized.
Would it be better to enable async and cache on mergerfs or rclone?
What do you need to see why mergerfs is busy?
If there was a known issue wit IOWait it'd be documented and/or addressed. mergerfs is just a proxy. It's ability to scale is based on the number of threads and client behaviors. You can enable certain caching as described in the docs but it's relevance depends on workflow.
As far as I know you can't have async reads due to rclone limitations. That's not something I can really comment on.
Either, both. mergerfs is the access point to rclone so if relevant it'd be better to cache mergerfs rather than rclone.
strace is only so useful. If you know the software involved then you can just see what it's doing. Plex does serious scans and reads of the filesystems and rclone is only going to be so fast so if you have a lot of client apps it's going to lead to high iowait states.
Ok, I'm not really sure what I'm doing with it. Tried disabling cache on rclone and enabling async_read on mergerfs. See where that goes.
I just built the idea from the previous discussion about this. Not really sure how to execute it properly and just used a previous mergerfs and rclone setting I had (which what it is now). Came here to see if I can improve the setup. Likely the high IOWait is indeed not a mergerfs problem, but its unique to the use case.
As I mentioned you should look over the caching and performance section of the docs and see what might be relevant. readdir, entry, and attr caches are pretty standard fare if you're not doing much out of band updates. Turning off page caching to limit any buffer bloat. It's all in the docs. Your best bet is to test. I really can't offer any more advice than what I've documented right now as it just sounds like high latency due to the setup.
Any updates or should we close this?
I think its just the plex servers.
Im just figuring out the cache part of the setup. Currently tried only caching it with mergerfs, but its very unstable if I turn off the cache on rclone. Will do some further tests.
General description
I was trying to use the load balancing which was described here #742. I merged 5 rclone mounts which all have identical files in it.
Problem was the IOWait is extremely high, its on the range of a constant 40% and highs of 80% for a hours.
Note tho I have something like a dozen plex servers scanning from the mergerfs mount. Im not even sure if it was an rclone problem anymore. But I went and checked
atop
and pressedd
and got to see that mergerfs was doing 20%.Will appreciate the help. Maybe my flags for mergerfs was wrong. Not sure. I also ready you made an
inodecalc
feature, I don't understand tho how to use it on my usecase.Expected behavior
Not high iowait
Actual behavior
Super high iowait
Precise steps to reproduce the behavior
Mount 5 identical rclone mounts, using the following command
Then use mergerfs with the following command,
When the plex servers starts scanning the mergerfs mount, it would be ok for a few hours (not sure if this is because he plex servers arent yet scanning or the setup works for the first few hours). Then the high IOwait appears and will stay they until a restart of the whole server.
System information
Please provide as much of the following information as possible:
[ ] mergerfs version:
mergerfs -V
[ ] mergerfs settings:
cat /etc/fstab
or the command line arguments[ ] Linux version:
uname -a
[ ] Versions of any additional software being used
os/arch: linux/amd64
go version: go1.14.4
[ ] List of drives, filesystems, & sizes:
df -h
Rclone mounts
[ ] strace of application having problem:
strace -f -o /tmp/app.strace.txt <cmd>
orstrace -f -p <appPID> -o /tmp/app.strace.txt
Not sure what to provide here.[ ] strace of mergerfs while app tried to do it's thing:
strace -f -p <mergerfsPID> -o /tmp/mergerfs.strace.txt
https://drive.google.com/file/d/1YM2P2UMl5rkRBrGJwJREqoRJ9ZkLvMcz/view?usp=sharing