[Tutorial][Experimental][Third-party Plugin available]Reducing OMV's disk writes, also to install it on USB flash

  • I have installed flashmem, and now it runs w/o any issues.


    Now I don't recall the exact issue which I was facing previously, as it was a while back, but now it is working fine. Thank you

    ARMBIAN 5.25 stable Debian GNU/Linux 8 (jessie) 4.9.7-sunxi // Banana Pi // OMV 3.0.62

  • Hi!
    I have two machines right now running OMV. I want to install the plugin on both my machines and could use a little help:


    1. BananaPi
    I am using OMV 3.0.64 on a BananaPi. The system is on a sd card so I could benefit from this plugin, right?
    The problem is that in the /etc/fstab file the system drive isn't listed. I only get the entries for the swap-file the tmpfs and all the USB drives connected.


    I did not install OMV directly but rather Bananian first and than OMV 3 on top of it, could this be the reason? Can I add the entry manually?


    2. Dell T20
    This is a standard direct OMV installation. OMV 3 on a thumb drive. I think the plugin is set up correctly but how can I be sure? Further down this thread I read that I should see which folders are mounted to ram. This is the output for mount:


    Are all the cgroup entries the folders mounted to ram?



    Cheers!

    • Offizieller Beitrag

    The system is on a sd card so I could benefit from this plugin, right?

    I would say it is mandatory unless you want to change your SD card all the time. Don't worry about fstab. Those items are optional. Most arm boards have the same issue.


    Are all the cgroup entries the folders mounted to ram?

    No. tmpfs is ram. If the plugin was enable and working correctly, you should see a bunch of folder2ram entries.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thanks for the answer! Really didn't knew of the existance of this plugin (and OMV-Extras in general) since yesterday. A hole new world!
    The BananaPi (and the RasPi which was replaced by it) are running OMV several years now with the same SD card. I guess I was lucky.
    I will have more in depth look into the plugin soon. Now I know what to look for :)

  • guys complete newbie here.


    just a quick question. this thread is now 19 pages long on tapatalk app and it'll take a long time to backread.


    is flashmem plugin available for omv 2.0 omv extras?


    i reinstalled my omv 2.0 on my 32 bit cpu because i forgot my root password but i cant find the said plugin anymore and i swear i was able to install it before.


    thanks.


    Sent from my ALCATEL ONETOUCH Flash Plus using Tapatalk

    • Offizieller Beitrag

    is flashmem plugin available for omv 2.0 omv extras?

    Yes. http://omv-extras.org/debian/p…enmediavault-flashmemory/

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Gents,


    Having a poke around with this plugin on my replacement OMV build (first time using USB for OS drive), noticed the following:


    I get writes to /var/cache/samba/msg and /var/cache/samba/lck at least once per minute, causing my writes to constantly trickle upwards. Having now manually covered this in the folder2ram.conf things are looking good.


    Not sure if there's been a change to samba of late causing this behaviour, or perhaps the plugin author doesn't use samba perhaps?


    Hopefully can be included in future.

  • Question: does the folder2ram magic within this plugin capture all the performance monitoring stuff that elsewhere is recommended to disable?


    ie. is the only benefit to also disabling it to reduce the additional data that is written back to disk on sync/reboot/shutdown?

    • Offizieller Beitrag

    Not sure if there's been a change to samba of late causing this behaviour, or perhaps the plugin author doesn't use samba perhaps?

    Yes, I do use samba. I guess I didn't notice it because it wasn't large writes. I merged your pull request and will release the update soon.

    does the folder2ram magic within this plugin capture all the performance monitoring stuff that elsewhere is recommended to disable?

    It captures most of it in the rrd directory but I still disable monitoring on my systems. When that data is written back to the disk, I don't think it causes issues unless you are rebooting lots of times per day.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I've been averaging 20 - 60 MB per day on my systems. 137 MB is still a lot less than my systems not using the plugin.

    What sort of daily writes are you seeing present day?


    I ask as I'm looking at, with the plugin, more like 300-400 MB per day (test system, doing nothing more than idling).


    At a guess - some daily (or more frequent) scheduled task(s) - as when looking at it every few minutes nothing substantially seems to be writing regularly, certain not that would creep up to as much as I'm seeing.

    • Offizieller Beitrag

    What sort of daily writes are you seeing present day?


    I ask as I'm looking at, with the plugin, more like 300-400 MB per day (test system, doing nothing more than idling).

    On my primary server, I am see about 400 MB per day.


    Code
    $ cat /sys/fs/ext4/sdb1/session_write_kbytes
    23158808
    $ uptime
     14:20:25 up 49 days,  4:23,  1 user,  load average: 0.12, 0.08, 0.01

    On my idle server, I am seeing much less:

    Code
    $ cat /sys/fs/ext4/sda1/session_write_kbytes
    302120
    $ uptime
     14:17:57 up 36 days,  4:27,  1 user,  load average: 0.00, 0.00, 0.00

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Following a number of weeks of relative stability (up to a few hundred MBs written daily, mostly as a result of daily OMV CRON jobs to update packages etc) I today noticed the figure was again continually creeping up (server 10's of K at a time, every refresh).


    Looks like /var/lib/php5/sessions has become particularly 'chatty' (as-is when ideal and a session string when connected to the GUI).

    • Offizieller Beitrag

    Looks like /var/lib/php5/sessions has become particularly 'chatty' (as-is when ideal and a session string when connected to the GUI).

    The /var/lib/php5 directory is one of the directories that the plugin handles - https://github.com/OpenMediaVa…lt/mkconf/flashmemory#L60

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • The /var/lib/php5 directory is one of the directories that the plugin handles - https://github.com/OpenMediaVa…lt/mkconf/flashmemory#L60

    While the above is spot on (according to linked source), looking at my installation (and reinstallation several times) it seems to be attempting to target /var/lib/php/ (without the 5), amongst other errors. Any advice on how to completely purge then reinstall this package and associated components (the errors seem to be within the folder2ram component)? Thanks.


    Edit: Seems this is the commit that has dropped the "5" thus causing the problem - https://github.com/OpenMediaVa…4054c5d8d23c6a5dab6c0e14f


    Edit 2: seems you've created a separate Branch 3.x, with Master presumably now for 4.x - is the issue within here, the wrong version going to the wrong repository?

  • Here's my attempt to install showing the above issue(s).


    Seems the issue is introduced in the latest openmediavault-flashmemory plugin update; I have an identically configured NAS as a cold spare (gets turned on around once a month to be kept up-to-date etc), have just fired this up and confirmed: a) openmediavault-flashmemory config DID contain the /var/lib/php5 as indicated, b) when applying the openmediavault-flashmemory update (via the GUI) I got the same errors and a config now without the /var/lib/php5 folder included.


    Separately, one thing I've noticed across all systems: seems any manual changes to the folder2ram.config rile (eg. I've manually added back in the /var/lib/php5 folder for now) requires TWO reboots to take effect.. is this expected?


    Finally, again separately, I also notice when upgrading to the most recent openmediavault-flashmemory plugin - which now doesn't have an enable option - within the GUI the enable switch is still there (misleadingly set to disabled, and errors when you try to toggle it).

    • Offizieller Beitrag

    Seems this is the commit that has dropped the "5" thus causing the problem - github.com/OpenMediaVault-Plug…4054c5d8d23c6a5dab6c0e14f


    Edit 2: seems you've created a separate Branch 3.x, with Master presumably now for 4.x - is the issue within here, the wrong version going to the wrong repository?

    Yep, that commit was for OMV 4 which uses php7 and needs the "5" dropped. I wanted the improvements on OMV 3.x that I created for OMV 4.x but forgot about the php directory difference. I removed 4.1 from the OMV 3.x repo. Purge the plugin and your apt cache. Then reinstall 3.4.5.


    seems any manual changes to the folder2ram.config rile (eg. I've manually added back in the /var/lib/php5 folder for now) requires TWO reboots to take effect.. is this expected?

    never manually change the file. It will just be overwritten at some point.


    I also notice when upgrading to the most recent openmediavault-flashmemory plugin - which now doesn't have an enable option - within the GUI the enable switch is still there (misleadingly set to disabled, and errors when you try to toggle it).

    This is a browser cache issue. Nothing I can do to fix this. You need to clear your browser cache or do a ctrl-shift-r to hard refresh the page.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Edit 2: seems you've created a separate Branch 3.x, with Master presumably now for 4.x - is the issue within here, the wrong version going to the wrong repository?

    3.5 is now pushed to the OMV 3.x repo. It has the features of the 4.x plugin (enable removed, better installation, etc) with the correct php5 directory.

  • 3.5 gives me this error:



    Code
    Error
    The method 'setSettings' does not exist for the RPC service 'Flashmemory'.
    Error #0:
    exception 'OMV\Rpc\Exception' with message 'The method 'setSettings' does not exist for the RPC service 'Flashmemory'.' in /usr/share/php/openmediavault/rpc/rpc.inc:91
    Stack trace:
    #0 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Flashmemory', 'setSettings', Array, Array, 1)
    #1 {main}

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!