Page 1 of 1

Caching content in RAM

Posted: 20 May 2020, 20:24
by TheWizz
We have an application that repeatedly plays the same content (including images and video), and hence would benefit from aggressive client-side caching of data read from the server. I noticed this option in the documentation that seems to imply this can be done:

Code: Select all

disable_private_mode=yes
Will setting this option indeed encourage Porteus Kiosk to cache browser data in RAM? How much RAM does porteus kiosk use "on its own", allowing me to estimate how much would be available for use as cache, given a certain amount of RAM? Any downsides to this reasoning?

-JM

Caching content in RAM

Posted: 21 May 2020, 08:57
by fanthom
Hello TheWizz,

"Will setting this option indeed encourage Porteus Kiosk to cache browser data in RAM?"
Yes

"How much RAM does porteus kiosk use "on its own""
Please connect to your kiosk over SSH and run following commands:
free -m
df -h

First command will tell you how much of RAM is used (google for exac explanation).
Second command will tell you how much of RAM is used by the files. In kiosk all files are copied to RAM, if you download 100MB file then you available RAM amount is reduced by 100 MB.

"Any downsides to this reasoning?"
You may slow the system down or even crash the browser if RAM fills up.
You'll need to use browser preferences to setup a limit on the caches (google how to do it for each browser).

It may be better to enable full persistence so files (caches) would be saved on the storage device and not in RAM.
Or invest into the customized build with local proxy enabled as some users reported that browser caching does not work for large files (e.g. videos).

Thanks