# Memory issue using rclone mount with Plex

**URL:** <https://forum.rclone.org/t/memory-issue-using-rclone-mount-with-plex/16334>\
**Category:** Help and Support\
**Created:** [May 12, 2020, 11:18pm UTC](https://forum.rclone.org/t/memory-issue-using-rclone-mount-with-plex/16334 "2020-05-12T23:18:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CraftyClown](https://forum.rclone.org/user_avatar/forum.rclone.org/craftyclown/32/2667_2.png) [@CraftyClown](https://forum.rclone.org/u/CraftyClown)\
**Post date:** [May 12, 2020, 11:18pm UTC](https://forum.rclone.org/t/memory-issue-using-rclone-mount-with-plex/16334/1 "2020-05-12T23:18:09Z")

</div>

#### What is the problem you are having with rclone?

I am running an rclone mount on my Raspberry Pi4 4gig (Ubuntu 20.04) and I am finding that when I do a Plex media scan on my TV shows, the memory usage gradually increases until either Fuse crashes or the entire OS crashes.

I'm fairly sure that I just need to tweak my script as it's probably just the buffer being too large, however before starting to tinker with the script (that works perfectly on my remote server, albeit with significantly more memory at it's disposal) I thought I would ask the experts, in case there is something else I should be addressing.

#### What is your rclone version (output from `rclone version`)

rclone v1.51.0-305-g0ce662fa-beta

#### Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu Linux 20.04 / Linux 5.4.0-1008-raspi on aarch64

#### Which cloud storage system are you using? (eg Google Drive)

Google Drive

#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)

```auto
    [Unit]
    Description=PlexMount Service

    [Service]
    Type=notify
    Environment=RCLONE_CONFIG=//home/craftyclown/.config/rclone/rclone.conf
    ExecStart=/usr/bin/rclone mount "RichFlixCrypt:/Encrypted/" /home/craftyclown/Skull \
       --allow-other \
       --buffer-size 256M \
       --dir-cache-time 72h \
       --drive-chunk-size 32M \
       --log-level INFO \
       --log-file /home/craftyclown/logs/rclone.log \
       --umask 002 \
       --vfs-read-chunk-size 128M \
       --vfs-read-chunk-size-limit off \
       --tpslimit 3   
    ExecStop=/bin/fusermount -uz /home/craftyclown/Skull
    Restart=on-failure
    User=craftyclown
    Group=craftyclown

    [Install]
    WantedBy=multi-user.target

```

#### A log from the command with the `-vv` flag (eg output from `rclone -vv copy /tmp remote:tmp`)

Sorry I currently have no logs as the last crash caused all sorts of issues in the OS and necessitated a re-install, which is still under way.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [May 13, 2020, 7:14am UTC](https://forum.rclone.org/t/memory-issue-using-rclone-mount-with-plex/16334/2 "2020-05-13T07:14:01Z")

</div>

> [@CraftyClown](#):
>
> --buffer-size 256M \

This means every open file will use this much RAM which sounds like a lot for a 4GB raspberry Pi. I suggest you reduce that number.

---

<div class="post-metadata">

**Author:** ![CraftyClown](https://forum.rclone.org/user_avatar/forum.rclone.org/craftyclown/32/2667_2.png) [@CraftyClown](https://forum.rclone.org/u/CraftyClown)\
**Post date:** [May 13, 2020, 8:28am UTC](https://forum.rclone.org/t/memory-issue-using-rclone-mount-with-plex/16334/3 "2020-05-13T08:28:31Z")

</div>

Thanks Nick,

I thought that was probably the case. Would something like 32M be more reasonable on a 4gig device and would that ultimately result in a performance trade off?

Other than the oversized buffer, is there anything else you might suggest tweaking on this script, for better performance on the Raspberry Pi?

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [May 13, 2020, 7:18pm UTC](https://forum.rclone.org/t/memory-issue-using-rclone-mount-with-plex/16334/4 "2020-05-13T19:18:05Z")

</div>

That is the main one to tweak - I'd experiment to see what the lowest value you can get away with is.

---

<div class="post-metadata">

**Author:** ![CraftyClown](https://forum.rclone.org/user_avatar/forum.rclone.org/craftyclown/32/2667_2.png) [@CraftyClown](https://forum.rclone.org/u/CraftyClown)\
**Post date:** [May 13, 2020, 7:34pm UTC](https://forum.rclone.org/t/memory-issue-using-rclone-mount-with-plex/16334/5 "2020-05-13T19:34:25Z")

</div>

Thanks Nick, I'll have a little play

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [May 16, 2020, 7:34pm UTC](https://forum.rclone.org/t/memory-issue-using-rclone-mount-with-plex/16334/6 "2020-05-16T19:34:27Z")

</div>

Closed on May 16, 2020, 7:34pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
