Page 1 of 2

Octoprint on Raspberry Pi performance issue

Posted: Tue Apr 22, 2014 7:11 pm
by mhackney
I've been using Octoprint on a raspberry pi off and on for several weeks now. I love the concept and overall host control layout, customizability, integrated video, etc but I am running into many situations where I can't use it due to performance issues. The problem typically rears its head when I print something with a complex infill like KISSlicer's "round" infill. Basically, the perimeters print fast and fine, then everything slows down to a painful crawl when the infill prints. It is jerky and that affects quality as well as takes forever. Has anyone experienced this? I'm connected to RAMBo at 230400 baud so the connection speed shouldn't be an issue. I do have a video camera (pi cam) connected to the pi but once the gcode is downloaded to the raspberry pi filesystem, that shouldn't affect performance should it? I posted on the Octoprint forum but no one has answered for several weeks.

Anyone else experience this?

cheers,
Michael

Re: Octoprint on Raspberry Pi performance issue

Posted: Tue Apr 22, 2014 7:19 pm
by mhackney
I forgot to mention that I've also disabled as much of the logging as possible as that is reported to affect performance.

Re: Octoprint on Raspberry Pi performance issue

Posted: Tue Apr 22, 2014 7:36 pm
by bubbasnow
change your kbaud to 57600 and try again

Re: Octoprint on Raspberry Pi performance issue

Posted: Tue Apr 22, 2014 7:37 pm
by mhackney
Will do but that is counter intuitive! Did you experience a similar problem?

Re: Octoprint on Raspberry Pi performance issue

Posted: Tue Apr 22, 2014 7:39 pm
by bubbasnow
yea i was getting intermittent issues, daft pointed it out a few months ago and ive been printing anything from any slicer without those types of issues.

also what version are you using? ive noticed that this latest main branch i need to increase the timeout or else i get forced lines.

Re: Octoprint on Raspberry Pi performance issue

Posted: Tue Apr 22, 2014 7:49 pm
by mhackney
I can't find the version but it is the most recent 1/7/2014 OctoPi release.

Re: Octoprint on Raspberry Pi performance issue

Posted: Tue Apr 22, 2014 8:22 pm
by bubbasnow
That version should be ok with the timeout setting, if you update you might get the forcing line issue.

mine is .8 version, check the file in /root/etc if you are not sure

Re: Octoprint on Raspberry Pi performance issue

Posted: Wed Apr 23, 2014 7:03 am
by daftscience
I couldn't run octoprint on my raspberry pi if I had a camera hooked up. if mjpg-streamer is running it will slow it down. Download htop and run that to see where you're resources are going.

My solution was to switch to the beaglebone black. i haven't had an issue since.

Re: Octoprint on Raspberry Pi performance issue

Posted: Wed Apr 23, 2014 8:51 am
by mhackney
I was afraid that the video processing might be the culprit. I have a few things to try now - reduce the baud rate, disable video, etc - and see what happens.

Re: Octoprint on Raspberry Pi performance issue

Posted: Wed Apr 23, 2014 9:32 am
by daftscience
Or get the beaglebone black :)

But yeah, could be the camera and or resolution you're streaming at. I was trying to get 720p and had a much higher end webcam. My buddy on the other hand had no issue with his cheaper vga resolution cam.

Re: Octoprint on Raspberry Pi performance issue

Posted: Wed Apr 23, 2014 10:07 am
by mhackney
Yup, the video camera is the culprit. I got the little pi camera with my pi and it supports a lot of different bit rates/formats. Not sure how to select which one it chooses for Octoprint though.

Re: Octoprint on Raspberry Pi performance issue

Posted: Wed Apr 23, 2014 10:10 am
by mhackney
daftscience, what are you running for a video camera on your Beaglebone Black?

cheers,
Michael

Re: Octoprint on Raspberry Pi performance issue

Posted: Thu Apr 24, 2014 2:42 am
by daftscience
I'm using the logitech c615 and streaming 720 at 15fps. If you haven't, you could try lowering the FPS. There isn't really a need for that to be high at all, especially if your only using it for timelapse.

Re: Octoprint on Raspberry Pi performance issue

Posted: Tue May 06, 2014 9:19 pm
by atoff
Of course I see this thread AFTER having purchased the RPI and Pi Camera just a couple of days ago. I was very underwhelmed by the video quality.

Re: Octoprint on Raspberry Pi performance issue

Posted: Tue May 06, 2014 10:18 pm
by atoff
Well, I just ordered a Banana Pi. http://www.bananapi.org/" onclick="window.open(this.href);return false; $54 total. Hopefully the right move... I'll probably sell off the RPI, I already have one, and don't need another laying around.

edit: Well, scratch that... the seller is actually OOS. Won't be available until about 30 days, so I'm just cancelling.

Re: Octoprint on Raspberry Pi performance issue

Posted: Wed May 07, 2014 12:20 pm
by gestalt73
I'm still experimenting with the RPi, I was having some issues with uptime, but it turns out that the most likely culprit was a failing sd card.

