Jump to content

appdata in ram


Recommended Posts

I've been using nextcloud for quite some time and I love it. What I don't love is how slow it is when using the webui. My appdata lives on an nvme cache. Sadly my mobo only has pcie 2.0 slots, so the speed is somewhat limited, but its still painfully slow. As a test, I moved the appdata for nextcloud into /tmp, and it runs great! The UI is responsive and snappy and performance is awsome.

 

Obviously ram gets wiped every reboot, but is there any realistic way to have a certain folder moved into ram at boot, then moved out of ram for a shutdown? I suspect simply moving the data is easy enough with userscripts. Perhaps even a scipt to start that particular container only after the data has been moved to RAM. But what about a script that runs on shutdown, after the containers are stopped, to move the data out of ram? Any suggestions are welcome :)

 

Some people have lots of ram, and I feel like having an option to load appdata for specific dockers into RAM would actually be pretty nice. 

Theres a million posts out there complaining about how slow nextcloud is. But running it in RAM is a night and day difference. 

Link to comment

Ive run into a problem. My scripts work great when stopping/starting the array. It takes some time to write out the data from RAM to the cache, so when I stop the array I see it re-trying over and over to while it waits for the script to finish. But eventually once the script is done copying data, the array stops and all is well. The issue is rebooting. If my understanding is correct, reboot will kill anything still running, this means my script dies and not all the data is copied out of RAM to the cache. I just learned this the hard way after a reboot and now nextcloud is broken.

 

For reference, the scripts are:

at start of array:

rsync -ar /mnt/user/ramcache/appdata/ /tmp/appdata/
docker start nextcloud
docker start mariadb

 

at stop of array:

rsync -ar /tmp/appdata/ /mnt/user/ramcache/appdata/

 

Is there some way to force the system to let the script finish instead of killing it? The performance benefit of having nextcloud, and even mariadb in ram is incredible and I don't want to have to give it up. Is there perhaps a better way than userscrips to achieve what im doing?

Cheers

Link to comment

I would suggest that you increase some of the timeouts as described here in the the online documentation accessible via the ‘Manual’ link at the bottom of the GUI or the DOCS link at the top of each forum page.   I cannot think off-hand of another way to let the script run to completion other than ensuring the timeout is at least long enough.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...