Googledrive + cache + Crypt : Cpu usage very high

Hello there,

I use Crypt over cache over Google drive.
My cpu usage is quite high when plex read files on the mount: (typically 200% to 400% CPU usage on my Atom C2750.

This means that the fact to read the file alorn, use half o my CPU power… This does not give a lot of space for transcoding…

Is this cpu use typical ?

My rclone mount command is as follows:

/usr/sbin/rclone mount Crypt:/ /media/GSuiteCrypt/
–allow-other
–no-modtime
–dir-cache-time=24h
–vfs-cache-mode writes
–cache-tmp-upload-path=/srv/dev-disk-by-label-DataDisk/rclone/cache-upload
–cache-chunk-size=64M
–cache-info-age=168h
–cache-tmp-wait-time=3h
–cache-db-path=/srv/dev-disk-by-label-DataDisk/rclone/cache-backend/
–cache-chunk-path=/srv/dev-disk-by-label-DataDisk/rclone/cache-backend/
–cache-dir=/srv/dev-disk-by-label-DataDisk/rclone
–cache-workers=5
–buffer-size=64M
–attr-timeout=1h
–rc -vv
–log-file /srv/dev-disk-by-label-DataDisk/rclone/rclonemount.log
–cache-chunk-no-memory

Your config is kind of odd. The chunk size is huge so it’s pull 64M * 5 workers each time you do something. Any reason you have it so high? I was checking through my metrics and I have a i770 which is roughly 5-6x your CPU. I hit roughly anywhere from 5% to 25% of a single core. With that CPU, you aren’t transcoding anything really though.

This plex article has some suggestions:

https://support.plex.tv/articles/201774043-what-kind-of-cpu-do-i-need-for-my-server/

https://www.cpubenchmark.net/singleThread.html shows the marks and it’s only 582.

Do you mean rclone is using 200%-400% of the CPU on its own? That does sound high…

Remember you are doing SSL encryption to speak to drive, then crypt’s own encryption so two lots. I wouldn’t have thought that should take too much CPU though.

Yes, this is exctly what i mean.
My cpu is not so weak (Passmark =3805) and rclone itself is using between 2 and 4 of the 8 core when i am reading a file on a crypted mount.

I am fully aware that there is some double encryption, but as you said, i was not expecting my server to put a knee down because of it.

Here is random screen capture of the situation: Reading the fils use more cpu than transcoding it ! That’s pretty unexpected.

It’s a pretty weak CPU. I was quoting the single threaded performance. The i7 is 10782 marks so quite a bit beefier.

Your CPU is recommend for “Single 720p transcode: Intel Core i3 3.0 GHz” which is the range for the passmarks.

You can turn off the individual threads in htop as it makes the output much easier to see:

Did you try my suggestion to turning down the chunk size? It’s really way too big.

First, thanks for the tip with htop . it’s much easier to understand.

Regarding the CPU horsepower: the issue is not related to transcoding. (anyway, i do directplay 95% of the time).
Transcoding is not an issue. Without rclone, With this very CPU i have already been able to transcode 2 x 1080p stream at the same time. (which make sense according to the recommendation of plex which is 2000 marks at passmark per 1080p stream. my cpu reach 3800 at passmark. I am well aware that this is not as good as your i7, but this is better than most i3).

Regarding the chunk size, i have tried a smaller one, (16M) , but it did not make any difference. For me it make sense to have a large chunk size for a plex library… considering the size of the file, i thought it was better to have a large chunck size.

You can turn off vfs-cache-writes too as you are using the rclone_tmp_upload.

Having larger chunks makes things slower as plex usually only need smaller pieces of the file to do certain things and any operation you have is going to grab 64MB every time.

The default chunk size for both plexdrive and rclone are set at 10MB.

the buffer-size can be 0M as well. You are already using the cache for the file so that’s extra overhead as well as not needed.