OctoPrint on Raspberry Pi RAM issue: Memory split
August 29, 2015 01:45PM
Hey folks!

I was upgrading my printer with a print server: The OctoPrint is used running on a RPi B with 512 MB RAM. The whole thing was running rather laggy - even during supplying the gcode while printing, the printer is sometimes taking brake. Of course, this is to be fixed. A webcam is used as well.

Here's my problem: The memory split option shows 384MB RAM. I am assuming tuning it up to 496MB (thus, setting the GPU RAM to 16Mcool smiley would improve the performance significantly. I think so because there are barely any comments on slow speeds about OctoPrint on a RPi (?). I used "raspi-config" to set the desired configuration. However, checking with "free" or "(h)top" still shows the 384MB instead of 496MB RAM. Interestingly, the setting seems to be saved to "/boot/config.txt", though.

So: Does anyone might have an idea why the lower RAM amount is still shown in free/htop and how to fix that?

I am so much looking forward to your help! :-)

Bests, Mardy
Re: OctoPrint on Raspberry Pi RAM issue: Memory split
August 30, 2015 03:09AM
I´m no raspberry expert, but when the board uses "shared memory" for programs and graphic chip, the CPU-bridge will always be the needles ear, no matter how much memory you assign for programs.
A faster CPU ( like new RasPI ) would help a little, but it´s the RAM/bus clock that´s important here.
The only thing that reduces "traffic jam " is a lower color depths and/or screen resolution ( the latter might be impossible with certain displays )

Adding a webcam will make it even worse.
Please correct me, if I´m wrong smiling smiley
-Olaf
Re: OctoPrint on Raspberry Pi RAM issue: Memory split
August 30, 2015 05:45AM
Thank you for your help! Your arguments sound reasonable. However, my RPi is only accessed via SSH and running headless. This means, at least to my understanding, there shouldn't be a problem of a color depth and/or screen resolution. Unfortunately, one can't decrease the GPU dedicated RAM to < 16MB.

Somewhere, I read that a webcam would possibly more stress the CPU since used via USB; I don't know if that's correct. What is the typical hardware to run OctoPrint then? I thought the RPi would be ideal since I never heard of real performance complaints on forums or such.
Re: OctoPrint on Raspberry Pi RAM issue: Memory split
August 30, 2015 09:23AM
The RPi comes in two versions.
Not sure if a B+ model is faster CPU-wise?
-Olaf

Edited 1 time(s). Last edit at 08/30/2015 09:26AM by o_lampe.
Re: OctoPrint on Raspberry Pi RAM issue: Memory split
August 30, 2015 02:42PM
According to the specifications sheet, the RPi B+'s is not stronger than the B's one.
Re: OctoPrint on Raspberry Pi RAM issue: Memory split
August 31, 2015 05:41PM
RPi B and RPi B+ are the same chip. The RPi2 model B is the one with the new quad core chip. That said, you should be able to get octoprint running fine on the older models.

If I had to guess I would say it is likely the USB webcam. Most builds I have seen online are using the purpose built camera module that plugs into the CSI port.

Also just to clarify, are you controlling Octoprint from a remote browser on another device or SSH in and load a browser on the Pi to access the Octoprint interface? If the latter, then that is likely taking up a bunch of CPU cycles. I have just recently installed repetier-server (similar to octoprint) on a Pi and if I try to load a browser on the Pi to do printer control from, it takes CPU load to 100% (without a camera), but if I log in to the server through the web interface from another device (as intended) then the load during print is more like 3%. You shouldn't need SSH to access Octoprint, you just hit the web page from your laptop/tablet and control from there.

Have you tried unplugging the camera?

Bryan
Sorry, only registered users may post in this forum.

Click here to login