Raspberrypi: ResinOS is pushing resources to the limits

support
raspberrypi3
docker
resinos

#1

I have a Raspberrypi 3 Model B machine which runs resinOS. I use it to deploy my Ruby on Rails application. Nginx + Unicorn serve the application on port 80. There also some background jobs in the application.

I have another Raspberrypi 3 Model B machine (exactly the same as the 1st one) which runs a Debian Jessie where I have deployed the same application and installed the same tools/dependencies required to run the application.

So, the essential difference between them is that one is running resinOS and the other one runs Debian Jessie.

The problem here is that the machine which runs Debian Jessie has a significant better performance than the other machine. Although the RoR application respond time is good, it needs more time to run the background tasks and in general to do different things in the terminal (installing tools, executing commands etc.).

I use htop to monitor the CPU and RAM. Comparing the 2 machines, the one which runs resinOS is all the time at 100% of CPU usage. The other machine which runs Debian Jessie, most of the time keeps the CPU at 70-80% and rarely at 100%.

The most consuming processes are the same in both machines BUT, I don’t know why htop in resinOS shows me the same process twice, like having 2 instances per process and doing the same work twice. See picture below:

As you can see, the same process runs twice with 2 different PIDs.

This might be the reason why it is slow, but still don’t get why should there be such differences between the 2 machines?!
Why is this behaviour in resinOS?
Any idea why I have 2 instances for each process?


#4

Hi,
Could you send us the device url from the dashboard and grant support access using the actions page of the device, so that we can investigate this?

Does the Debian setup use the same Dockerfile to configure & run the application?
Could you share with us your Dockerfile?
The device will try to run the last CMD part of your Dockerfile and expect it to not exit. If the CMD part exits for any reason, resinOS will try to re-run the CMD part.

Is there any chance that your application starts the background process and exits on its first run, causing resinOS to re-run it?


#6

Hi,
The Debian setup does not use Docker at all. All installations are manual there.

I can grant you support access and the Dockerfile, but I would like to provide you the details in a private message.
Let me know if you don’t mind to private message you.
Thank you.


#7

Hi @dbeqiraj If you message me I can investigate the issue.


#12

@dbeqiraj What kind of performance difference do you see if you run your Docker container on debian-jessie?
I’m curious to see if the difference is Docker or resinOS


#13

I think that’s due to htop showing a row for each running thread as well as the process. This can be changed from Setup -> Display Options > Check “Hide userland process threads”.