Until I verify that's straightened out, it's relegated to webcam duty.

Out of curiousity, has you tried enabling any of the overclocking modes?

Default is 700mhz, the raspi-config has settings for 700, 800 900, 950, 1000.

Mine is unstable at anything above 900Mhz, but bumping up the clocks a bit may help with your performance issues.

Re: Octoprint on Raspberry Pi performance issue

Posted: Fri May 09, 2014 2:57 pm
by gestalt73
Out of curiousity, have tried printing while running top in an ssh session to see system load?

I'm trying a second time, after reading up and selecting the "force checksum" option under settings -> features.

This is a larger complex print with alot of support material, and I noticed a definite stuttering earlier on in the print, but it seems to be fine now.

I'm looking at system load, and at most I'm seeing less than 20%.

I wonder..

If the stuttering that we're seeing isn't the rpi processor being overtaxed, but some type of serial over usb issue?

[img]http://i.imgur.com/AeG5XX0.png[/img]

Re: Octoprint on Raspberry Pi performance issue

Posted: Fri May 09, 2014 3:03 pm
by mhackney
I see the same thing with top but consider that the video is going over ethernet not USB. So theoretically it shouldn't interfere with the serial traffic.

Re: Octoprint on Raspberry Pi performance issue

Posted: Fri May 09, 2014 3:21 pm
by gestalt73
Yeah, I'd agree with that.

The stuttering that I saw on this model was within the first layers I think. It wasn't the whole layer, just specific features during the layer. That's with a print job running + octopi web ui + webcam.

In the same time, the octopi interface became unresponsive and laggy several times, in addition to the stuttering print. It was choking on something, but since then, now 10 hours into the print it's smooth sailing.

I'll check again when I run the second half of this print to see if top provides any clues if it happens again.

Maybe some type of interrupt weirdness?

My current best guess is that there's some type of serial over usb weirdness that results in corruption and *many* retries, which forcing the checksum seems to catch, even though it just masks the problem somewhat.

I wonder if that's the source of the "mystery disconnects" I was getting as well. some prints would complete, others would stop within a few layers, and the printer would disconnect from octoprint.

Re: Octoprint on Raspberry Pi performance issue

Posted: Fri May 09, 2014 3:23 pm
by mhackney
That is exactly the symptom I experienced. Interrupt issues makes sense and might be the culprit.

Re: Octoprint on Raspberry Pi performance issue

Posted: Sun Jun 01, 2014 2:12 pm
by brent
As an alternative to buying a BBB, you can always overclock your Pi.

Re: Octoprint on Raspberry Pi performance issue

Posted: Thu Jun 05, 2014 9:28 pm
by atoff
brent wrote:As an alternative to buying a BBB, you can always overclock your Pi.
I'm running Octoprint on an overclocked Pi... it's pitiful. I have to print from SD card because the prints are so slow. I'm talking hours longer than it should take, and the print quality becomes awful. I can't upload files to the SD card from Octoprint either, since it takes about 45 minutes to transfer over a 5mb file. I can't see the files on the SD card from Octoprint unless I've uploaded it from Octoprint, so it really becomes somewhat useless. I use it for the webcam feature and to keep an eye on temps. That's about all it's good for with the Pi.

Re: Octoprint on Raspberry Pi performance issue

Posted: Thu Jun 05, 2014 11:09 pm
by bubbasnow
atoff wrote:
brent wrote:As an alternative to buying a BBB, you can always overclock your Pi.
I'm running Octoprint on an overclocked Pi... it's pitiful. I have to print from SD card because the prints are so slow. I'm talking hours longer than it should take, and the print quality becomes awful. I can't upload files to the SD card from Octoprint either, since it takes about 45 minutes to transfer over a 5mb file. I can't see the files on the SD card from Octoprint unless I've uploaded it from Octoprint, so it really becomes somewhat useless. I use it for the webcam feature and to keep an eye on temps. That's about all it's good for with the Pi.

what version of the Pi do you have? Are you using a wifi dongle? how big of an SD card/speed are you using on the Pi? I have been running for months without issues.

Re: Octoprint on Raspberry Pi performance issue

Posted: Fri Jun 06, 2014 2:54 am
by atoff
Latest Rev B... and yes, with an Edimax wifi dongle. I've been suspecting it might be an issue with my SD card... It's an 8GB class 4. If you're not having any issues, it might be time for me to pick up a class 10 to see if that makes a difference. It absolutely crawls when printing through Octoprint, and after reading through the performance issues people were having, I figured it was probably just common.

Re: Octoprint on Raspberry Pi performance issue

Posted: Fri Jun 06, 2014 3:35 am
by bubbasnow
atoff wrote:Latest Rev B... and yes, with an Edimax wifi dongle. I've been suspecting it might be an issue with my SD card... It's an 8GB class 4. If you're not having any issues, it might be time for me to pick up a class 10 to see if that makes a difference. It absolutely crawls when printing through Octoprint, and after reading through the performance issues people were having, I figured it was probably just common.
im running class 10, wired connection. so those are some differences in setup