Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAK7240 - cache directory location issue #100

Closed
disk91 opened this issue Sep 19, 2021 · 11 comments
Closed

RAK7240 - cache directory location issue #100

disk91 opened this issue Sep 19, 2021 · 11 comments

Comments

@disk91
Copy link

disk91 commented Sep 19, 2021

The cache directory on /etc/helium_gateway/cache is a problem on RAK7240
this is blocking the filesystem remount as read-only on restart apparently due to a too small free space on it.
Then is it impossible to save any change on the gateway settings

@madninja
Copy link
Member

What would you suggest we do instead? Keep the state channels in a different location or in memory?

Or have a configuration where no packets are ever paid for?

@shawaj
Copy link
Contributor

shawaj commented Sep 20, 2021

Doesn't the rak7240 have a micro SD card? Could the cache be stored on that?

Presumably if necessary the size of that card can be upgraded.

@disk91
Copy link
Author

disk91 commented Sep 20, 2021

I agree, there is a micro-sd and it would be the best place to store this.
I think the location is /mnt/mmcblk0p1

@madninja
Copy link
Member

madninja commented Sep 20, 2021

I agree, there is a micro-sd and it would be the best place to store this.
I think the location is /mnt/mmcblk0p1

Ok so you can set that in the settings.toml file by adding a cache section at the end of the file like the example below:

[cache]
store="/mnt/mmcblk0p1/helium_gateway/cache"

@jmarcelino
Copy link

I'll test it out since the filesystem which comes on the SD card is VFAT, not sure it it will work.

By the way are there any expected performance requirements for this cache? Will 10MiB/s read be enough?

@madninja
Copy link
Member

I'm still trying to figure out what the best approach is for the state channel storage. It's worst case right now and written every time a purchase is received from router (which updates the state channel). I need to see what the memory profile is of state channels, since perhaps we can just keep them in RAM instead, or just them to disk less frequently

@madninja
Copy link
Member

@disk91 since you're likely running against larger state channels, could you give me an idea of how big the files are that are put in that cache folder?

@madninja
Copy link
Member

I'm going to switch the state channel to be RAM based for now since disk storage is likely going to be problematic for other types too whereas RAM seems to be more plentiful

@madninja
Copy link
Member

Jus shipped alpha.17 which no longer stores state channels on disk.

You'll have to clean up your cache folder to remove all the router key subfolders since they're no longer used and just taking up space

@disk91
Copy link
Author

disk91 commented Sep 21, 2021

I purged the cache files but the total was around 3Mb

@disk91
Copy link
Author

disk91 commented Sep 21, 2021

I'll setup a second gateway and let you know the new impact (will do it in a couple of days).

shawaj added a commit to NebraLtd/hm-gatewayrs that referenced this issue Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants