defining
Posts: 39
Joined: Tue Mar 08, 2016 9:44 pm

How much server in a raspberry

Tue Aug 14, 2018 11:49 pm

Hi,

I have a raspberry pi 2 that I'm using locally. I would like to know how much 'server' can I put on it.

For example, I would like my raspberry to be:

- A server mail
- A server web (locally)
- Running 2 python script on background (24/7)

I will not use the server mail and the server web every day but I would like to know if I can run it all?

And how can I measure the performance? (For example, "Your raspberry is using 25% of the memory" ) to prevent any damage.

Thanks :)

W. H. Heydt
Posts: 8773
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How much server in a raspberry

Wed Aug 15, 2018 12:45 am

Well...you certainly won't damage the Pi by using "too much memory" or running too many programs. Things will just get slower, for a variety of reasons. One consideration here is which version of the Pi2B you have as the SoC was changed between the Pi2Bv1.1 and the Pi2Bv1.2, with the later being about 30% faster even with the same (900MHz) clock speed.

However, either version of Pi2B has 4 CPU cores, so--at least on a theoretical level--each of the processes you want to run plus the OS could be running in separate cores. The OS will take care of memory, allocating it as needed. That said, if you try to use more memory than is available, the OS will swap blocks of memory out to the SD card, and that is where problems are likely to occur. Each cell of an SD card has a limited number of time it can be written. The (very small) processor in the SD card tries to even out the wear on the cells, and that takes overhead (it's also the major reason why you can corrupt an SD card by just pulling the power).

There are command, such as "top" that will show you how much memory is being used and what the CPU load is. One thing you could do is run each application separately to see how the Pi handles it. Then start with one application and add the others, one by one, to see what happens.

If you find that you cannot reasonably run all the applications at once on your Pi2B, there ar e several solutions, depnding on what resource you are running short on. If it's CPU cycles, you can either split the applications across more than one Pi or you can upgrade your Pi2B to a Pi3B or Pi3B+. If you're running out of memory, you can try setting configuration data for the applications to reduce the memory footprint or--again--split the applications across more than one Pi. If you're only a little short on memory, look carefully at your system configuration to see if you can change the memory split between the CPUs and the GPU.

Welcome to the wonderful world of performance tuning. You get to decide whether you want to throw time and energy at any problems you have, or whether you'd rather solve them with money in the form of more Pis. At least Pis are inexpensive.

defining
Posts: 39
Joined: Tue Mar 08, 2016 9:44 pm

Re: How much server in a raspberry

Wed Aug 15, 2018 1:11 am

What a great and clear response, thank you so much!!!

I have a last questions. How can I now the SoC from my raspberry?

I bought this one: https://www.amazon.fr/gp/product/B00STV ... UTF8&psc=1

W. H. Heydt
Posts: 8773
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How much server in a raspberry

Wed Aug 15, 2018 2:36 am

defining wrote:
Wed Aug 15, 2018 1:11 am
What a great and clear response, thank you so much!!!

I have a last questions. How can I now the SoC from my raspberry?

I bought this one: https://www.amazon.fr/gp/product/B00STV ... UTF8&psc=1
You can only guess from that link. If you mouse over the image of the PCB, you will see, just next to the GPIO header it says, "Raspberry Pi 2 Model B v1.1". So the board that is pictured is a Pi2Bv1.1. But to be sure of what you have (sites don't always update images), look at that same area on your Pi to see what it says.

The Pi2Bv1.1 uses a BCM2836 SoC, which is quad-core where each core is an AMD Cortex-A7. The Pi2Bv1.2 uses a BCM2837 SoC, which is a quad-core SoC where each core is an ARM Cortex-A53. The '2837 is also used on the Pi3B, but clocked to 1.2Ghz and the Pi3B+ uses a '2837B0 which defaults up to 1.4GHz. Wikipedia has a pretty good article giving the history of the Pi models and their specifications here: https://en.wikipedia.org/wiki/Raspberry_Pi

defining
Posts: 39
Joined: Tue Mar 08, 2016 9:44 pm

Re: How much server in a raspberry

Wed Aug 15, 2018 9:19 am

You were right, it is a v1.1 model!

Thanks a lot :)

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 29 guests