Welcome, Guest
Username: Password: Remember me
08 Apr 2018
INDI development team is happy to announce the release of INDI Library v1.7.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers.
Read More...
  • Page:
  • 1

TOPIC: Raspberry Pi RAM swap file

Raspberry Pi RAM swap file 7 months 4 weeks ago #21126

  • rlancaste
  • rlancaste's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1248
  • Karma: 12
  • Thank you received: 322
I was having my friend take a look at my Raspberry Pi setup script and he commented that the swap file James Taylor had recommended for increasing the RAM could be a problem for the SD card due to its limited number of writes. James had encountered a issue where the images coming from his DSLR were so big they exceeded the available memory. The swap file fixed it for him. I haven't had the issue he had yet, but I put it on my system because I thought it was a good idea. Anybody have any thoughts on this? My friend recommended that we could plug a small USB flash drive into the PI and put the swap file on there to increase the RAM instead. I worry that has the potential to slow the system down, but I definitely see the point of saving the SD card's lifespan.

Please Log in or Create an account to join the conversation.

Raspberry Pi RAM swap file 7 months 4 weeks ago #21128

  • rlancaste
  • rlancaste's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1248
  • Karma: 12
  • Thank you received: 322
Anybody tried zram? Basically that means using half the PI's ram as a compressed swap to effectively double the available RAM? I think it would probably be faster than a swap file on the SD card or a flash drive. Plus it won't kill the flash drive or SD card.

Please Log in or Create an account to join the conversation.

Last Edit: by rlancaste.

Raspberry Pi RAM swap file 7 months 4 weeks ago #21129

  • rlancaste
  • rlancaste's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1248
  • Karma: 12
  • Thank you received: 322
a performance test

Please Log in or Create an account to join the conversation.

Raspberry Pi RAM swap file 7 months 4 weeks ago #21137

I am using ZRAM on a raspberry PI3 running Mate 16.04 (Updated to the latest) with good success. I have been running it for a few months without any problems. I currently use a ZWO ASI071MC Cool which is a 16 Mega Pixel color camera. The image downloads in about 3 to 5 seconds and I am sure the ram swap has made it possible to use this camera without problem. As memory serves I just downloaded "zram-config" through the Synaptic Package Manager and ran the script leaving everything at the defaults. The output from Dmesg looks like this:



The memory report from System Monitor looks like this just after boot:



It has been a while since I installed it but as memory serves zram is compressing the ram memory and using some of it for a swap file. From Dmesg output it looks like it is using 4 compressed ram areas (one for each CPU?). It also automatically sets these up as a swap partition for you. I am sure a google search will yield more information on it. While using my ASI071 camera the swap loads to about 200 MB. As you can see the memory still reports at about 1GB of Ram while also giving about 462MB of swap, all in the 1GB of PI 3 ram. To date it has worked well for me. Hope this helps!
Attachments:

Please Log in or Create an account to join the conversation.

Last Edit: by LinuxUser.

Raspberry Pi RAM swap file 7 months 4 weeks ago #21139

  • rlancaste
  • rlancaste's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1248
  • Karma: 12
  • Thank you received: 322
I just tried it, all I had to do was sudo apt-get install zram-config. It looks like it is working just like yours. Did you actually have to run anything or configure anything? It looks like no, because my monitor says the exact same amount of swap as yours.

Please Log in or Create an account to join the conversation.

Re:Raspberry Pi RAM swap file 7 months 4 weeks ago #21140

  • maudy
  • maudy's Avatar
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 352
  • Karma: 2
  • Thank you received: 24
I have had to use zram as well. It has helped a lot. Installed it the same way.

I use two ZWO cameras in 16bit mode. It seems to be the two 32mb images that consumed the memory.

Once zram was installed. The imaging sessions would work.


Sent from my iPhone using Tapatalk Pro

Please Log in or Create an account to join the conversation.

Raspberry Pi RAM swap file 7 months 4 weeks ago #21141

rlancaste,
I believe you are right, I did not need to run a script but just installed zram-config from the package manager. Sorry for the confusion. I have made several changes and tweaks with bluetooth, window borders, etc. while setting up my PI 3 and some of that meshes together in memory. Looks like maudy has also had good success with zram, which adds another good data point to it's usefulness.

Please Log in or Create an account to join the conversation.

Raspberry Pi RAM swap file 7 months 4 weeks ago #21143

  • rlancaste
  • rlancaste's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1248
  • Karma: 12
  • Thank you received: 322
Thank you very much for the feedback. I added this to my raspberry pi and SBC computer setup scripts. I commented out the swap file. Users could still use it but not by default

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.173 seconds

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!


Gallery

Replica

Why INDI

Replica